Description

This is a very simple article that describes the steps to run a command across all nodes of Contrail Cloud or all nodes of RedHat OpenStack Platform + Contrail Cluster and collect the output. In the example in this article, contrail-status is collected from all nodes across an RHOSP + Contrail cluster.

Solution

To collect contrail-status from all nodes as indicated above, run the following command:

(undercloud) [stack@queensa ~]$ . stackrc; ansible -i /usr/bin/tripleo-ansible-inventory overcloud -m shell -become -a 'contrail-status'
overcloud-contraildpdk-1 | SUCCESS | rc=0 >>
Pod      Service     Original Name                State    Id            Status     
vrouter  agent       contrail-vrouter-agent       running  3b5ad54062d7  Up 8 days  
vrouter  agent-dpdk  contrail-vrouter-agent-dpdk  running  0e53f021828a  Up 8 days  
vrouter  nodemgr     contrail-nodemgr             running  30a59ab6c762  Up 8 days  

vrouter DPDK module is PRESENT
== Contrail vrouter ==
nodemgr: active
agent: active
overcloud-controller-0 | SUCCESS | rc=0 >>
Pod  Service  Original Name  State  Id  Status  
overcloud-controller-1 | SUCCESS | rc=0 >>
Pod  Service  Original Name  State  Id  Status  
overcloud-controller-2 | SUCCESS | rc=0 >>
Pod  Service  Original Name  State  Id  Status  
overcloud-contrailcontroller-2 | SUCCESS | rc=0 >>
Pod              Service         Original Name                          State    Id            Status      
analytics        api             contrail-analytics-api                 running  83cd6e8bce21  Up 2 weeks  
analytics        collector       contrail-analytics-collector           running  36d36d51ab81  Up 2 weeks  
analytics        nodemgr         contrail-nodemgr                       running  048d85a9c4ac  Up 2 weeks  
analytics        redis           contrail-external-redis                running  d4ee5229d0d6  Up 2 weeks  
analytics-alarm  alarm-gen       contrail-analytics-alarm-gen           running  8aea3f45595b  Up 2 weeks  
analytics-alarm  kafka           contrail-external-kafka                running  971cdb4f3414  Up 2 weeks  
analytics-alarm  nodemgr         contrail-nodemgr                       running  bf24afaebe22  Up 2 weeks  
analytics-alarm  zookeeper       contrail-external-zookeeper            running  36c57248bd92  Up 2 weeks  
analytics-snmp   nodemgr         contrail-nodemgr                       running  99397c15f953  Up 2 weeks  
analytics-snmp   snmp-collector  contrail-analytics-snmp-collector      running  d3ab1daf67f5  Up 2 weeks  
analytics-snmp   topology        contrail-analytics-snmp-topology       running  e1a393eeab4d  Up 2 weeks  
config           api             contrail-controller-config-api         running  c601ea4634a9  Up 2 weeks  
config           device-manager  contrail-controller-config-devicemgr   running  ef027db26e38  Up 2 weeks  
config           nodemgr         contrail-nodemgr                       running  a32fd74dedfb  Up 2 weeks  
config           schema          contrail-controller-config-schema      running  29acf3879961  Up 2 weeks  
config           svc-monitor     contrail-controller-config-svcmonitor  running  79649f642f7e  Up 2 weeks  
config-database  cassandra       contrail-external-cassandra            running  33f795b40dfb  Up 2 weeks  
config-database  nodemgr         contrail-nodemgr                       running  1ea729eed345  Up 2 weeks  
config-database  rabbitmq        contrail-external-rabbitmq             running  06cf3f5ee443  Up 2 weeks  
config-database  zookeeper       contrail-external-zookeeper            running  a4cccd992817  Up 2 weeks  
control          control         contrail-controller-control-control    running  c1322e584f77  Up 2 weeks  
control          dns             contrail-controller-control-dns        running  153697a1a8b4  Up 2 weeks  
control          named           contrail-controller-control-named      running  8cd49cb03a01  Up 2 weeks  
control          nodemgr         contrail-nodemgr                       running  aa41060e96eb  Up 2 weeks  
database         cassandra       contrail-external-cassandra            running  724bf10e8f9f  Up 2 weeks  
database         nodemgr         contrail-nodemgr                       running  cb84c3da076b  Up 2 weeks  
database         query-engine    contrail-analytics-query-engine        running  7e35117e2b4e  Up 2 weeks  
webui            job             contrail-controller-webui-job          running  0450298dde21  Up 2 weeks  
webui            web             contrail-controller-webui-web          running  d36a4a833063  Up 2 weeks  

