Ask Your Question

Instance can not access Openstack metadata service

asked 2015-05-08 07:18:21 -0500

I have created an Openstack compatible image (QCOW2) from RHEL 5.8 basically using following guide [1]. I am using Openstack juno on CentOS 7.

Creation was successful and when i uploaded it to the Glance and spawn instance out of it , it hangs on metedata accessing part, after few seconds it get started. I cloud login to the instance using the IP assigned by the openstack with the root user which I used at the time of image creation.
So as I could login Network part is working , when i try to curl it also not reachable.

I have tried uploading Ubuntu image and spawn instance with out any issues and could access metedata service with out any issues.

What am i doing wrong in image creation process? Help is appreciated.


Thanks, Chamara

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2015-05-08 15:21:58 -0500

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 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 -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      *                   LISTEN      22142/python

You can execute the curl command directly from the router

ip netns exec qrouter-cc476665-254e-4f16-9ea4-498f63d41769 curl

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
    --router_id=cc476665-254e-4f16-9ea4-498f63d41769 --state_path=/var/lib/neutron
    --metadata_port=8775 --verbose
edit flag offensive delete link more


Thank You for the reply. As mentioned above I could not access metadata service from qrouter namespace but could access the metadata service from the qdhcp namespace.

# ip netns exec  qdhcp-a98f1337-e350-4491-aed4-30a39a7ded75 curl
chamaraT gravatar imagechamaraT ( 2015-05-09 08:37:05 -0500 )edit

As I could spawn Ubuntu instances and it was working well , also metedata service was accessible. I was thinking whats wrong with the way i create RHEL images ?

chamaraT gravatar imagechamaraT ( 2015-05-09 08:40:00 -0500 )edit

I also used oz-install tool and created the RHEL5.8, and its also gives the same error as above.

2015-05-10 10:57:13,362 -[WARNING]: '' failed [3/120s]: url error [[Errno 113] No route to hos
chamaraT gravatar imagechamaraT ( 2015-05-10 10:00:49 -0500 )edit

answered 2015-05-13 01:56:13 -0500


I have used the virt-manager and created the QCOW image and installed the required packages (cloud-init). After that I added following entry which prevent adding route which causes the issue of prevent accessing metadata service earlier. Uploaded to the glace and work fine except could not find tools to grow the disk according to the selected flavor. (As I found from RHEL 6.x there are tools available , but not for RHEl 5.x)

echo "NOZEROCONF=yes" >> /etc/sysconfig/network
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-05-08 07:18:21 -0500

Seen: 12,696 times

Last updated: May 13 '15