rebuild to same host with different image shouldn't check with placement

Bug #1750623 reported by Chris Friesen
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Hongbin Lu
Pike
Fix Committed
Medium
Lee Yarwood
Queens
Fix Released
Medium
Hongbin Lu

Bug Description

When doing a rebuild-to-same-host but with a different image, all we really want to do is ensure that the image properties for the new image are still valid for the current host. Accordingly we need to go through the scheduler (to run the image-related filters) but we don't want to do anything related to resource consumption.

Currently the scheduler will contact placement to get a pre-filtered list of compute nodes with sufficient free resources for the instance in question. If the instance is on a compute node that is close to full, this may result in the current compute node being filtered out of the list, which will result in a noValidHost exception.

Ideally, in the case where we are doing a rebuild-to-same-host we would simply retrieve the information for the current compute node from the DB instead of from placement, and then run the image-related scheduler filters.

Matt Riedemann (mriedem)
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
hongbin (hongbin034)
Changed in nova:
assignee: nobody → hongbin (hongbin034)
Hongbin Lu (hongbin.lu)
Changed in nova:
assignee: hongbin (hongbin034) → Hongbin Lu (hongbin.lu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/546357

Changed in nova:
status: Confirmed → In Progress
Changed in nova:
assignee: Hongbin Lu (hongbin.lu) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → hongbin (hongbin034)
assignee: hongbin (hongbin034) → Hongbin Lu (hongbin.lu)
Changed in nova:
assignee: Hongbin Lu (hongbin.lu) → Matt Riedemann (mriedem)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/561014

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

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/561015

Revision history for this message
Jay Pipes (jaypipes) wrote :

What if the image properties contain vCPU topology or NUMA resource information? If the new image properties specify a different vCPU topology or NUMA topology/memory pages amounts, then that effectively amounts to a resize doesn't it?

Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Hongbin Lu (hongbin.lu)
Revision history for this message
Chris Friesen (cbf123) wrote :

Yes, if the image properties result in different resources being consumed (different amount of CPU/RAM on each numa node for example, or different page size) then I think placement would need to know.

mriedem raised the possibility of simply preventing rebuild to an image that would result in different topology.

Revision history for this message
Matt Riedemann (mriedem) wrote :

We should fail the rebuild if the new image changes any hardware resource accounting stuff since we don't do a resource claim on the compute during a rebuild.

Revision history for this message
Matt Riedemann (mriedem) wrote :

The numa stuff changing during rebuild is IMO a separate bug which we should fix with a new filter mechanism somehow (fail fast in API or conductor pre-scheduler?) and then we can also backport that fix.

Revision history for this message
Chris Friesen (cbf123) wrote :

Opened https://bugs.launchpad.net/nova/+bug/1763766 to track preventing the resource consumption from changing during rebuild.

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

Reviewed: https://review.openstack.org/546357
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c3a894b6af32ff8ddba728328bc7d4e1339b2964
Submitter: Zuul
Branch: master

commit c3a894b6af32ff8ddba728328bc7d4e1339b2964
Author: Hongbin Lu <email address hidden>
Date: Tue Feb 20 22:05:42 2018 +0000

    Skip placement on rebuild in same host

    If the instance is rebuilt with a different image in the same
    host, we don't need to call placement because there is no change
    in resource consumption.

    Change-Id: Ie252271ecfd38a0a1c61c26e323cc03869889f0a
    Closes-Bug: #1750623

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

Reviewed: https://review.openstack.org/561014
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=04ea910ad13b412f410ccf520074cacee6bbe13e
Submitter: Zuul
Branch: stable/queens

commit 04ea910ad13b412f410ccf520074cacee6bbe13e
Author: Hongbin Lu <email address hidden>
Date: Tue Feb 20 22:05:42 2018 +0000

    Skip placement on rebuild in same host

    If the instance is rebuilt with a different image in the same
    host, we don't need to call placement because there is no change
    in resource consumption.

    Change-Id: Ie252271ecfd38a0a1c61c26e323cc03869889f0a
    Closes-Bug: #1750623
    (cherry-pick from c3a894b6af32ff8ddba728328bc7d4e1339b2964)

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

This issue was fixed in the openstack/nova 18.0.0.0b1 development milestone.

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

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

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

Reviewed: https://review.openstack.org/561015
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ffbf5918c650e8499de206b73f050d5e8580b04e
Submitter: Zuul
Branch: stable/pike

commit ffbf5918c650e8499de206b73f050d5e8580b04e
Author: Hongbin Lu <email address hidden>
Date: Tue Feb 20 22:05:42 2018 +0000

    Skip placement on rebuild in same host

    If the instance is rebuilt with a different image in the same
    host, we don't need to call placement because there is no change
    in resource consumption.

    Conflicts:
            nova/scheduler/manager.py
            nova/tests/fixtures.py
            nova/tests/unit/scheduler/test_scheduler.py

    NOTE(lyarwood): Pike Conflicts due to the following changes not being
    present until Queens Iae904afb6cb4fcea8bb27741d774ffbe986a5fb4,
    I03b95a2106624c2ea24835814ca38e954ec7a997 and
    Iacb9808ef7188e3419abfac9e8c5fb5a46c71c05.

    Change-Id: Ie252271ecfd38a0a1c61c26e323cc03869889f0a
    Closes-Bug: #1750623
    (cherry-pick from c3a894b6af32ff8ddba728328bc7d4e1339b2964)
    (cherry picked from commit 04ea910ad13b412f410ccf520074cacee6bbe13e)

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

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

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

This issue was fixed in the openstack/nova 16.1.5 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.