Ask Your Question

Revision history [back]

On your controller node/network node run ip netns list you are looking for something that looks like your router UUID with qrouter- prefix in front of it. Once you've found the router's network namespace you can execute commands inside of it. Try the following to get a better understanding and see if your neturon metadata proxy service is running.

This shows you the redirect rule 169.254.169.254 on port 80 , your port may differ from mine.

[root@node-1 ~]# ip netns exec qrouter-cc476665-254e-4f16-9ea4-498f63d41769 iptables-save  | grep -i redirect
-A neutron-l3-agent-PREROUTING -d 169.254.169.254/32 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8775

[root@node-1 ~]# ip netns exec qrouter-cc476665-254e-4f16-9ea4-498f63d41769 netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:8775                0.0.0.0:*                   LISTEN      22142/python

You can execute the curl command directly from the router

ip netns exec qrouter-cc476665-254e-4f16-9ea4-498f63d41769 curl http://169.254.169.254

Now you know what port it's redirecting on and with the netstat command you know the PID.

This gives you a location of the log file, the pid, and port all good info.

  [root@node-1 ~]# ps -f --pid 22142 | fold -s -w 82
    UID        PID  PPID  C STIME TTY          TIME CMD
    root     22142     1  0 18:47 ?        00:00:00 /usr/bin/python
    /usr/bin/neutron-ns-metadata-proxy
    --pid_file=/var/lib/neutron/external/pids/cc476665-254e-4f16-9ea4-498f63d41769.pid
     --metadata_proxy_socket=/var/lib/neutron/metadata_proxy
    --router_id=cc476665-254e-4f16-9ea4-498f63d41769 --state_path=/var/lib/neutron
    --metadata_port=8775 --verbose
    --log-file=neutron-ns-metadata-proxy-cc476665-254e-4f16-9ea4-498f63d41769.log
    --log-dir=/var/log/neutron