Collecting log bundles from Telco Cloud Automation (TCA) 2.x via CLI
search cancel

Collecting log bundles from Telco Cloud Automation (TCA) 2.x via CLI

book

Article ID: 325411

calendar_today

Updated On:

Products

VMware VMware Telco Cloud Automation

Issue/Introduction

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.

Environment

VMware Telco Cloud Automation 2.1
VMware Telco Cloud Automation 2.1.1
VMware Telco Cloud Automation 2.0.1

Resolution

Collecting Log Bundles in TCA 2.x Using the Support Bundle Script

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.

 

Collecting Kubernetes Log Bundles in TCA 2.x using the TCA Central CLI (CCLI)

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


Collect Kubernetes Logs for Management Clusters

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
image.png

6. Go into the context of the management cluster using the Index ID:
go 0
image.png

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.


Collect Kubernetes Logs for Workload Clusters

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
image.png

6. Go into the context of the management cluster using the Index ID:
go 0
image.png

7. List the workload clusters:
list wc
image.png

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
image.png

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.