NUMATopologyFilter pagesize logs are missleading

Bug #2075959 reported by Balazs Gibizer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Stephen Finucane

Bug Description

When the instance request mem pages via symbolic names (e.g. "large" instead of specifying the exact size) and the instance does not fit to a NUMA cell due to the memory requirements nova logs are confusing:

./nova-scheduler-scheduler.log:2024-07-31 23:37:28.428 1 DEBUG nova.virt.hardware [None req-c3efb10b-641c-4066-a569-206226315366 f05a486d957b4e6082293ce5e707009d 8c8a6763e6924cd3a94427af5f8ef6ee - - default default] Host does not support requested memory pagesize, or not enough free pages of the requested size. Requested: -2 kB _numa_fit_instance_cell /usr/lib/python3.9/site-packages/nova/virt/hardware.py:944

This happens because the symbolic name translated to a negative integer placeholder inside nova. So when the field is printed it should be translated back to the symbolic name instead.

https://github.com/openstack/nova/blob/bb2d7f9cad577f3a32cb9523e2b1d9a6d6db3407/nova/virt/hardware.py#L943-L946

tags: added: low-hanging-fruit numa
Changed in nova:
status: New → In Progress
Changed in nova:
assignee: nobody → Stephen Finucane (stephenfinucane)
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/c/openstack/nova/+/926223
Committed: https://opendev.org/openstack/nova/commit/4678bcbb064da580500b1dbeddb0bdfdeac074ef
Submitter: "Zuul (22348)"
Branch: master

commit 4678bcbb064da580500b1dbeddb0bdfdeac074ef
Author: Stephen Finucane <email address hidden>
Date: Tue Aug 13 17:24:31 2024 +0100

    hardware: Correct log

    We currently get the following error message if attempting to fit a
    guest with hugepages on a node that doesn't have enough:

      Host does not support requested memory pagesize, or not enough free
      pages of the requested size. Requested: -2 kB

    Correct this, removing the kB suffix and adding a note on the meaning of
    the negative values, like we have for the success path.

    Change-Id: I247dc0ec03cd9e5a7b41f5c5534bdfb1af550029
    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-Bug: #2075959

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/2024.1)

Fix proposed to branch: stable/2024.1
Review: https://review.opendev.org/c/openstack/nova/+/927110

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/927110
Committed: https://opendev.org/openstack/nova/commit/f619311dd9b6d553371ca4cb911600fff6e6718d
Submitter: "Zuul (22348)"
Branch: stable/2024.1

commit f619311dd9b6d553371ca4cb911600fff6e6718d
Author: Stephen Finucane <email address hidden>
Date: Tue Aug 13 17:24:31 2024 +0100

    hardware: Correct log

    We currently get the following error message if attempting to fit a
    guest with hugepages on a node that doesn't have enough:

      Host does not support requested memory pagesize, or not enough free
      pages of the requested size. Requested: -2 kB

    Correct this, removing the kB suffix and adding a note on the meaning of
    the negative values, like we have for the success path.

    Change-Id: I247dc0ec03cd9e5a7b41f5c5534bdfb1af550029
    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-Bug: #2075959
    (cherry picked from commit 4678bcbb064da580500b1dbeddb0bdfdeac074ef)

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

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

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/927473
Committed: https://opendev.org/openstack/nova/commit/6147a054208608729a70ee200de2f012b144a0d0
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 6147a054208608729a70ee200de2f012b144a0d0
Author: Stephen Finucane <email address hidden>
Date: Tue Aug 13 17:24:31 2024 +0100

    hardware: Correct log

    We currently get the following error message if attempting to fit a
    guest with hugepages on a node that doesn't have enough:

      Host does not support requested memory pagesize, or not enough free
      pages of the requested size. Requested: -2 kB

    Correct this, removing the kB suffix and adding a note on the meaning of
    the negative values, like we have for the success path.

    Change-Id: I247dc0ec03cd9e5a7b41f5c5534bdfb1af550029
    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-Bug: #2075959
    (cherry picked from commit 4678bcbb064da580500b1dbeddb0bdfdeac074ef)
    (cherry picked from commit f619311dd9b6d553371ca4cb911600fff6e6718d)

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

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

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/928485
Committed: https://opendev.org/openstack/nova/commit/cf08543ca10178fa902b54fa1379fe5bc0e46596
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit cf08543ca10178fa902b54fa1379fe5bc0e46596
Author: Stephen Finucane <email address hidden>
Date: Tue Aug 13 17:24:31 2024 +0100

    hardware: Correct log

    We currently get the following error message if attempting to fit a
    guest with hugepages on a node that doesn't have enough:

      Host does not support requested memory pagesize, or not enough free
      pages of the requested size. Requested: -2 kB

    Correct this, removing the kB suffix and adding a note on the meaning of
    the negative values, like we have for the success path.

    Change-Id: I247dc0ec03cd9e5a7b41f5c5534bdfb1af550029
    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-Bug: #2075959
    (cherry picked from commit 4678bcbb064da580500b1dbeddb0bdfdeac074ef)
    (cherry picked from commit f619311dd9b6d553371ca4cb911600fff6e6718d)
    (cherry picked from commit 6147a054208608729a70ee200de2f012b144a0d0)

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.