yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #95960
[Bug 2111895] Re: nova-api does not return | vCPUs Used | vCPUs | Memory MB Used | Memory MB | in output of "openstack hypervisor list --long"
Hi, and thanks for reporting this.
The difference you're seeing is due to an intentional API change
introduced in Nova starting in the Wallaby release. The openstack
hypervisor list --long output no longer includes the vCPU and memory
usage fields, as Nova's API stopped returning those specific metrics in
later versions.
You can find a detailed explanation in the following specs.
765797: Update modernize-os-hypervisors-api spec, pt. 3 | https://review.opendev.org/c/openstack/nova-specs/+/765797
However, if you specify the API version, you can have this information again.
But be careful, as the accuracy of this information is not good (see specs).
stack@openstack:~$ openstack --os-compute-api-version 2.53 hypervisor list --long
+--------------------------------------+---------------------+-----------------+----------------+-------+------------+-------+----------------+-----------+
| ID | Hypervisor Hostname | Hypervisor Type | Host IP | State | vCPUs Used | vCPUs | Memory MB Used | Memory MB |
+--------------------------------------+---------------------+-----------------+----------------+-------+------------+-------+----------------+-----------+
| 0cda8f18-49d4-4c4b-8d92-bb4735d167af | openstack | QEMU | 192.168.122.78 | up | 6 | 2 | 1152 | 4096 |
+--------------------------------------+---------------------+-----------------+----------------+-------+------------+-------+----------------+-----------+
stack@openstack:~$ openstack --os-compute-api-version 2.88 hypervisor list --long
+--------------------------------------+---------------------+-----------------+----------------+-------+
| ID | Hypervisor Hostname | Hypervisor Type | Host IP | State |
+--------------------------------------+---------------------+-----------------+----------------+-------+
| 0cda8f18-49d4-4c4b-8d92-bb4735d167af | openstack | QEMU | 192.168.122.78 | up |
+--------------------------------------+---------------------+-----------------+----------------+-------+
Because this is expected behavior resulting from an upstream change, we're marking this bug as Invalid.
If you believe there’s a need to revisit this change or propose an enhancement, feel free to raise the topic in a Nova meeting or propose a blueprint:
https://blueprints.launchpad.net/nova
Thanks again!
** Changed in: nova
Status: New => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/2111895
Title:
nova-api does not return | vCPUs Used | vCPUs | Memory MB Used |
Memory MB | in output of "openstack hypervisor list --long"
Status in OpenStack Compute (nova):
Invalid
Bug description:
In Train release output of "openstack hypervisor list --long" included
all the columns:
[stack@undercloud (overcloudrc) ~]$ openstack hypervisor list --long
+----+----------------------------------------------------+-----------------+--------------+-------+------------+-------+----------------+-----------+
| ID | Hypervisor Hostname | Hypervisor Type | Host IP | State | vCPUs Used | vCPUs | Memory MB Used | Memory MB |
+----+----------------------------------------------------+-----------------+--------------+-------+------------+-------+----------------+-----------+
| 1 | overcloud-ovscompute-bvt-c3s4o4sr3d3-0.localdomain | QEMU | 172.17.1.62 | up | 32 | 60 | 135168 | 507052 |
| 2 | overcloud-ovscompute-bvt-c3s4o4sr3d3-2.localdomain | QEMU | 172.17.1.68 | up | 32 | 60 | 135168 | 507052 |
| 3 | overcloud-ovscompute-bvt-c3s4o4sr3d3-4.localdomain | QEMU | 172.17.1.46 | up | 76 | 60 | 315392 | 507052 |
| 4 | overcloud-ovscompute-bvt-c3s4o4sr3d3-1.localdomain | QEMU | 172.17.1.116 | up | 114 | 60 | 434176 | 507052 |
| 5 | overcloud-ovscompute-bvt-c3s4o4sr3d3-3.localdomain | QEMU | 172.17.1.227 | up | 32 | 60 | 135168 | 507052 |
| 6 | overcloud-ovscompute-bvt-c3s4o4sr3d3-5.localdomain | QEMU | 172.17.1.198 | up | 0 | 60 | 4096 | 507052 |
| 7 | overcloud-ovscompute-bvt-c3s4o4sr3d3-7.localdomain | QEMU | 172.17.1.35 | up | 152 | 60 | 561152 | 507052 |
| 8 | overcloud-ovscompute-bvt-c3s4o4sr3d3-6.localdomain | QEMU | 172.17.1.228 | up | 32 | 60 | 135168 | 507052 |
| 9 | overcloud-ovscompute-bvt-c3s4o4sr3d3-8.localdomain | QEMU | 172.17.1.186 | up | 0 | 60 | 4096 | 507052 |
+----+----------------------------------------------------+-----------------+--------------+-------+------------+-------+----------------+-----------+
Now, starting from Wallaby, Nova API does not return below columens:
- vCPUs Used
- vCPUs
- Memory MB Used
- Memory MB
And the output looks like this:
[stack@undercloud (overcloudrc) ~]$ openstack hypervisor list --long
+--------------------------------------+-----------------------------------------------------+-----------------+--------------+-------+------------+-------+----------------+-----------+
| ID | Hypervisor Hostname | Hypervisor Type | Host IP | State | vCPUs Used | vCPUs | Memory MB Used | Memory MB |
+--------------------------------------+-----------------------------------------------------+-----------------+--------------+-------+------------+-------+----------------+-----------+
| f816bade-4d84-429e-8c21-0158cf93b802 | overcloud-ovscompute-cyan-0.localdomain | QEMU | 172.17.1.166 | up | | | | |
| 52abbe9c-8f11-4c4d-9dc0-784d83916c2b | overcloud-ovscompute-cyan-1.localdomain | QEMU | 172.17.1.117 | up | | | | |
| 3eb7125d-6a04-4d6b-80ec-e9e4a2209ea7 | overcloud-dpdkperformancecompute-cyan-0.localdomain | QEMU | 172.17.1.220 | up | | | | |
+--------------------------------------+-----------------------------------------------------+-----------------+--------------+-------+------------+-------+----------------+-----------+
Using OpenStack SDK I checked what we get back from Nova API and these extra information are missing in the output from Nova API:
>>> for server in conn.list_hypervisors():
... print(server)
...
openstack.compute.v2.hypervisor.Hypervisor(id=fbed1bfb-3ee1-4cb3-b4b2-681ff1bc8945, hypervisor_hostname=overcloud-ovscompute-casablanca-0.localdomain, state=up, status=enabled, hypervisor_type=QEMU, hypervisor_version=9000000, host_ip=172.17.1.228, service={'id': '0b92b3aa-abfb-414d-a5ee-59df450fe010', 'host': 'overcloud-ovscompute-casablanca-0.localdomain', 'disabled_reason': None}, uptime= 06:25:15 up 20:16, 0 users, load average: 0.02, 0.07, 0.11
, location=Munch({'cloud': 'overcloud', 'region_name': 'regionOne', 'zone': None, 'project': Munch({'id': '0f06c8422ec949e4acb080b8e6c8c2f4', 'name': 'admin', 'domain_id': None, 'domain_name': 'Default'})}))
(.......)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/2111895/+subscriptions
References