metadata access problem (not privatekey inserted)
Hi all;
i'm experiencing an error with cloud-init and metadata access when any instances is being created and as result the private key is not being inserted.
cloud-init[807]: 2017-06-30 09:01:39,337 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [50/120s]: unexpected error ['NoneType' object has no attribute 'status_code']
and after a while: cloud-init[807]: 2017-06-30 09:04:43,419 - url_helper.py[WARNING]: Calling 'http://192.168.5.100//latest/meta-data/instance-id' failed [113/120s]: bad status code [500]
Of course when i change the metadata mode to: force_config_drive=true in nova.conf the key injection is working properly, but the already created instances stopped working.
Do anybody knows how to get rid the cloud-init error and make the instances get properly metadata access?
Openstack version: 12.0.1
Thanks in advance.
Regards.
Are you trying to launch the instances in a provider (external) network? Metadata injection with cloud-init only works for networks that are controlled by neutron. That's why using config-drive works for external networks. At least that's what I assume from your description and my experiences.
Hi man, thanks, no all roles are at the same hypervisor.
Is the metadata agent up?
What happens when you run
curl http://169.254.169.254/2009-04-04/meta-data/instance-id
in one of those instances?yes the metadata agent service is running and when i do a curl:
things to check: does the instance have an IP address? a route to the metadata API? does the router connect this address correctly?