Ask Your Question
0

cloud-init can't get meta-data

asked 2013-06-04 23:04:27 -0500

Li Chengyuan gravatar image

updated 2013-06-04 23:06:16 -0500

Hi,

The devstack is installed and one KVM guest starts, both the host and guest are using ubuntu 12.04 image.

But the cloud-init in guest can't get meta-data from the host. The iptables rule in host looks correct and also saw packets are re-directed, port 80 is re-directed to port 8775, and nova-api is listening 8775 port.

How to solve this problem?

In the guest

cloud-init start-local running: Wed, 05 Jun 2013 03:51:02 +0000. up 2.88 seconds no instance data found in start-local ci-info: lo : 1 127.0.0.1 255.0.0.0 . ci-info: eth0 : 1 10.0.0.2 255.255.255.0 fa:16:3e:47:d9:f6 ci-info: route-0: 0.0.0.0 10.0.0.1 0.0.0.0 eth0 UG ci-info: route-1: 10.0.0.0 0.0.0.0 255.255.255.0 eth0 U cloud-init start running: Wed, 05 Jun 2013 03:51:03 +0000. up 3.31 seconds 2013-06-05 03:51:53,284 - util.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [50/120s]: url error [timed out] 2013-06-05 03:52:44,336 - util.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [101/120s]: url error [timed out] 2013-06-05 03:53:02,355 - util.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [119/120s]: url error [timed out] 2013-06-05 03:53:03,357 - DataSourceEc2.py[CRITICAL]: giving up on md after 120 seconds

In the host

#netstat -lntp | grep 8775

tcp 0 0 0.0.0.0:8775 0.0.0.0:* LISTEN 29763/python

iptables before guest starts:

22 1320 DNAT tcp -- any any anywhere 169.254.169.254 tcp dpt:http to:10.95.14.22:8775

iptables after guest starts:

39 2340 DNAT tcp -- any any anywhere 169.254.169.254 tcp dpt:http to:10.95.14.22:8775

tcpdump host 169.254.169.254 -i br100

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on br100, link-type EN10MB (Ethernet), capture size 65535 bytes

Regards, CY.

edit retag flag offensive close merge delete

Comments

Are you using Quantum? If you are Quantum relays the route to the metadata server via DHCP. You have to configure it using /etc/quantum/dhcp_agent.ini, follow http://docs.openstack.org/grizzly/openstack-network/admin/content/ to get the metadata service working.

james.shimer gravatar imagejames.shimer ( 2013-06-18 09:13:45 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-06-17 22:42:25 -0500

Vysakh gravatar image

I had the same issue. In my case, the instance was not able to reach the gateway. In fact, i never had setup one. It resolved by setting up the gateway.

As a first step, ping your gateway. In this case. 10.0.0.1. If you are using quantum networking. You have to make use "ip netns" to reach the gateways for each namespace.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-06-04 23:04:27 -0500

Seen: 8,187 times

Last updated: Jun 17 '13