[openstack-dev] [nova] Adding hostId to metadata

Mohammed Naser mnaser at vexxhost.com
Mon Jun 25 21:28:39 UTC 2018


Hi everyone:

While working with the OpenStack infrastructure team, we noticed that
we were having some intermittent issues where we wanted to identify a
theory if all VMs with this issue were landing on the same hypervisor.

However, there seems to be no way of directly accessing `hostId` from
inside the virtual machine (such as using the metadata API).  This is
a very useful thing to expose over the metadata API as not only would
it help for troubleshooting these types of scenarios however it would
also help software that can manage anti-affinity simply by checking
the API and taking scheduling decisions.

I've proposed the following patch to add this[1], however, this is
technically an API change, and the blueprints document specifies that
"API changes always require a design discussion."

Also, I believe that we're in a state where getting a spec would
require an exception.  However, this is a very trivial change.  Also,
according to the notes in the metadata file, it looks like there is
one "bump" per OpenStack release[3] which means that this change can
just be part of that release-wide version bump of the OpenStack API.

Can we include this trivial patch in the upcoming Rocky release?

Thanks,
Mohammed

[1]: https://review.openstack.org/577933
[2]: https://docs.openstack.org/nova/latest/contributor/blueprints.html
[3]: http://git.openstack.org/cgit/openstack/nova/tree/nova/api/metadata/base.py#n60



More information about the OpenStack-dev mailing list