Wanted to remove a compute node from the openstack setup.
Stop the services in the compute node
service nova-compute stop service neutron-linuxbridge-agent stop # Not sure about the need for stopping the following but did it as I had planned to re-install service lvm2-lvmetad stop service libvirtd stop service lxcfs stop service tgt stop
On the contoller node
. admin-openrc openstack compute service list
Note down the ID against the compute node which needs to be removed
openstack compute service delete <noted-down-id> openstack network agent list
Note down the UUID against the network agent associated with the compute host
openstack network agent delete <noted-uuid>
When checking services tables in nova database, found the entry to it was not listed with openstack commands. So removed manually :
use nova delete from services where host="compute1.xxxxxx.net"