Description

This article is specific to Contrail Service Orchestration (CSO) 5.1.0 On-Prem version, and shares the script to collect the logs that are required for troubleshooting.

 

Symptoms

How do I collect logs for troubleshooting in CSO 5.1.0?

 

Solution

To collect logs for troubleshooting, perform the following steps:

  1. Download and extract the following script: getlogs_5_1_0_sh.zip .
  2. Copy the attached script to the CSO host, and then copy it to startupserver1. The script can be copied to any location in startupserver1. In the following example, it is copied to /tmp .

Information about startupserver1 can be found from the get_vm_details.sh script in the CSO installer tarball.
root@hp8:~/Contrail_Service_Orchestration_5.1.0# ./get_vm_details.sh

Load_Balancer_Ips:
    nginx : 192.168.10.17
    keystone : 192.168.10.21
    haproxy_confd : 192.168.10.33
    etcd : 192.168.10.20
    mariadb : 192.168.10.18
    nginx_nsd : 192.168.10.19

cso_host_1 :
    ip_address : 192.168.10.1/32
    k8-infra_1 : 192.168.10.27 running
    vrr_1 : 192.168.10.28 running
    monitoring_1 : 192.168.10.29 running
    contrail_analytics_1 : 192.168.10.30 running
    k8-microservices_1 : 192.168.10.31 running
    startupserver_1 : 192.168.10.32 running 
  1. Execute this script with the sh <name of the script> command.

The log location /opt/csp/logs/all-ms-logs-csp-central-startupserver1-192.168.10.32.tar.gz is printed on the screen.

A snippet is shown below:

root@startupserver1:/tmp# sh getlogs_5.1.0.sh

Log collection for csp-central-startupserver1 - 192.168.10.32
kubectl logs
Compressing the Logs...
***** All the logs are collected under /opt/csp/logs/all-ms-logs-csp-central-startupserver1-192.168.10.32.tar.gz ******

This script will be included in CSO 5.1.1 release.