[openstack-dev] [nova] ability to set metadata on instances (but config drive is not updated)

Joshua Harlow harlowja at fastmail.com
Fri Jun 17 22:04:38 UTC 2016

Hi folks,

I was noticing that its possible to do something like:

$ nova meta josh-testr3 set "e=f"

Then inside the VM I can do the following to eventually see that this 
changes shows up in the instance metadata exposed at the following:

$ curl -s | 
python -mjson.tool

     "hostname": "josh-testr3.cloud.phx3.gdg",
     "launch_index": 0,
     "meta": {
         "e": "f",

Now if I am using the configdrive instead of the metadata server at that 
special/magic ip that same metadata never seems to change (I assume the 
configdrive would have to be 'ejected' and then a new configdrive 
created and then that configdrive 'reinserted'); was anyone aware of a 
bug that would solve this (it does appear to be a feature difference 
that could/should? be solved)?

Why this is something useful (from my view) is that we (at godaddy) have 
a cron job that polls that metadata periodically and it generates a 
bunch of polling traffic (especially when each VM does this) and that 
traffic could be removed if such a 'eject' and 'reinsert' happens 
instead (since then the cron job could become a small program that 
listens for devices being inserted/removed and does the needed actions 
then, which is better than polling endlessly for data that hasn't changed).


More information about the OpenStack-dev mailing list