Expose host UUID from libvirt through the API

Registered by Russell Bryant

This blueprint is for adding an additional 'hypervisor_uuid' detail to the hypervisor details list.

The hypervisor's UUID is useful to the ceilometer katello dispatcher plugin (https://github.com/Katello/ceilometer_katello_dispatcher), which needs UUIDs of both hypervisors and instances in order to populate katello with a map of which instances are running on which hypervisors. Katello and its backend entitlement service candlepin use UUIDs to track system information.

Additionally, the hypervisor UUID is a handy identifier for verifying which hypervisor is being referred to in the nova cli output.

I'd like to make the following changes:

 * add a hypervisor_uuid attribute to ComputeNodes model object (this includes a new column on compute_nodes)
 * populate hypervisor_uuid via the libvirt driver's existing get_host_uuid method
 * return hypervisor_uuid with other hypervisor details via the API calls under /os-hypervisors.

This feature requires no permission changes, it is adding a field to an existing API.

An example call would be to /v2/<tenant id>/os-hypervisors/<hypervisor id> which would return something like this:

{
    "hypervisor": {
        "hypervisor_hostname": "devstack.novalocal",
        "hypervisor_uuid": "7bc268e4-6a94-4e6e-9b54-b88958ae7998",
        "id": 1,
        <existing additional details here>
    }
}

CLI calls to "nova hypervisor-show <id>" would output this additional field as well, no changes to python-novaclient are needed.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
Chris Duryee
Definition:
Superseded
Series goal:
None
Implementation:
Deferred
Milestone target:
None
Completed by
Russell Bryant

Related branches

Sprints

Whiteboard

Deferred to icehouse-3 as the blueprint was not approved by the icehouse-2 blueprint approval deadline. --russellb

I am not sure what the benefit of this one is, this doesn't provide the information needed to answer justwriteclick.com/2013/09/17/openstack-docimpact-flag-walk-through/

(cduryee) I updated the blueprint to include the uuid in the hypervisor details instead of in a new call, and added more info as to why I'd like the UUIDs in the details.

Please make sure you add this to the V3 API, and when adding it to the V2 API you will need a new extension to advertise the presence of the new attribute -- johnthetubaguy

I am not too keen on making this change just to support a 3rd party plugin that isn't in upstream ceilometer, I would like to see some other use cases first. Also since there is no code for this up, and Icehouse-1 is December 5th, I am moving this to Icehouse-2 -- jogo

I don't like the idea of having this be libvirt only as well, can you expand on that point -- jogo

Gerrit topic: https://review.openstack.org/#q,topic:bp/libvirt-host-uuid,n,z

Addressed by: https://review.openstack.org/57295
    Add hypervisor UUIDs to ComputeNode objects and API

the latest patch includes an extension to advertise the new attribute for v2

The person that took this on found a way to accomplish his use case without this feature. The same use case was why I had opened this, so we can close it out. --russellb

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.