Get broken / INACTIVE ports
DB_NAME=neutron
DB_USER=neutron
DB_PASS=$(grep neutron_database_password /etc/kolla/passwords.yml | cut -d " " -f2)
mysql --host=${DB_HOST} --password=${DB_PASS} --port=6033 --user=${DB_USER} --database=${DB_NAME}
select port_id, host from ml2_port_bindings where status = 'INACTIVE';
select port_id, host from ml2_port_bindings where status = 'INACTIVE' and host = 'com3-dev';
select * from ml2_port_bindings where port_id = "65db0c73-1533-4c36-9fd4-79b5e4e9704c";
#select * from ml2_port_binding_levels where port_id = "65db0c73-1533-4c36-9fd4-79b5e4e9704c" \G
# debug
PORT_IDS=$(mysql --host=${DB_HOST} --password=${DB_PASS} --port=6033 --user=${DB_USER} --database=${DB_NAME} \
-se "select port_id from ml2_port_bindings where status = 'INACTIVE'")
echo ${PORT_IDS}
# get VMs
for PORT_ID in ${PORT_IDS}; do
echo ${PORT_ID}
openstack server show -c name -c "OS-EXT-SRV-ATTR:host" $(openstack port show -c device_id -f value ${PORT_ID})
doneRecreate port
SERVER_ID=f4b8828d-a717-49f6-8ad3-7b0bb1921123
nova interface-list ${SERVER_ID}
PORT_ID=57944199-014c-4907-9d6e-1fb233151234
# debug
openstack port show ${PORT_ID} -c name -c network_id -c mac_address -c fixed_ips -c security_group_ids -c project_id -c device_idget port data