OpenStack: control node

Decommision control node
https://review.opendev.org/plugins/gitiles/openstack/kolla-ansible/+/refs/changes/85/758085/1/doc/source/user/adding-and-removing-hosts.rst

# Migrage VMs
SOURCE_NODE=ctl2-dev
openstack server list --all --host ${SOURCE_NODE}
 
# Disable DHCP agents
SOURCE_NODE=ctl2-dev
TARGET_NODE=ctl1-dev
SOURCE_DHCP_ID=$(openstack network agent list --host ${SOURCE_NODE} --agent-type dhcp -f value -c ID)
TARGET_SOURCE_DHCP_ID=$(openstack network agent list --host ${TARGET_NODE} --agent-type dhcp -f value -c ID)
openstack network list --agent $SOURCE_DHCP_ID -f value -c ID | while read network; do
    openstack network agent remove network $SOURCE_DHCP_ID $network --dhcp
    openstack network agent add network $TARGET_SOURCE_DHCP_ID $network --dhcp
done
 
 
# Network
openstack network agent list --host ${SOURCE_NODE} -c ID -f value | xargs -i openstack network agent set --disable {}
openstack network agent list --host ${SOURCE_NODE} -c ID -f value | xargs -i openstack network agent delete {}
 
 
# Compute
openstack compute service list --host ${SOURCE_NODE} -c ID -f value  | xargs -i openstack compute set --disable {}
openstack compute service list --host ${SOURCE_NODE} -c ID -f value  | xargs -i openstack compute service delete {}
 
 
# Volme
openstack volume service list --host ${SOURCE_NODE}
openstack volume service set --disable ${SOURCE_NODE} cinder-scheduler
openstack volume service set --disable ${SOURCE_NODE} cinder-backup
openstack volume service set --disable ${SOURCE_NODE} cinder-volume
openstack volume service set --disable ctl2-dev@ceph1-ec-1  cinder-volume
 
 
# ssh ${COMPUTE_HOST} docker exec -t neutron_openvswitch_agent neutron-ovs-cleanup