Delete stale entries in Zookeeper - ganeshahv/Contrail_SRE GitHub Wiki
Thanks to Curtis([email protected]) for this info
Contrail uses Zookeeper to lock certain resources such as assigned IP addresses.
To delete stale/locked entries in zk, first, connect to one of the Contrail Controllers.
Then execute zkCli.sh in the contrail_config_zookeeper container and connect to the server’s address on port 2181
sudo docker exec -it contrail_config_zookeeper zkCli.sh -server <controller_IP>:2181
From the Zookeeper client prompt, you can take a look at the subnets with assignments:
[zk: 172.22.255.107:2181(CONNECTED) 0] ls /api-server/subnets
[default-domain:admin:test-network:10.99.87.0]
And you can see what addresses for those subnets have been assigned:
[zk: 172.22.255.107:2181(CONNECTED) 1] ls /api-server/subnets/default-domain:admin:test-network:10.99.87.0/24`
[0174282499, 0174282500]
The numbers 0174282499 and 0174282500 are the decimal number representation of the IP addresses 10.99.87.3 and 10.99.87.4.
You should be able to delete an unnecessary entry like this:
delete /api-server/subnets/default-domain:admin:test-network:10.99.87.0/24/0174282499