Ask Your Question
0

where is the metadata stored

asked 2013-08-26 06:23:38 -0500

anonymous user

Anonymous

updated 2013-08-26 12:55:45 -0500

smaffulli gravatar image

I configured my metadata service and it works fine. I am able to inject ssh pub-key's to the guest VM.

From my guest VM when i execute meta-data curl cmd, I get this below output.

169.254.169.254 http port is mapped to metadata service on controller node. But i want to know where is the data stored ? is it per instance basis ? Also the below curl cmd doesn't use any instance-id, how it is mapping to particular instance ?

root@testnewrelic:~# curl http://169.254.169.254/latest/meta-data/

ami-id
ami-launch-index
ami-manifest-path
block-device-mapping/
hostname
instance-action
instance-id
instance-type
kernel-id
local-hostname
local-ipv4
placement/
public-hostname
public-ipv4
public-keys/
ramdisk-id
reservation-id
security-groups

Thanks,

edit retag flag offensive close merge delete

Comments

when i curl http://169.254.169.254/openstack, i get connection refused. can u show me your iptables, i'll be appreciate.

MAIKA gravatar imageMAIKA ( 2013-08-28 22:24:47 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-08-27 20:16:10 -0500

lorin gravatar image

(I answered this in the openstack-operators mailing list, but I'll add it here as well):

The metadata service is implemented by the nova-api service, which handles the metadata requests for all instances. The metadata service keeps an in-memory cache of the metadata for all instances. If the data isn't in the cache, nova-api does a database lookup (via conductor, if present) for the instance metadata information.

f you are not using the quantum/neutron namespace proxy + metadata agent, then nova-api does an instance-id lookup based on the source IP address of the http request.

If you are using the quantum/neutron namespace proxy + metadata agent: the namespace proxy will add the HTTP "X-Forwarded-For" HTTP header with the source IP address of the instance and then pass the request to the metadata agent. Then, the metadata agent will do a lookup based on the "X-Forwarded-For" header and will add an "X-Instance-ID" header with the instance ID. The nova-api service will then use the X-Instance-ID to identify the instance and do the cache/database lookup.

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

Stats

Asked: 2013-08-26 06:23:38 -0500

Seen: 2,881 times

Last updated: Aug 27 '13