Jump to: navigation, search


Extended Hypervisor Attributes

This extension applies to the Nova API and exists for the purpose of defining additional hypervisor location information needed to support making placement decisions with respect to a more detailed datacenter model than has been possible heretofore. These decisions might be made by the nova scheduler or an authorized client that is making placement decisions with a bigger picture in mind.

We suppose that the hypervisors of a datacenter are arranged in a tree; all details of the shape of the tree can vary from datacenter to datacenter. The root of the tree corresponds to the whole datacenter, and the leaves are the individual hypervisors. The tree does not necessarily have uniform depth. Each vertex of the tree is labeled with a level, which identifies the kind of thing to which the vertex corresponds. For example, a leaf might be labeled with level=machine and have ancestors with labels like chassis, rack, row, and room. The labels are used consistently: you can not have label X appearing on an ancestor of a vertex labeled Y and also have label Y appearing on an ancestor of a vertex labeled X. Each vertex of the tree, possibly excepting the root, is also labeled with a name. For a given parent vertex, all its children have distinct names.

This extension adds one attribute to a hypervisor, named location. The value of this attribute is a list of (level,name) pairs identifying the path from the root of the hypervisor tree to the hypervisor itself (in root-to-leaf order). Inclusion of the root is optional, it adds no ability to discriminate. Inclusion of the hypervisor itself is optional, since it is already named even without this extension.

The XML namespace of this extension shall be http://docs.openstack.org/compute/ext/extended_hypervisor/api/v1.0 and the JSON prefix shall be OS-EXT-HYP-ATTR.

Example Extended JSON Output

              "host": "r2c2n5",
              "id": 7
          "vcpus_used": 50,
          "hypervisor_type": "QEMU",
          "local_gb_used": 1200,
          "hypervisor_hostname": "r2c2n5",
          "memory_mb_used": 102912,
          "memory_mb": 96661,
          "current_workload": 0,
          "vcpus": 32,
          "cpu_info": "{"vendor": "Intel", "model": "SandyBridge", "arch": "x86_64", "features": ["pdpe1gb", "osxsave", "dca", "pcid", "pdcm", "xtpr", "tm2", "est", "smx", "vmx", "ds_cpl", "monitor", "dtes64", "pbe", "tm", "ht", "ss", "acpi", "ds", "vme"], "topology": {"cores": 8, "threads": 2, "sockets": 1}}",
          "running_vms": 8,
          "free_disk_gb": 1016,
          "hypervisor_version": 1000000,
          "disk_available_least": 864,
          "local_gb": 2216,
          "free_ram_mb": -6251,
          "id": 3,
          "OS-EXT-HYP-ATTR:location": [ {"rack":"r2"}, {"chassis":"c2"}, {"machine":"n5"} ]

Example Extended XML Output

   <?xml version='1.0' encoding='UTF-8'?>
   <hypervisor vcpus_used="50" hypervisor_type="QEMU" local_gb_used="1200" hypervisor_hostname="r2c2n5" memory_mb_used="102912" memory_mb="96661" current_workload="0" vcpus="32" cpu_info="{"vendor": "Intel", "model": "SandyBridge", "arch": "x86_64", "features": ["pdpe1gb", "osxsave", "dca", "pcid", "pdcm", "xtpr", "tm2", "est", "smx", "vmx", "ds_cpl", "monitor", "dtes64", "pbe", "tm", "ht", "ss", "acpi", "ds", "vme"], "topology": {"cores": 8, "threads": 2, "sockets": 1}}" running_vms="8" free_disk_gb="1016" hypervisor_version="1000000" disk_available_least="864" local_gb="2216" free_ram_mb="-6251" id="3">
     <service host="r2c2n5" id="7"/>
     <location xmlns="http://docs.openstack.org/compute/ext/extended_hypervisor/api/v1.0">
       <vertex level="rack" name="r2" />
       <vertex level="chassis" name="c2" />
       <vertex level="machine" name="n5" />

Acquisition of This Extended Information

this section to describe how nova knows what to say in this extension