Cloud-init unable to retrieve metadata

openstackopenstack-nova

I set up OpenStack with Puppet, and it's working great for the most part, but I've come across a rather pernicious issue: my Ubuntu guests (and likely others) are unable to retrieve metadata during boot.

I spun up a Cirros instance to run a couple quick tests and discovered

  • Networking is operating correctly. The instance can ping the gateway, as well as the outside world.
  • A request to http://169.254.169.254/2009-04-04/meta-data/ yields the expected results, indicating that the instance can in fact reach the metadata server.

I figured then that it might be a problem with the individual instance, so I spun up another Ubuntu 14.10 guest, but it had the exact same problem:

util.py[WARNING]: Failed fetching metadata from url `http://169.254.169.254/2009-04-04/meta-data/`
init: Error while reading from descriptor: Broken pipe

Versions:
* Ubuntu 14.10 Server 64 bit (both host and guests)
* Nova 2.17.0 (Icehouse)

Thanks for your time!

Edit

I rebuilt my OpenStack installation from scratch, having failed to resolve this problem otherwise, in hopes that something just went wrong during the previous setup. Unfortunately, reinstallation didn't solve the issue. Of course, that doesn't mean it wasn't a mistake that I duplicated during this installation. Still, it seems odd that the Cirros image can grab that URL but the Ubuntu 14.10 Server image can't, even though it is getting an IP.

Best Answer

The culprit in this matter was my MTU setting. I always forget to handle the MTU, but I came across a small article (somewhere, if I find it I'll post it) which outlined the same problem. My solution was to specify

dnsmasq_config_file = /etc/neutron/dnsmasq.conf

in my /etc/neutron/dhcp_agent.ini configuration. The /etc/neutron/dnsmasq.conf file contains only

dhcp-option=26,1424

And now all instances pick up their metadata without issue! 1424 isn't a hard and fast value though. I just picked it because I didn't feel like determining what the proper value would be.

Related Topic