Create neutron probe

Install crudini

docker exec -ti -u root neutron_l3_agent apt update
docker exec -ti -u root neutron_l3_agent apt install -y crudini

Create configuration

docker exec -ti neutron_l3_agent bash
umask 077
cat /etc/neutron/neutron.conf > /etc/neutron/debug.ini
crudini --merge /etc/neutron/debug.ini < /etc/neutron/l3_agent.ini

Export credentials

unset HISTFILE
# cat /etc/kolla/admin-openrc.sh
# paste export OS_XXX

Get network ID

SERVER_ID=074e2a72-9bd7-488f-af3d-f45f3bc0b6e7
 
PORT_ID=$(openstack port list --server ${SERVER_ID} -c id -f value)
openstack port show ${PORT_ID} -c network_id -f value

Create probe

neutron-debug --config-file /etc/neutron/debug.ini probe-create ${NETWORK_ID}

Get probe port ID

openstack port list --device-owner network:probe -c id -c binding_host_id -c fixed_ips -c network_id

Test probe (optional)

neutron-debug --config-file /etc/neutron/debug.ini probe-exec ${PROBE_PORT_ID} "ip -br a"

Connect to IP namespace on control node

# list probe namespaces
ip netns | grep qprobe
 
# connect into IP namespace
ip netns exec qprobe-${PROBE_PORT_ID} bash

Test

neutron-debug probe-exec <probe_ID> dhcping <VM_MAC address> -s <IP of DHCP server>

Delete probe

# delete specific probe
neutron-debug --config-file /etc/neutron/debug.ini probe-delete ${PROBE_PORT_ID}
 
# deldete all probes
neutron-debug --config-file /etc/neutron/debug.ini probe-clear

Links
https://docs.openstack.org/ocata/cli-reference/neutron-debug.html