[Openstack] Anyone using instance metadata?

Steve Baker steve at stevebaker.org
Wed Jul 4 22:20:05 UTC 2012


On Thu, Jul 5, 2012 at 1:11 AM, Day, Phil <philip.day at hp.com> wrote:
> I'm getting lost in the naming of things here,  it seems like we're saying:
>  "user-data is per instance data defined by the system and make accessible by the metadata service"
> and
> "meta-data is per instance data defined by the user via the API and injected into the instance or made available by the config drive"
> Something in those definitions of meta-data and user-data just seems confusing to me ;-)

Actually its worse than that, "instance metadata" is currently the
label for two completely unrelated things in OpenStack, and knowing
which one is being referred to seems to depend entirely on the context
:)

"user-data" is a chunk of data that can be set when an instance is not
running and is accessible from within the instance when it is running.
It could be used to store configuration, a script, or anything the
tenant wants.

In Nova, "instance meta-data" is a collection of key/value pairs
associated to an instance. They can be read and written to at any time
during the instance lifetime, from inside and outside the instance
using the nova compute API (and eventually EC2 API, Horizon, etc). A
snapshot of the instance meta-data at instance startup is made
available by the config drive (but maybe it shouldn't?).  Amazon calls
this feature Tags; EC2 can associate tags to a number of resource
types including instances.
http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/Using_Tags.html#Using_Tags_API

Here is where it gets confusing, the Metadata service gives a running
instance a convenient way of fetching the user-data, plus other meta
data about the current running instance.  People often also refer to
this as instance meta-data, but you cannot query the instance
associated key/value pairs via the metadata service.
http://docs.openstack.org/essex/openstack-compute/admin/content/metadata-service.html

To fix this semantic clash I would advocate adopting Amazon's Tags
terminology but I won't be pushing this too hard since I'm new here ;)

cheers




More information about the Openstack mailing list