Sometimes when playing in the Contrail GUI (eg. with EVPN-VXLAN settings via the Router object) you might trigger some problems with the objects in the internal contrail api database and then end up in an inconsistent state. This article aims at showing a simple way of cleaning that one up (in my case changing the VNI triggered a bug).

Go into the contrail api docker container. (docker exec -it /bin/bash)

#cleans up DB or Zookeeper (unique ID generator/storage) issues
(config-api)[root@overcloud3um-cc-0 /]$ python ./usr/lib/python2.7/site-packages/vnc_cfg_api_server/db_manage.py --api-conf /etc/contrail/contrail-api.conf check

#CLEAN the entries, heal = fix any broken references as a result

(config-api)[root@overcloud3um-cc-0 /]$ python ./usr/lib/python2.7/site-packages/vnc_cfg_api_server/db_manage.py --api-conf /etc/contrail/contrail-api.conf --execute clean

(config-api)[root@overcloud3um-cc-0 /]$ python ./usr/lib/python2.7/site-packages/vnc_cfg_api_server/db_manage.py --api-conf /etc/contrail/contrail-api.conf --execute heal