introspect-cli
TungstenFabric の control には多数のルートが登録されており、これらを cli で確認する方法を探していたのだが、以下のツールで実施することが出来たので、出力例を記載しておく。
https://github.com/vcheny/contrail-introspect-cli
特に
./ist.py ctr nei ./ist.py ctr route summary ./ist.py ctr route tables ./ist.py ctr route show [-t table] [-r] [prefix] ./ist.py vr xmpp ./ist.py vr vn ./ist.py vr vrf ./ist.py vr route ./ist.py (対応するコンポーネント) status
あたりは、troubleshoot に活用できそうである。
インストール方法
※ controller ノード上で実施 pip install lxml prettytable git clone https://github.com/vcheny/contrail-introspect-cli.git cd contrail-introspect-cli
出力結果
共通: [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py -h usage: ist [-h] [--version] [--debug] [--host HOST] [--port PORT] {alarm_gen,analytics,cfg_api,cfg_disc,cfg_schema,cfg_svcmon,collector,ctr,dm,dns,nodemgr_analytics,nodemgr_cfg,nodemgr_ctr,nodemgr_db,nodemgr_vr,qe,vr} ... A script to make Contrail Introspect output CLI friendly. positional arguments: {alarm_gen,analytics,cfg_api,cfg_disc,cfg_schema,cfg_svcmon,collector,ctr,dm,dns,nodemgr_analytics,nodemgr_cfg,nodemgr_ctr,nodemgr_db,nodemgr_vr,qe,vr} alarm_gen contrail-alarm-gen analytics contrail-analytics-api cfg_api contrail-api cfg_disc contrail-discovery cfg_schema contrail-schema cfg_svcmon contrail-svc-monitor collector contrail-collector ctr contrail-control dm contrail-device-manager dns contrail-dns nodemgr_analytics contrail-analytics-nodemgr nodemgr_cfg contrail-config-nodemgr nodemgr_ctr contrail-control-nodemgr nodemgr_db contrail-database-nodemgr nodemgr_vr contrail-vrouter-nodemgr qe contrail-query-engine vr contrail-vrouter-agent optional arguments: -h, --help show this help message and exit --version Script version --debug Verbose mode --host HOST Introspect host address. Default: localhost --port PORT Introspect port number [root@ip-172-31-42-64 contrail-introspect-cli]# control: [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py ctr -h usage: ist ctr [-h] {status,cpu,trace,uve,nei,ri,route,mcast,bgp_stats,xmpp,ifmap,sc,config,rt} ... positional arguments: {status,cpu,trace,uve,nei,ri,route,mcast,bgp_stats,xmpp,ifmap,sc,config,rt} status Node/component status cpu CPU load info trace Sandesh trace buffer uve Sandesh UVE cache nei Show BGP/XMPPP neighbors ri Show routing instances route Show route info mcast Show multicast managers bgp_stats Show BGP server stats xmpp Show XMPP info ifmap Show IFMAP info sc Show ServiceChain info config Show related config info rt Show RtGroup info optional arguments: -h, --help show this help message and exit [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py ctr status module_id: contrail-control state: Functional description +-----------+-----------+---------------------+--------+----------------------------------+ | type | name | server_addrs | status | description | +-----------+-----------+---------------------+--------+----------------------------------+ | Collector | n/a | 172.31.42.64:8086 | Up | Established | | Database | Cassandra | 172.31.42.64:9041 | Up | Established Cassandra connection | | Database | RabbitMQ | 172.31.42.64:5673 | Up | RabbitMQ connection established | +-----------+-----------+---------------------+--------+----------------------------------+ [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py ctr nei +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+ | peer | peer_address | peer_asn | encoding | peer_type | state | send_state | flap_count | flap_time | +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+ | ip-172-31-18-221.local | 172.31.18.221 | 0 | XMPP | internal | Established | in sync | 0 | n/a | | ip-172-31-4-246.local | 172.31.4.246 | 0 | XMPP | internal | Established | in sync | 0 | n/a | +------------------------+---------------+----------+----------+-----------+-------------+------------+------------+-----------+ [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py ctr ri +--------------------------------------+----------+----------+-------------------------+------------------------+------------------+ | name | vn_index | vxlan_id | import_target | export_target | routing_policies | +--------------------------------------+----------+----------+-------------------------+------------------------+------------------+ | default-domain:default-project:__lin | 3 | 0 | target:64512:7999999 | | | | k_local__:__link_local__ | | | target:172.31.42.64:4 | | | | default-domain:default-project:dci- | 4 | 0 | target:64512:7999999 | target:64512:8000001 | | | network:__default__ | | | target:64512:8000001 | | | | | | | target:172.31.42.64:1 | | | | default-domain:default-project:dci- | 4 | 0 | target:64512:7999999 | target:64512:8000003 | | | network:dci-network | | | target:64512:8000003 | | | | | | | target:172.31.42.64:5 | | | | default-domain:default-project | 1 | 0 | target:64512:7999999 | target:64512:8000000 | | | :default-virtual-network:default- | | | target:64512:8000000 | | | | virtual-network | | | target:172.31.42.64:2 | | | | default-domain:default-project:ip- | 2 | 0 | | | | | fabric:__default__ | | | | | | | default-domain:default-project:ip- | 2 | 0 | target:64512:7999999 | target:64512:8000002 | | | fabric:ip-fabric | | | target:64512:8000002 | | | | | | | target:64512:8000004 | | | | | | | target:64512:8000005 | | | | | | | target:172.31.42.64:3 | | | | default-domain:k8s-default:k8s- | 5 | 0 | target:64512:7999999 | target:64512:8000004 | | | default-pod-network:k8s-default-pod- | | | target:64512:8000002 | | | | network | | | target:64512:8000004 | | | | | | | target:64512:8000005 | | | | | | | target:172.31.42.64:6 | | | | default-domain:k8s-default:k8s- | 6 | 0 | target:64512:7999999 | target:64512:8000005 | | | default-service-network:k8s-default- | | | target:64512:8000002 | | | | service-network | | | target:64512:8000004 | | | | | | | target:64512:8000005 | | | | | | | target:172.31.42.64:7 | | | +--------------------------------------+----------+----------+-------------------------+------------------------+------------------+ [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py ctr route -h usage: ist ctr route [-h] {summary,tables,show,static,aggregate} ... positional arguments: {summary,tables,show,static,aggregate} summary Show route summary tables List route table names show Show route static Show static routes aggregate Show aggregate routes optional arguments: -h, --help show this help message and exit [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py ctr route summary +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+ | name | prefixes | paths | primary_paths | secondary_paths | infeasible_paths | +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+ | default-domain:default- | 0 | 0 | 0 | 0 | 0 | | project:__link_local__:__link_local__.inet.0 | | | | | | | default-domain:default-project:dci- | 0 | 0 | 0 | 0 | 0 | | network:__default__.inet.0 | | | | | | | default-domain:default-project:dci-network:dci- | 0 | 0 | 0 | 0 | 0 | | network.inet.0 | | | | | | | default-domain:default-project:default-virtual- | 0 | 0 | 0 | 0 | 0 | | network:default-virtual-network.inet.0 | | | | | | | inet.0 | 0 | 0 | 0 | 0 | 0 | | default-domain:default-project:ip-fabric:ip- | 5 | 5 | 2 | 3 | 0 | | fabric.inet.0 | | | | | | | default-domain:k8s-default:k8s-default-pod-network | 5 | 5 | 2 | 3 | 0 | | :k8s-default-pod-network.inet.0 | | | | | | | default-domain:k8s-default:k8s-default-service- | 5 | 5 | 1 | 4 | 0 | | network:k8s-default-service-network.inet.0 | | | | | | +----------------------------------------------------+----------+-------+---------------+-----------------+------------------+ [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py ctr route tables name: default-domain:default-project:__link_local__:__link_local__.inet.0 name: default-domain:default-project:dci-network:__default__.inet.0 name: default-domain:default-project:dci-network:dci-network.inet.0 name: default-domain:default-project:default-virtual-network:default-virtual-network.inet.0 name: inet.0 name: default-domain:default-project:ip-fabric:ip-fabric.inet.0 name: default-domain:k8s-default:k8s-default-pod-network:k8s-default-pod-network.inet.0 name: default-domain:k8s-default:k8s-default-service-network:k8s-default-service-network.inet.0 [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py ctr route show -h usage: ist ctr route show [-h] [-f {inet,inet6,evpn,ermvpn,rtarget,inetvpn,l3vpn}] [-l LAST] [-d] [-r] [-p {BGP,XMPP,local,ServiceChain,Static}] [-v VRF] [-s SOURCE] [-t TABLE] [--longer_match] [--shorter_match] [prefix] positional arguments: prefix Show routes matching given prefix optional arguments: -h, --help show this help message and exit -f {inet,inet6,evpn,ermvpn,rtarget,inetvpn,l3vpn}, --family {inet,inet6,evpn,ermvpn,rtarget,inetvpn,l3vpn} Show routes for given family. -l LAST, --last LAST Show routes modified during last time period (e.g. 10s, 5m, 2h, or 5d) -d, --detail Display detailed output -r, --raw Display raw output in text -p {BGP,XMPP,local,ServiceChain,Static}, --protocol {BGP,XMPP,local,ServiceChain,Static} Show routes learned from given protocol -v VRF, --vrf VRF Show routes in given routing instance specified as fqn -s SOURCE, --source SOURCE Show routes learned from given source -t TABLE, --table TABLE Show routes in given table --longer_match Shows more specific routes --shorter_match Shows less specific routes [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py ctr route show -t default-domain:k8s-default:k8s-default-pod-network:k8s-default-pod-network.inet.0 default-domain:k8s-default:k8s-default-pod-network:k8s-default-pod-network.inet.0: 5 destinations, 5 routes (2 primary, 3 secondary, 0 infeasible) 10.47.255.251/32, age: 0:05:08.042661, last_modified: 2019-Apr-07 10:22:37.597451 [XMPP (interface)|ip-172-31-4-246.local] age: 0:05:08.045915, localpref: 200, nh: 172.31.4.246, encap: ['gre', 'udp'], label: 30, AS path: None 10.47.255.252/32, age: 0:05:11.002858, last_modified: 2019-Apr-07 10:22:34.637254 [XMPP (interface)|ip-172-31-4-246.local] age: 0:05:11.006508, localpref: 200, nh: 172.31.4.246, encap: ['gre', 'udp'], label: 25, AS path: None 10.96.0.10/32, age: 0:05:08.042742, last_modified: 2019-Apr-07 10:22:37.597370 [XMPP (interface)|ip-172-31-4-246.local] age: 0:05:08.046665, localpref: 200, nh: 172.31.4.246, encap: ['gre', 'udp'], label: 37, AS path: None 172.31.4.246/32, age: 0:06:28.376773, last_modified: 2019-Apr-07 10:21:17.263339 [XMPP (interface)|ip-172-31-4-246.local] age: 0:06:28.380937, localpref: 200, nh: 172.31.4.246, encap: ['gre', 'udp', 'native'], label: 16, AS path: None 172.31.18.221/32, age: 0:06:27.287767, last_modified: 2019-Apr-07 10:21:18.352345 [XMPP (interface)|ip-172-31-18-221.local] age: 0:06:27.292165, localpref: 200, nh: 172.31.18.221, encap: ['gre', 'udp', 'native'], label: 16, AS path: None [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py ctr xmpp conn +------------------------+---------+---------------------+-------------------+-------------+-----------------------+------------+-----------------------------+-----------+------------------+------------+ | name | deleted | remote_endpoint | local_endpoint | state | last_event | last_state | last_state_at | receivers | server_auth_type | dscp_value | +------------------------+---------+---------------------+-------------------+-------------+-----------------------+------------+-----------------------------+-----------+------------------+------------+ | ip-172-31-4-246.local | false | 172.31.4.246:34576 | 172.31.42.64:5269 | Established | xmsm::EvXmppKeepalive | Active | 2019-Apr-07 10:21:17.161634 | IFMap | NIL | 0 | | | | | | | | | | BGP | | | | ip-172-31-18-221.local | false | 172.31.18.221:39769 | 172.31.42.64:5269 | Established | xmsm::EvXmppKeepalive | Active | 2019-Apr-07 10:21:18.252562 | IFMap | NIL | 0 | | | | | | | | | | BGP | | | +------------------------+---------+---------------------+-------------------+-------------+-----------------------+------------+-----------------------------+-----------+------------------+------------+ vrouter: [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr -h Introspect Host: 172.31.4.246 usage: ist vr [-h] {status,cpu,trace,uve,intf,vn,vrf,route,sg,acl,hc,ifmap,baas,xmpp,xmpp-dns,stats,service,si,nh,vm,mpls,vrfassign,linklocal,vxlan,mirror} ... positional arguments: {status,cpu,trace,uve,intf,vn,vrf,route,sg,acl,hc,ifmap,baas,xmpp,xmpp-dns,stats,service,si,nh,vm,mpls,vrfassign,linklocal,vxlan,mirror} status Node/component status cpu CPU load info trace Sandesh trace buffer uve Sandesh UVE cache intf Show vRouter interfaces vn Show Virtual Network vrf Show VRF route Show routes sg Show Security Groups acl Show ACL info hc Health Check info ifmap IFMAP info baas Bgp As A Service info xmpp Show Agent XMPP connections (route&config) status xmpp-dns Show Agent XMPP connections (dns) status stats Show Agent stats service Service related info si Service instance info nh NextHop info vm VM info mpls MPLS info vrfassign VrfAssign info linklocal LinkLocal service info vxlan vxlan info mirror mirror info optional arguments: -h, --help show this help message and exit [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr status Introspect Host: 172.31.4.246 module_id: contrail-vrouter-agent state: Functional description +-----------+---------------------------+---------------------+--------+-------------+ | type | name | server_addrs | status | description | +-----------+---------------------------+---------------------+--------+-------------+ | XMPP | control-node:172.31.42.64 | 172.31.42.64:5269 | Up | OpenSent | | XMPP | dns-server:172.31.42.64 | 172.31.42.64:53 | Up | OpenSent | | Collector | n/a | 172.31.42.64:8086 | Up | Established | +-----------+---------------------------+---------------------+--------+-------------+ [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr intf Introspect Host: 172.31.4.246 +-------+----------------+--------+-------------------+---------------+---------------+---------+--------------------------------------+ | index | name | active | mac_addr | ip_addr | mdata_ip_addr | vm_name | vn_name | +-------+----------------+--------+-------------------+---------------+---------------+---------+--------------------------------------+ | 0 | eth0 | Active | n/a | n/a | n/a | n/a | n/a | | 1 | vhost0 | Active | 06:c2:b8:cd:fe:fc | 172.31.4.246 | 169.254.0.1 | n/a | default-domain:default-project:ip- | | | | | | | | | fabric | | 3 | tapeth0-1a3aed | Active | 02:c7:14:2f:38:59 | 10.47.255.252 | 169.254.0.3 | n/a | default-domain:k8s-default:k8s- | | | | | | | | | default-pod-network | | 4 | tapeth0-1a3bbd | Active | 02:c7:53:a3:fc:59 | 10.47.255.251 | 169.254.0.4 | n/a | default-domain:k8s-default:k8s- | | | | | | | | | default-pod-network | | 2 | pkt0 | Active | n/a | n/a | n/a | n/a | n/a | +-------+----------------+--------+-------------------+---------------+---------------+---------+--------------------------------------+ [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr vn Introspect Host: 172.31.4.246 +--------------------------------------+--------------------------------------+-------------------+-----------------+------------+----------+ | name | uuid | layer2_forwarding | ipv4_forwarding | enable_rpf | bridging | +--------------------------------------+--------------------------------------+-------------------+-----------------+------------+----------+ | default-domain:k8s-default:k8s- | 1ca95bc7-2c74-492f-9aa9-05e755752ee5 | false | true | true | false | | default-service-network | | | | | | | default-domain:k8s-default:k8s- | ab5a4cc8-1bce-4e68-a24a-72a0053cb711 | false | true | true | false | | default-pod-network | | | | | | +--------------------------------------+--------------------------------------+-------------------+-----------------+------------+----------+ [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr vrf Introspect Host: 172.31.4.246 +--------------------------------------+---------+---------+---------+-----------+----------+--------------------------------------+ | name | ucindex | mcindex | brindex | evpnindex | vxlan_id | vn | +--------------------------------------+---------+---------+---------+-----------+----------+--------------------------------------+ | default-domain:default-project:ip- | 0 | 0 | 0 | 0 | 0 | N/A | | fabric:__default__ | | | | | | | | default-domain:default-project:ip- | 1 | 1 | 1 | 1 | 2 | default-domain:default-project:ip- | | fabric:ip-fabric | | | | | | fabric | | default-domain:k8s-default:k8s- | 2 | 2 | 2 | 2 | 5 | default-domain:k8s-default:k8s- | | default-pod-network:k8s-default-pod- | | | | | | default-pod-network | | network | | | | | | | | default-domain:k8s-default:k8s- | 3 | 3 | 3 | 3 | 6 | default-domain:k8s-default:k8s- | | default-service-network:k8s-default- | | | | | | default-service-network | | service-network | | | | | | | +--------------------------------------+---------+---------+---------+-----------+----------+--------------------------------------+ [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr route ## -v 0 (ip-fabric:__default__ の route が表示されている) Introspect Host: 172.31.4.246 0.0.0.0/0 [Local] pref:100 nh_index:0 , nh_type:None, nh_policy:, active_label:-1, vxlan_id:0 169.254.0.3/32 [LinkLocal] pref:100 to 2:c7:14:2f:38:59 via tapeth0-1a3aed, assigned_label:29, nh_index:26 , nh_type:interface, nh_policy:enabled, active_label:29, vxlan_id:0 169.254.0.4/32 [LinkLocal] pref:100 to 2:c7:53:a3:fc:59 via tapeth0-1a3bbd, assigned_label:21, nh_index:16 , nh_type:interface, nh_policy:enabled, active_label:21, vxlan_id:0 172.31.0.0/20 [LocalVmPort] pref:100 nh_index:14 , nh_type:resolve, nh_policy:disabled, active_label:-1, vxlan_id:0 172.31.0.1/32 [Local] pref:100 via 6:8f:fa:85:cf:16, nh_index:15 , nh_type:arp, nh_policy:disabled, active_label:-1, vxlan_id:0 172.31.0.2/32 [Local] pref:100 via 6:8f:fa:85:cf:16, nh_index:39 , nh_type:arp, nh_policy:disabled, active_label:-1, vxlan_id:0 172.31.4.246/32 [FabricRouteExport] pref:100 via vhost0, nh_index:10 , nh_type:receive, nh_policy:disabled, active_label:0, vxlan_id:0 172.31.18.221/32 [Local] pref:100 nh_index:0 , nh_type:None, nh_policy:, active_label:0, vxlan_id:0 224.0.0.0/8 [Local] pref:100 via vhost0, nh_index:11 , nh_type:receive, nh_policy:enabled, active_label:0, vxlan_id:0 [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr route -v 2 ## k8s-pod-network を表示 Introspect Host: 172.31.4.246 10.32.0.0/12 [Local] pref:100 nh_index:1 , nh_type:discard, nh_policy:disabled, active_label:-1, vxlan_id:0 10.47.255.251/32 [172.31.42.64] pref:200 to 2:c7:53:a3:fc:59 via tapeth0-1a3bbd, assigned_label:21, nh_index:16 , nh_type:interface, nh_policy:enabled, active_label:21, vxlan_id:0 [LocalVmPort] pref:200 to 2:c7:53:a3:fc:59 via tapeth0-1a3bbd, assigned_label:21, nh_index:16 , nh_type:interface, nh_policy:enabled, active_label:21, vxlan_id:0 10.47.255.252/32 [172.31.42.64] pref:200 to 2:c7:14:2f:38:59 via tapeth0-1a3aed, assigned_label:29, nh_index:26 , nh_type:interface, nh_policy:enabled, active_label:29, vxlan_id:0 [LocalVmPort] pref:200 to 2:c7:14:2f:38:59 via tapeth0-1a3aed, assigned_label:29, nh_index:26 , nh_type:interface, nh_policy:enabled, active_label:29, vxlan_id:0 10.47.255.253/32 [Local] pref:100 to 0:0:0:0:0:1 via pkt0, assigned_label:-1, nh_index:13 , nh_type:interface, nh_policy:enabled, active_label:-1, vxlan_id:0 10.47.255.254/32 [Local] pref:100 to 0:0:0:0:0:1 via pkt0, assigned_label:-1, nh_index:13 , nh_type:interface, nh_policy:enabled, active_label:-1, vxlan_id:0 10.96.0.1/32 [LinkLocal] pref:100 via vhost0, nh_index:11 , nh_type:receive, nh_policy:enabled, active_label:0, vxlan_id:0 10.96.0.10/32 [172.31.42.64] pref:200 via ['tapeth0-1a3bbd', 'tapeth0-1a3aed'], nh_index:45 , nh_type:ECMP Composite sub nh count: 2, nh_policy:enabled, active_label:-1, vxlan_id:0 172.31.4.246/32 [172.31.42.64] pref:200 to 6:c2:b8:cd:fe:fc via vhost0, assigned_label:16, nh_index:5 , nh_type:interface, nh_policy:enabled, active_label:16, vxlan_id:0 172.31.18.221/32 [172.31.42.64] pref:200 to 6:8f:fa:85:cf:16 via MPLSoUDP dip:172.31.18.221 sip:172.31.4.246 label:16, nh_index:35 , nh_type:tunnel, nh_policy:disabled, active_label:16, vxlan_id:0 [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr sg Introspect Host: 172.31.4.246 +-----------+---------+--------------------------------------+----------+--------------------------------------+--------------------------------------+ | ref_count | sg_id | sg_uuid | acl_uuid | egress_acl_uuid | ingress_acl_uuid | +-----------+---------+--------------------------------------+----------+--------------------------------------+--------------------------------------+ | 2 | 8000005 | 20bb4785-6cd2-43c2-8160-7fbfb1c18e1d | n/a | 2d7ab4e6-2758-441b-8743-2df5d9eb4ab8 | 024deaeb-5f79-4268-82b0-595e609d5c28 | +-----------+---------+--------------------------------------+----------+--------------------------------------+--------------------------------------+ [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr acl Introspect Host: 172.31.4.246 +--------------------------------------+--------------------------------------+-------------+ | uuid | name | dynamic_acl | +--------------------------------------+--------------------------------------+-------------+ | 024deaeb-5f79-4268-82b0-595e609d5c28 | default-domain:k8s-kube-system:k8s- | false | | | kube-system-default-sg:ingress- | | | | access-control-list | | | 11d8294f-e049-42b9-a0e6-e64eb036fd5f | default-domain:k8s-default:k8s- | false | | | default-service-network:k8s-default- | | | | service-network | | | 21deedf2-2c26-4897-b5a7-b5a0ca060532 | default-domain:k8s-default:k8s- | false | | | default-pod-network:k8s-default-pod- | | | | network | | | 2d7ab4e6-2758-441b-8743-2df5d9eb4ab8 | default-domain:k8s-kube-system:k8s- | false | | | kube-system-default-sg:egress- | | | | access-control-list | | | b4e48fd4-e75d-4989-bc25-c55a99a998a8 | default-policy-management:k8s- | false | | | denyall | | | c5552c5f-f588-41f9-bcfd-62799e8483b0 | default-policy-management:k8s- | false | | | Ingress | | | edc2d263-d0f1-4f0d-ad39-0570153bc674 | default-policy-management:k8s- | false | | | allowall | | | f527d50b-5f0a-4aa3-8607-7514cb96b30f | default-domain:default-project:ip- | false | | | fabric:ip-fabric | | +--------------------------------------+--------------------------------------+-------------+ [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr xmpp Introspect Host: 172.31.4.246 +---------------+-------------+-------------------------------------+-------------------+----------------+------------+-----------+ | controller_ip | state | peer_name | peer_address | cfg_controller | flap_count | flap_time | +---------------+-------------+-------------------------------------+-------------------+----------------+------------+-----------+ | 172.31.42.64 | Established | network-control@contrailsystems.com | 172.31.42.64:5269 | Yes | 0 | n/a | +---------------+-------------+-------------------------------------+-------------------+----------------+------------+-----------+ [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr xmpp-dns Introspect Host: 172.31.4.246 +-------------------+-------------+---------------------------------+-------------------+------------+-----------------------------+ | dns_controller_ip | state | peer_name | peer_address | flap_count | flap_time | +-------------------+-------------+---------------------------------+-------------------+------------+-----------------------------+ | 172.31.42.64 | Established | network-dns@contrailsystems.com | 172.31.42.64:8093 | 0 | 1970-Jan-01 00:00:54.080512 | +-------------------+-------------+---------------------------------+-------------------+------------+-----------------------------+ [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr stats Introspect Host: 172.31.4.246 IpcStatsResp ipc_in_msgs: 0 ipc_out_msgs: 0 PktTrapStatsResp exceptions: 1175 invalid_agent_hdr: 0 invalid_interface: 8 no_handler: 0 pkt_dropped: 8 pkt_fragments_dropped: 0 FlowStatsResp flow_active: 60 flow_created: 1079 flow_aged: 1019 flow_drop_due_to_max_limit: 0 flow_drop_due_to_linklocal_limit: 0 flow_max_system_flows: 629760 flow_max_vm_flows: 0 XmppStatsInfo ip: 172.31.42.64 in_msgs: 43 out_msgs: 75 reconnect: 1 config_in_msgs: 22 SandeshStatsResp sandesh_in_msgs: 0 sandesh_out_msgs: 0 sandesh_http_sessions: 0 sandesh_reconnects: 0 ShowIFMapAgentStatsResp node_updates_processed: 75 node_deletes_processed: 0 link_updates_processed: 88 link_deletes_processed: 0 node_update_parse_errors: 0 link_update_parse_errors: 0 node_delete_parse_errors: 0 link_delete_parse_errors: 0 [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr service Introspect Host: 172.31.4.246 PktStats total_rcvd: 1183 dhcp_rcvd: 0 arp_rcvd: 626 dns_rcvd: 4 icmp_rcvd: 0 flow_rcvd: 545 dropped: 0 total_sent: 952 dhcp_sent: 0 arp_sent: 948 dns_sent: 4 icmp_sent: 0 dhcp_q_threshold_exceeded: 0 arp_q_threshold_exceeded: 0 dns_q_threshold_exceeded: 0 icmp_q_threshold_exceeded: 0 flow_q_threshold_exceeded: 0 mac_learning_msg_rcvd: 0 DhcpStats dhcp_discover: 0 dhcp_request: 0 dhcp_inform: 0 dhcp_decline: 0 dhcp_other: 0 dhcp_errors: 0 offers_sent: 0 acks_sent: 0 nacks_sent: 0 relay_request: 0 relay_response: 0 ArpStats arp_entries: 2 arp_requests: 5 arp_replies: 624 arp_gratuitous: 0 arp_resolved: 2 arp_max_retries_exceeded: 0 arp_errors: 0 arp_invalid_packets: 0 arp_invalid_interface: 0 arp_invalid_vrf: 0 arp_invalid_address: 0 DnsStats dns_resolver 172.31.42.64 dscp: 0 dns_requests: 4 dns_resolved: 0 dns_retransmit_reqs: 0 dns_unsupported: 0 dns_failures: 4 dns_drops: 0 IcmpStats icmp_gw_ping: 0 icmp_gw_ping_err: 0 icmp_drop: 0 MetadataResponse metadata_server_port: 8097 metadata_requests: 0 metadata_responses: 0 metadata_proxy_sessions: 0 metadata_internal_errors: 0 [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr vm Introspect Host: 172.31.4.246 +--------------------------------------+----------------+ | uuid | drop_new_flows | +--------------------------------------+----------------+ | 1a3aedb4-591e-11e9-9fb1-0e78d1b55f1c | false | | 1a3bbd2e-591e-11e9-9fb1-0e78d1b55f1c | false | +--------------------------------------+----------------+ [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py --host 172.31.4.246 vr linklocal Introspect Host: 172.31.4.246 +--------------------------------------+----------------------+------------------------+-------------------+----------------+---------------+ | linklocal_service_name | linklocal_service_ip | linklocal_service_port | ipfabric_dns_name | ipfabric_ip | ipfabric_port | +--------------------------------------+----------------------+------------------------+-------------------+----------------+---------------+ | default-domain-k8s-default- | 10.96.0.1 | 443 | n/a | 172.31.42.64 | 6443 | | kubernetes-443 | | | | | | +--------------------------------------+----------------------+------------------------+-------------------+----------------+---------------+ [root@ip-172-31-42-64 contrail-introspect-cli]# ※ nh,mpls,vrfassign,vxlan,mirror は、対応する cli とほぼ同じだったので、割愛 その他 (collector, schema-transformer, svc-monitor 以外は status, cpu, trace, uve で共通なので、省略): [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py collector -h usage: ist collector [-h] {status,cpu,trace,uve,server,redis} ... positional arguments: {status,cpu,trace,uve,server,redis} status Node/component status cpu CPU load info trace Sandesh trace buffer uve Sandesh UVE cache server Show collector server info redis Show redis server UVE info optional arguments: -h, --help show this help message and exit [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py cfg_schema -h usage: ist cfg_schema [-h] {status,cpu,trace,uve,vn,ri,sc,object} ... positional arguments: {status,cpu,trace,uve,vn,ri,sc,object} status Node/component status cpu CPU load info trace Sandesh trace buffer uve Sandesh UVE cache vn List Virtual Networks ri List Routing Instances sc List Service Chains object List Schema-transformer Ojbects optional arguments: -h, --help show this help message and exit [root@ip-172-31-42-64 contrail-introspect-cli]# [root@ip-172-31-42-64 contrail-introspect-cli]# ./ist.py cfg_svcmon -h usage: ist cfg_svcmon [-h] {status,cpu,trace,uve,si} ... positional arguments: {status,cpu,trace,uve,si} status Node/component status cpu CPU load info trace Sandesh trace buffer uve Sandesh UVE cache si List service instances optional arguments: -h, --help show this help message and exit [root@ip-172-31-42-64 contrail-introspect-cli]#