OpenStack: Debug DHCP

# get HIGH lease not found 
for NODE in $(openstack compute service list --service nova-scheduler -c Host -f value); do
    echo ${NODE}
    ssh ${NODE} cat /var/lib/docker/volumes/kolla_logs/_data/neutron/dnsmasq.log | grep "lease not found" | grep Sep | awk '{print $1, $2}' | uniq -c | awk '$1 > 100 {print}'
    echo
done
 
 
# many dhcp requests
for NODE in $(openstack compute service list --service nova-scheduler -c Host -f value); do
    echo "NODE: ${NODE}"
 
    OUTPUT=$(ssh ${NODE} cat /var/lib/docker/volumes/kolla_logs/_data/neutron/dnsmasq.log | grep Sep | awk '/DHCPREQUEST/ {print $7}' | sort | uniq -c | awk '$1 > 100 {print $2}')
    for MAC in ${OUTPUT}; do
        echo "MAC: ${MAC}"
 
        PORT_ID=$(openstack port list --mac-address ${MAC} -c id -f value)
        echo "PORT: ${PORT_ID}"
 
        SERVER_ID=$(openstack port show ${PORT_ID} -c device_id -f value)
        echo "SERVER: ${SERVER_ID}"
 
        echo $(openstack server show ${SERVER_ID} -c addresses -c name -c id -c status -f value | paste - - - -)
 
        echo
    done
    echo
done