== Contrail control ==
control: active
nodemgr: active
named: active
dns: active

== Contrail analytics-alarm ==
nodemgr: active
kafka: active
alarm-gen: active

== Contrail database ==
nodemgr: active
query-engine: active
cassandra: active

== Contrail analytics ==
nodemgr: active
api: active
collector: active

== Contrail config-database ==
nodemgr: active
zookeeper: active
rabbitmq: active
cassandra: active

== Contrail webui ==
web: active
job: active

== Contrail analytics-snmp ==
snmp-collector: active
nodemgr: active
topology: active

== Contrail config ==
svc-monitor: active
nodemgr: active
device-manager: active
api: active
schema: active
overcloud-contrailcontroller-0 | SUCCESS | rc=0 >>
Pod              Service         Original Name                          State    Id            Status      
analytics        api             contrail-analytics-api                 running  e567b69923d1  Up 2 weeks  
analytics        collector       contrail-analytics-collector           running  670f7b91d229  Up 2 weeks  
analytics        nodemgr         contrail-nodemgr                       running  c277297be9d3  Up 2 weeks  
analytics        redis           contrail-external-redis                running  c8ed4d184581  Up 2 weeks  
analytics-alarm  alarm-gen       contrail-analytics-alarm-gen           running  8b973df1cf94  Up 2 weeks  
analytics-alarm  kafka           contrail-external-kafka                running  5dd8e1daac69  Up 2 weeks  
analytics-alarm  nodemgr         contrail-nodemgr                       running  5cdfa84ea59d  Up 2 weeks  
analytics-alarm  zookeeper       contrail-external-zookeeper            running  b72745c6ff01  Up 2 weeks  
analytics-snmp   nodemgr         contrail-nodemgr                       running  acc8034cf01f  Up 2 weeks  
analytics-snmp   snmp-collector  contrail-analytics-snmp-collector      running  553f6248858f  Up 2 weeks  
analytics-snmp   topology        contrail-analytics-snmp-topology       running  452125ea2eb1  Up 2 weeks  
config           api             contrail-controller-config-api         running  3c8aa51687d7  Up 2 weeks  
config           device-manager  contrail-controller-config-devicemgr   running  bdd808d4798d  Up 2 weeks  
config           nodemgr         contrail-nodemgr                       running  083e0b2d5791  Up 2 weeks  
config           schema          contrail-controller-config-schema      running  935cb2ea4208  Up 2 weeks  
config           svc-monitor     contrail-controller-config-svcmonitor  running  7d0e927d140c  Up 2 weeks  
config-database  cassandra       contrail-external-cassandra            running  28bf628ff52e  Up 2 weeks  
config-database  nodemgr         contrail-nodemgr                       running  189676870be9  Up 2 weeks  
config-database  rabbitmq        contrail-external-rabbitmq             running  40cf7c3329a4  Up 2 weeks  
config-database  zookeeper       contrail-external-zookeeper            running  881329bf656b  Up 2 weeks  
control          control         contrail-controller-control-control    running  0fe85ffbdfd8  Up 2 weeks  
control          dns             contrail-controller-control-dns        running  5964214e1ecc  Up 2 weeks  
control          named           contrail-controller-control-named      running  98c1f299bf73  Up 2 weeks  
control          nodemgr         contrail-nodemgr                       running  c598626ffeb0  Up 2 weeks  
database         cassandra       contrail-external-cassandra            running  51a81b831952  Up 2 weeks  
database         nodemgr         contrail-nodemgr                       running  90fe55cc44e8  Up 2 weeks  
database         query-engine    contrail-analytics-query-engine        running  7bf7ea9774c7  Up 2 weeks  
webui            job             contrail-controller-webui-job          running  6942525d38d5  Up 2 weeks  
webui            web             contrail-controller-webui-web          running  9bbf5a6e88bf  Up 2 weeks  

== Contrail control ==
control: active
nodemgr: active
named: active
dns: active

== Contrail analytics-alarm ==
nodemgr: active
kafka: active
alarm-gen: active

== Contrail database ==
nodemgr: active
query-engine: active
cassandra: active

