← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1331364] [NEW] No macs key available in the meta-data store

 

You have been subscribed to a public bug:

There is no 'macs' key available in the meta-data store.  This is something provided in the AWS and would be a useful addition to Openstack.
In AWS on a machine with multiple NICs, the information can be exposed via the meta-store.  This is useful, as it enables machines to automatically configured there network interfaces on bootup. i.e. a script running from rc.local can query the metastore, and create a interface file for each additional NIC.  The information provided also includes cidr-blocks and mac addresses which has been useful when setting up asymmetric routing on some VMs.

The alternative approach we have used up until now, is to have user-data
passed to the VM, providing this information, but it means user-data
must be created for each VM.


curl http://169.254.169.254/latest/meta-data/network/interfaces/macs/
02:2c:cd:4b:ed:0b/
02:86:e3:35:08:c1/
02:d9:66:42:27:b2/
02:db:ad:a7:0a:e5/

This returns the mac address for each interface.  I can then query each
interface as follows:

curl http://169.254.169.254/latest/meta-data/network/interfaces/macs/02:2c:cd:4b:ed:0b/
device-number
interface-id
local-hostname
local-ipv4s
mac
owner-id
security-group-ids
security-groups
subnet-id
subnet-ipv4-cidr-block
vpc-id
vpc-ipv4-cidr-block

curl http://169.254.169.254/latest/meta-data/network/interfaces/macs/02:2c:cd:4b:ed:0b/local-ipv4s
10.20.1.12

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: meta-data nics user-data
-- 
No macs key available in the meta-data store
https://bugs.launchpad.net/bugs/1331364
You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova).