Resize with changing pci alias schedules accoring to the old flavor

Bug #1983753 reported by Balazs Gibizer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Balazs Gibizer

Bug Description

Nova does not consider the pci_alias from the new flavor extra_specs during the scheduling of the resize. The new pci_request only applied by the resource_tracker during the move claim[1].

This leads to a behavior where during the scheduling of the resize nova selects the target host according to the old flavor's pci_request but then at the selected host it will allocate PCI devices properly based on the new flavor.

[1] https://github.com/openstack/nova/blob/adeea3d5e7d7337d2817dd5c46334c76c05995ef/nova/compute/resource_tracker.py#L287-L299

tags: added: pci
Changed in nova:
assignee: nobody → Balazs Gibizer (balazs-gibizer)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/852295

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

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/852296

Changed in nova:
status: New → In Progress
Revision history for this message
Artom Lifshitz (notartom) wrote :
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

Yes it is, I realized it when the fix fixed your reproducer too. :) I noted both bug in the commit message. I mark this as duplicate now.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.opendev.org/c/openstack/nova/+/852295
Committed: https://opendev.org/openstack/nova/commit/6d602c6b734c2e360fa319ba22c2fced02ad3d29
Submitter: "Zuul (22348)"
Branch: master

commit 6d602c6b734c2e360fa319ba22c2fced02ad3d29
Author: Balazs Gibizer <email address hidden>
Date: Sat Aug 6 14:48:52 2022 +0200

    Reproducer for bug 1983753

    Related-Bug: #1983753
    Change-Id: Ic6566272b8c5af57cd1c73c73b3cba6cd265bebe

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

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

commit a93092e0d5c1483f9ad48276708ee35c54ce44fe
Author: Balazs Gibizer <email address hidden>
Date: Sat Aug 6 16:09:54 2022 +0200

    Update RequestSpec.pci_request for resize

    Nova uses the RequestSpec.pci_request in the PciPassthroughFilter to
    decide if the PCI devicesm, requested via the pci_alias in the flavor
    extra_spec, are available on a potential target host. During resize the
    new flavor might contain different pci_alias request than the old flavor
    of the instance. In this case Nova should use the pci_alias from the new
    flavor to scheduler the destination host of the resize. However this
    logic was missing and Nova used the old pci_request value based on the
    old flavor. This patch adds the missing logic.

    Closes-Bug: #1983753
    Closes-Bug: #1941005
    Change-Id: I73c9ae27e9c42ee211a53bed3d849650b65f08be

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

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/853265

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

Related fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/nova/+/853266

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

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

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

Related fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/nova/+/853268

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

Related fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/nova/+/853269

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

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

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

Related fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/nova/+/853271

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

Related fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/nova/+/853273

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

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

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

Related fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/nova/+/853275

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.opendev.org/c/openstack/nova/+/853265
Committed: https://opendev.org/openstack/nova/commit/82cdfa23c7a0e269ab038e241bb7428b7f1391aa
Submitter: "Zuul (22348)"
Branch: master

commit 82cdfa23c7a0e269ab038e241bb7428b7f1391aa
Author: Balazs Gibizer <email address hidden>
Date: Tue Aug 16 13:19:03 2022 +0200

    Add reno for fixing bug 1941005

    Related-Bug: #1941005
    Related-Bug: #1983753
    Change-Id: I16ed1143ead3779c87698aa29bac005678db2993

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 26.0.0.0rc1

This issue was fixed in the openstack/nova 26.0.0.0rc1 release candidate.

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/853266
Committed: https://opendev.org/openstack/nova/commit/bdc32226e2d9ce4a073306f8f6267fbe305e64e4
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit bdc32226e2d9ce4a073306f8f6267fbe305e64e4
Author: Balazs Gibizer <email address hidden>
Date: Sat Aug 6 14:48:52 2022 +0200

    Reproducer for bug 1983753

    Related-Bug: #1983753
    Change-Id: Ic6566272b8c5af57cd1c73c73b3cba6cd265bebe
    (cherry picked from commit 6d602c6b734c2e360fa319ba22c2fced02ad3d29)

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/853267
Committed: https://opendev.org/openstack/nova/commit/b6c7ee07ad2a6503b8aad0921cca70e61e60259d
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit b6c7ee07ad2a6503b8aad0921cca70e61e60259d
Author: Balazs Gibizer <email address hidden>
Date: Sat Aug 6 16:09:54 2022 +0200

    Update RequestSpec.pci_request for resize

    Nova uses the RequestSpec.pci_request in the PciPassthroughFilter to
    decide if the PCI devicesm, requested via the pci_alias in the flavor
    extra_spec, are available on a potential target host. During resize the
    new flavor might contain different pci_alias request than the old flavor
    of the instance. In this case Nova should use the pci_alias from the new
    flavor to scheduler the destination host of the resize. However this
    logic was missing and Nova used the old pci_request value based on the
    old flavor. This patch adds the missing logic.

    Closes-Bug: #1983753
    Closes-Bug: #1941005
    Change-Id: I73c9ae27e9c42ee211a53bed3d849650b65f08be
    (cherry picked from commit a93092e0d5c1483f9ad48276708ee35c54ce44fe)

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/853268
Committed: https://opendev.org/openstack/nova/commit/19bac6e9c362ee692f4be92041bb3f6c3b9b6c23
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 19bac6e9c362ee692f4be92041bb3f6c3b9b6c23
Author: Balazs Gibizer <email address hidden>
Date: Tue Aug 16 13:19:03 2022 +0200

    Add reno for fixing bug 1941005

    Related-Bug: #1941005
    Related-Bug: #1983753
    Change-Id: I16ed1143ead3779c87698aa29bac005678db2993
    (cherry picked from commit 82cdfa23c7a0e269ab038e241bb7428b7f1391aa)

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/853269
Committed: https://opendev.org/openstack/nova/commit/87a8a7df9800f3c81dba2e2c0520168115ad1b28
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 87a8a7df9800f3c81dba2e2c0520168115ad1b28
Author: Balazs Gibizer <email address hidden>
Date: Sat Aug 6 14:48:52 2022 +0200

    Reproducer for bug 1983753

    Related-Bug: #1983753
    Change-Id: Ic6566272b8c5af57cd1c73c73b3cba6cd265bebe
    (cherry picked from commit 6d602c6b734c2e360fa319ba22c2fced02ad3d29)
    (cherry picked from commit bdc32226e2d9ce4a073306f8f6267fbe305e64e4)

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/853270
Committed: https://opendev.org/openstack/nova/commit/696d27a0e2ccf0916fc6bd3eabf73f2b007e7830
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 696d27a0e2ccf0916fc6bd3eabf73f2b007e7830
Author: Balazs Gibizer <email address hidden>
Date: Sat Aug 6 16:09:54 2022 +0200

    Update RequestSpec.pci_request for resize

    Nova uses the RequestSpec.pci_request in the PciPassthroughFilter to
    decide if the PCI devicesm, requested via the pci_alias in the flavor
    extra_spec, are available on a potential target host. During resize the
    new flavor might contain different pci_alias request than the old flavor
    of the instance. In this case Nova should use the pci_alias from the new
    flavor to scheduler the destination host of the resize. However this
    logic was missing and Nova used the old pci_request value based on the
    old flavor. This patch adds the missing logic.

    Closes-Bug: #1983753
    Closes-Bug: #1941005
    Change-Id: I73c9ae27e9c42ee211a53bed3d849650b65f08be
    (cherry picked from commit a93092e0d5c1483f9ad48276708ee35c54ce44fe)
    (cherry picked from commit b6c7ee07ad2a6503b8aad0921cca70e61e60259d)

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/853271
Committed: https://opendev.org/openstack/nova/commit/cbf785709968fffc0a760e28f1cdb5c38b254232
Submitter: "Zuul (22348)"
Branch: stable/xena

commit cbf785709968fffc0a760e28f1cdb5c38b254232
Author: Balazs Gibizer <email address hidden>
Date: Tue Aug 16 13:19:03 2022 +0200

    Add reno for fixing bug 1941005

    Related-Bug: #1941005
    Related-Bug: #1983753
    Change-Id: I16ed1143ead3779c87698aa29bac005678db2993
    (cherry picked from commit 82cdfa23c7a0e269ab038e241bb7428b7f1391aa)
    (cherry picked from commit 19bac6e9c362ee692f4be92041bb3f6c3b9b6c23)

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

Related fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/nova/+/883904

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

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

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

Related fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/nova/+/883906

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

Related fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/nova/+/883908

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

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

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

Related fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/nova/+/883930

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

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/nova/+/883932

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

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

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

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/nova/+/883934

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/train)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/train
Review: https://review.opendev.org/c/openstack/nova/+/883934
Reason: stable/train branch of nova projects' have been tagged as End of Life. All open patches have to be abandoned in order to be able to delete the branch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/train
Review: https://review.opendev.org/c/openstack/nova/+/883932
Reason: stable/train branch of nova projects' have been tagged as End of Life. All open patches have to be abandoned in order to be able to delete the branch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/train
Review: https://review.opendev.org/c/openstack/nova/+/883933
Reason: stable/train branch of nova projects' have been tagged as End of Life. All open patches have to be abandoned in order to be able to delete the branch.

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

This issue was fixed in the openstack/nova 25.2.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/ussuri)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/nova/+/883909
Reason: stable/ussuri branch of openstack/nova transitioned to End of Life and is about to be deleted. To be able to do that, all open patches need to be abandoned.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/nova/+/883930
Reason: stable/ussuri branch of openstack/nova transitioned to End of Life and is about to be deleted. To be able to do that, all open patches need to be abandoned.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/nova/+/883908
Reason: stable/ussuri branch of openstack/nova transitioned to End of Life and is about to be deleted. To be able to do that, all open patches need to be abandoned.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova xena-eom

This issue was fixed in the openstack/nova xena-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/victoria)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/victoria
Review: https://review.opendev.org/c/openstack/nova/+/883905
Reason: stable/victoria branch of openstack/nova is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/victoria if you want to further work on this patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/victoria
Review: https://review.opendev.org/c/openstack/nova/+/883904
Reason: stable/victoria branch of openstack/nova is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/victoria if you want to further work on this patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/victoria
Review: https://review.opendev.org/c/openstack/nova/+/883906
Reason: stable/victoria branch of openstack/nova is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/victoria if you want to further work on this patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/wallaby)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/nova/+/853274
Reason: stable/wallaby branch of openstack/nova is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/wallaby if you want to further work on this patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/nova/+/853275
Reason: stable/wallaby branch of openstack/nova is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/wallaby if you want to further work on this patch.

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.