== Contrail analytics ==
nodemgr: active
api: active
collector: active

== Contrail config-database ==
nodemgr: active
zookeeper: active
rabbitmq: active
cassandra: active

== Contrail webui ==
web: active
job: active

== Contrail analytics-snmp ==
snmp-collector: active
nodemgr: active
topology: active

== Contrail config ==
svc-monitor: backup
nodemgr: active
device-manager: backup
api: active
schema: backup
overcloud-contrailcontroller-1 | SUCCESS | rc=0 >>
Pod              Service         Original Name                          State    Id            Status      
analytics        api             contrail-analytics-api                 running  64da8cd52a27  Up 2 weeks  
analytics        collector       contrail-analytics-collector           running  a919f338b151  Up 2 weeks  
analytics        nodemgr         contrail-nodemgr                       running  b9bcb78ed1d4  Up 2 weeks  
analytics        redis           contrail-external-redis                running  7d9696605fa8  Up 2 weeks  
analytics-alarm  alarm-gen       contrail-analytics-alarm-gen           running  bbd8b9f06094  Up 2 weeks  
analytics-alarm  kafka           contrail-external-kafka                running  4d01378f6389  Up 2 weeks  
analytics-alarm  nodemgr         contrail-nodemgr                       running  6214b38d4718  Up 2 weeks  
analytics-alarm  zookeeper       contrail-external-zookeeper            running  18d43c8701d3  Up 2 weeks  
analytics-snmp   nodemgr         contrail-nodemgr                       running  4392ae739915  Up 2 weeks  
analytics-snmp   snmp-collector  contrail-analytics-snmp-collector      running  5dee885fbb34  Up 2 weeks  
analytics-snmp   topology        contrail-analytics-snmp-topology       running  912a53cf666d  Up 2 weeks  
config           api             contrail-controller-config-api         running  9d8bedb2ceee  Up 2 weeks  
config           device-manager  contrail-controller-config-devicemgr   running  a2782b5ca3b9  Up 2 weeks  
config           nodemgr         contrail-nodemgr                       running  e2f3dcdc79a2  Up 2 weeks  
config           schema          contrail-controller-config-schema      running  2f27226e4886  Up 2 weeks  
config           svc-monitor     contrail-controller-config-svcmonitor  running  d9d4368c40fd  Up 2 weeks  
config-database  cassandra       contrail-external-cassandra            running  03ba4f360e4c  Up 2 weeks  
config-database  nodemgr         contrail-nodemgr                       running  63f1f9699675  Up 2 weeks  
config-database  rabbitmq        contrail-external-rabbitmq             running  258f8f088740  Up 2 weeks  
config-database  zookeeper       contrail-external-zookeeper            running  a2ac46a4f2f4  Up 2 weeks  
control          control         contrail-controller-control-control    running  26b03f6a6c83  Up 2 weeks  
control          dns             contrail-controller-control-dns        running  89c603074214  Up 2 weeks  
control          named           contrail-controller-control-named      running  1cb751e1e1d8  Up 2 weeks  
control          nodemgr         contrail-nodemgr                       running  4d3ac65be878  Up 2 weeks  
database         cassandra       contrail-external-cassandra            running  2b760a08582d  Up 2 weeks  
database         nodemgr         contrail-nodemgr                       running  eaf702021d85  Up 2 weeks  
database         query-engine    contrail-analytics-query-engine        running  d661815506ba  Up 2 weeks  
webui            job             contrail-controller-webui-job          running  a6956b788a3d  Up 2 weeks  
webui            web             contrail-controller-webui-web          running  5a8f124313b2  Up 2 weeks  

== Contrail control ==
control: active
nodemgr: active
named: active
dns: active

== Contrail analytics-alarm ==
nodemgr: active
kafka: active
alarm-gen: active

== Contrail database ==
nodemgr: active
query-engine: active
cassandra: active

== Contrail analytics ==
nodemgr: active
api: active
collector: active

== Contrail config-database ==
nodemgr: active
zookeeper: active
rabbitmq: active
cassandra: active

== Contrail webui ==
web: active
job: active

== Contrail analytics-snmp ==
snmp-collector: active
nodemgr: active
topology: active

== Contrail config ==
svc-monitor: backup
nodemgr: active
device-manager: backup
api: active
schema: backup
(undercloud) [stack@queensa ~]$ 

Note: The command collects information from all three controllers.