Skip to content

Wrong hypervisor vCPUs calculation if node reports multiple NUMA cells #494

@vooon

Description

@vooon

On some hardware libvirt may report host as having multiple NUMA cells with a single socket.
Here an example: Kolla 2024.1 ubuntu-jammy on Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz reports following topology:

# nova api microversion 2.87
cpu_info:
  arch: x86_64
  model: Cascadelake-Server-noTSX
  vendor: Intel
  topology:
    cells: 2
    sockets: 1
    cores: 20
    threads: 2
  features:
...

So calculation introduced in #466 expose only half of available vCPUs, while vcpus remains correct 80 cores...
Unfortunately gophercloud unaware of that cells field too:

https://github.com/gophercloud/gophercloud/blob/3008470746c071e0998c487ecd0bf54682a7e54a/openstack/compute/v2/hypervisors/results.go#L13-L17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions