Openstack: Debug networking

Video: OpenStack Neutron Packet Walkthrough (DVR) by David Mahler
https://www.youtube.com/watch?v=7IXEtUEZslg

SERVER_ID=11111111-2222-3333-4444-555555555555
 
nova interface-list ${SERVER_ID}
 
PORT_TOKEN=$(nova interface-list ${SERVER_ID} | grep ACTIVE | cut -d "|" -f3 | cut -d"-" -f1)
echo PORT_TOKEN=${PORT_TOKEN}
 
COMPUTE_NODE=$(openstack server show -c "OS-EXT-SRV-ATTR:hypervisor_hostname" -f value ${SERVER_ID})
echo ${COMPUTE_NODE}
 
ssh ${COMPUTE_NODE} brctl show | grep ${PORT_TOKEN}
TAP_DEVICE=$(ssh ${COMPUTE_NODE} brctl show | grep ${PORT_TOKEN} | grep tap)
 
TAP_DEVICE=$(ssh ${COMPUTE_NODE} brctl show | grep ${PORT_TOKEN} | grep tap)
echo ${TAP_DEVICE}
 
# second console
echo tcpdump -i ${TAP_DEVICE} -n -e icmp
ssh ${COMPUTE_NODE}
 
 
 
# 3th console
ssh ${COMPUTE_NODE}
iptables -S | grep o${PORT_TOKEN} | grep ${PORT_TOKEN}
# todo:
iptables -S neutron-openvswi-s${PORT_TOKEN}-f
 
iptables -S neutron-openvswi-sg-chain | grep #${PORT_TOKEN}
 
docker exec -it openvswitch_vswitchd bash
ovs-vsctl show
 
ovs-vsctl show | grep -U1 ${PORT_TOKEN}
 
# NORMAL missiong
watch -n .5 "ovs-ofctl dump-flows br-int table=0 | grep -v n_packets=0"
 
 
ovs-appctl -t /var/run/openvswitch/ovs-vswitchd.*.ctl fdb/show br-int | egrep "MAC|fa:11:22:33:44:55"
 
ovs-ofctl show br-int | grep 293 -A5
 
brctl show | grep qvo${PORT_TOKEN}-fb

Notes

docker exec -it openvswitch_vswitchd ovs-vsctl show | grep -C1 761d5c98
 
ovsdb-client dump | grep 22153bd5-14fb-4679-bc83-e2a244b3dd10
 
ssh ewos1-ctl4-prod ip netns | grep 8dc0f285
ssh ewos1-ctl6-prod ip netns | grep 8dc0f285
 
ip netns exec qdhcp-8dc0f285-613c-40a7-ac72-c83ffdc26a93 bash
 
cat /var/lib/docker/volumes/kolla_logs/_data/neutron/dnsmasq.log | grep aa:bb:3e:7b:44:cb
 
docker exec -it openvswitch_vswitchd bash
watch -n .5  "ovsdb-client dump | grep 22153bd5-14fb-4679-bc83-e2a244b3dd10 | cut -d '{' -f8"
 
(openvswitch-vswitchd)[root@com5-dev /]# ovsdb-client dump | grep 22153bd5-14fb-4679-bc83-e2a244b3dd10 | cut -d '{' -f8