Description

Starting from Contrail 2011 release, executing vrouter command line utilities in vrouter-agent container does not work.

Symptoms

root@hp5 ~]# docker exec -it vrouter_vrouter-agent_1 bash 
(vrouter-agent)[root@hp5 /]$ vrf get 65535
bash: vrf: command not found
(vrouter-agent)[root@hp5 /]$ vrfstats --dump
bash: vrfstats: command not found
(vrouter-agent)[root@hp5 /]$ vrfstats --get 0
bash: vrfstats: command not found

Solution

All vrouter utilities are executed in the contrail-tools container. 

On your computer, enter the 'contrail-tools' command to login to the container and enter the commands.

(contrail-tools)[root@hp6 /]$ flow -l
Flow table(size 161218560, entries 629760)

(contrail-tools)[root@hp6 /]$ vrfstats --get 0
Vrf: 0
Discards 0, Resolves 0, Receives 89878, L2 Receives 0, Vrf Translates 0, Unknown Unicast Floods 0
Ecmp Composites 0, L2 Mcast Composites 0, Fabric Composites 0, Encap Composites 0, Evpn Composites 0
Udp Tunnels 0, Udp Mpls Tunnels 0, Gre Mpls Tunnels 0, Vxlan Tunnels 0, Pbb Tunnels 0, Mpls over Mpls Tunnels 0
L2 Encaps 0, Encaps 48954
GROs 0, Diags 0

Note: Once you exit, the container will be removed.