NOTE: Collection of Kubernetes cluster logs for workload clusters created using cluster operator was not included as part of TCA 2.0. If you are collecting logs specifically for TCA 2.0, please refer to Collecting Kubernetes Cluster Logs for tcakubernetesclusters in Telco Cloud Automation (TCA) 2.0 (90144)
The recommended method to obtain TCA logs is from the TCA UI, however, in some cases this operation may encounter timeouts or other issues due to log size or other factors. In this case, logs can be obtained via the TCA and/or TCA-CP Command Line Interface.
Resource exhaustion on the TCA/TCA-CP can happen due to log size or other factors may prevent the UI from being used to obtain the TCA log bundles.
2.0.1, 2.1, 2.1.1
1. SSH into the TCA/TCA-CP appliance.
2. Switch to root by using the su command and provide the root password:
su -
3. Use the change directory cd command to traverse to the following directory:
cd /opt/vmware/bin
4. Run the following command to collect the logs:
./techsupport.pl <fileName> <true/false> <true/false> <true/false> <true/false> <comma separated cluster IDs - Provide this only if "Collecting Kubernetes Cluster Logs" is true>
Where:
1st <true/false> is to collect the Core TCA logs.
2nd <true/false> is to collect the Crash Log (true requires that Core TCA logs are collected).
3rd <true/false> is to collect Mongo Database dump.
4th <true/false> is to collect the Kubernetes logs for the clusters specified. It is not recommended to collect the logs for all clusters.
Provide the ID of the Kubernetes Cluster - you can reference the steps later in this document to obtain the Kubernetes cluster ID for your version of TCA
Example - exporting the TCA logs and the Kubernetes logs for 2 clusters:
./techsupport.pl TCA-Manager-tech-support-31072022 true true true true "78401444-b4f6-4e9f-893f-9277a6ac7ce5,88b0382f-ff40-4118-8d9b-b6e6fd1640aa"
5. Change directory to: /tmp/techsupport/ to find the tech support bundle.
6. Secure Copy the file out of the TCA/TCA-CP.
The following procedures allow you to use the TCA Central CLI to collect the Kubernetes log bundles for specific management and workload clusters in TCA 2.x
This procedure will collect the logs for the Management Cluster specified.
1. SSH into the TCA-CP appliance where the backing Management cluster is deployed.
2. Switch to root by using the su command and provide the root password.
3. Change directory to: /tmp
cd /tmp
4. Start the Central CLI with the following command:
ccli
5. List the management clusters and note the Index ID:
list mc
6. Go into the context of the management cluster using the Index ID:
go 0
7. Collect the tech support bundle for the selected management cluster with the following command:
cluster techsupport
8. The logs will be placed in /tmp/tech-support-<time_stamp>.tar.gz. Secure copy them from this location.
This procedure will collect the logs for the Workload clusters specified.
1. SSH into the TCA-CP appliance where the backing Management cluster is deployed.
2. Switch to root by using the su command and provide the root password.
3. Change directory to: /tmp
cd /tmp
4. Start the Central CLI with the following command:
ccli
5. List the management clusters and note the Index ID:
list mc
6. Go into the context of the management cluster using the Index ID:
go 0
7. List the workload clusters:
list wc
8. Go into the context of the workload cluster using the Index ID, in this example we are going into the workload cluster with an Index ID of 1:
go 1
9. Collect the tech support bundle for the selected workload cluster:
cluster techsupport
10. The logs will be placed in /tmp/tech-support-<time_stamp>.tar.gz. Secure copy them from this location.
In the case that Kubernetes logs are not able to be collected via the script or CCLI, you can obtain the necessary logs by running the following commands on ALL Control Plane nodes:
su -
tar -zcvf /tmp/$(hostname)_$(date "+%Y-%m-%d-%H.%M").tar.gz /var/log
The compressed directory will be stored in /tmp.
Please remove the logs bundle after it has been uploaded to the SR.