Nova is Deprecating Hypervisor API Endpoints

Bug #1974470 reported by Juan Pablo Suazo
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Unassigned

Bug Description

As reported on https://bugs.launchpad.net/horizon/+bug/1202965, the data brought by the responses from the Nova hypervisor API endpoint contain inconsistencies between the data it provides and the names of the response fields.

This causes Horizon to display incongruent information on the hypervisor overview view, as the field for vCPUs used (vcpus_used) is really providing the total number dedicated and shared CPUs used while the field for total vCPUs (vcpus) provides information only about shared CPUs. This last field also doesn't account for the configured cpu_allocation_ration.

This results on Horizon displaying, for example, uses of 5 out of 4 vCPUs, if an hypervisor is overcommitting cpus, or even uses of 4 out of 0 vCPUs, if all CPUs are configured as dedicated.

This is troublesome as Nova is, practically, deprecating the Hypervisor API endpoints, see this accepted proposal that REMOVES the fields used by horizon on the latest version of the API: https://review.opendev.org/c/openstack/nova/+/764040/. A fix to the contents of its response should not be expected as a solution.

A possible solution might be transitioning to the Placement API instead, which appears to provide more consistent data and is Being used in Skyline.

description: updated
Changed in horizon:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Lajos Katona (lajos-katona) wrote :
Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to horizon (master)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/890525
Committed: https://opendev.org/openstack/horizon/commit/ebdb19ab8c84eafaa08930a2d03b6c2970716266
Submitter: "Zuul (22348)"
Branch: master

commit ebdb19ab8c84eafaa08930a2d03b6c2970716266
Author: Radomir Dopieralski <email address hidden>
Date: Fri Aug 4 15:22:08 2023 +0200

    Use Placement API along with the hypervisor stats

    Hypervisor stats do not reflect accurate VCPUs and PCPUs usage, so
    to have a correct picture we need to use Placement API along with
    hypervisors.

    We add VCPUs and PCPUs usage diagrams and Resource Provider tab
    to display correct stats.

    Since there is no python client for the Placement API, and the
    OpenStack SDK doesn't support the endpoints we need, we call the
    endpoints directly.

    Related-Bug: #1974470
    Related-Bug: #1397917

    Change-Id: If41cea0edeec8c95717229eb017e32898417a891

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to horizon (stable/2023.2)

Related fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/horizon/+/905914

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to horizon (stable/2023.1)

Related fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/horizon/+/905915

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/906004
Committed: https://opendev.org/openstack/horizon/commit/3acbf227a41493032c5828945d41d0b193cd960b
Submitter: "Zuul (22348)"
Branch: master

commit 3acbf227a41493032c5828945d41d0b193cd960b
Author: Tatiana Ovchinnikova <email address hidden>
Date: Wed Jan 17 14:52:37 2024 -0600

    Add allocation ratios to Placement stats

    All the Placement API stats "total" show the actual amount of the
    resource that the provider can accommodate. Using allocation ratio
    it is possible to exceed physical constraints.

    This patch uses allocation ratios to display the diagrams properly
    and adds the data to the stats table.

    Closes-Bug: #1974470
    Closes-Bug: #1397917

    Change-Id: Iab0ce21ae63f4cc26d3ec5684615189b8ab35231

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to horizon (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/905915
Committed: https://opendev.org/openstack/horizon/commit/c2b0700d4cff0c54af0b6e34162e6c715ef0820c
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit c2b0700d4cff0c54af0b6e34162e6c715ef0820c
Author: Radomir Dopieralski <email address hidden>
Date: Fri Aug 4 15:22:08 2023 +0200

    Use Placement API along with the hypervisor stats

    Hypervisor stats do not reflect accurate VCPUs and PCPUs usage, so
    to have a correct picture we need to use Placement API along with
    hypervisors.

    We add VCPUs and PCPUs usage diagrams and Resource Provider tab
    to display correct stats.

    Since there is no python client for the Placement API, and the
    OpenStack SDK doesn't support the endpoints we need, we call the
    endpoints directly.

    Related-Bug: #1974470
    Related-Bug: #1397917

    Change-Id: If41cea0edeec8c95717229eb017e32898417a891
    (cherry picked from commit ebdb19ab8c84eafaa08930a2d03b6c2970716266)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to horizon (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/905914
Committed: https://opendev.org/openstack/horizon/commit/034630c4d3d0511961aac2461eac32ee29078d2f
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 034630c4d3d0511961aac2461eac32ee29078d2f
Author: Radomir Dopieralski <email address hidden>
Date: Fri Aug 4 15:22:08 2023 +0200

    Use Placement API along with the hypervisor stats

    Hypervisor stats do not reflect accurate VCPUs and PCPUs usage, so
    to have a correct picture we need to use Placement API along with
    hypervisors.

    We add VCPUs and PCPUs usage diagrams and Resource Provider tab
    to display correct stats.

    Since there is no python client for the Placement API, and the
    OpenStack SDK doesn't support the endpoints we need, we call the
    endpoints directly.

    Related-Bug: #1974470
    Related-Bug: #1397917

    Change-Id: If41cea0edeec8c95717229eb017e32898417a891
    (cherry picked from commit ebdb19ab8c84eafaa08930a2d03b6c2970716266)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/2023.2)

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/horizon/+/907262

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/horizon/+/907263

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/907263
Committed: https://opendev.org/openstack/horizon/commit/a6ee210238066c8056d5fa9ea094d4a05e79f8c9
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit a6ee210238066c8056d5fa9ea094d4a05e79f8c9
Author: Tatiana Ovchinnikova <email address hidden>
Date: Wed Jan 17 14:52:37 2024 -0600

    Add allocation ratios to Placement stats

    All the Placement API stats "total" show the actual amount of the
    resource that the provider can accommodate. Using allocation ratio
    it is possible to exceed physical constraints.

    This patch uses allocation ratios to display the diagrams properly
    and adds the data to the stats table.

    Closes-Bug: #1974470
    Closes-Bug: #1397917

    Change-Id: Iab0ce21ae63f4cc26d3ec5684615189b8ab35231
    (cherry picked from commit 3acbf227a41493032c5828945d41d0b193cd960b)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/907262
Committed: https://opendev.org/openstack/horizon/commit/e650127975265bd398c5ccd0f9fc94456a013e0f
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit e650127975265bd398c5ccd0f9fc94456a013e0f
Author: Tatiana Ovchinnikova <email address hidden>
Date: Wed Jan 17 14:52:37 2024 -0600

    Add allocation ratios to Placement stats

    All the Placement API stats "total" show the actual amount of the
    resource that the provider can accommodate. Using allocation ratio
    it is possible to exceed physical constraints.

    This patch uses allocation ratios to display the diagrams properly
    and adds the data to the stats table.

    Closes-Bug: #1974470
    Closes-Bug: #1397917

    Change-Id: Iab0ce21ae63f4cc26d3ec5684615189b8ab35231
    (cherry picked from commit 3acbf227a41493032c5828945d41d0b193cd960b)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 24.0.0

This issue was fixed in the openstack/horizon 24.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.