nova does not properly claim resources when server resized to a too big flavor

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

Bug Description

Problematic scenario: Boot a server then try to resize it to a flavor which requests more vcpu than what available in any compute hosts.

If the CoreFilter is enabled then the resize fails with NoValidHost and the resource allocation is OK.

However if the CoreFilter is not enabled in the FilterScheduler then the resize is accepted but the placement API is not updated with the actual resource (over) allocation.

In this case I don't know which would be the expected behavior:
Option A: No valid host shall be raised
Option B: Resize is accepted and the resources state are updated properly

There is a patch proposed with functional tests that reproduces the problem https://review.openstack.org/#/c/490814

tags: added: place
tags: added: placement
removed: place
summary: - nova does not properly claim resources when resized to a too big flavor
+ nova does not properly claim resources when server resized to a too big
+ flavor
Changed in nova:
importance: Undecided → High
Changed in nova:
status: New → Confirmed
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/491491

Changed in nova:
assignee: nobody → Balazs Gibizer (balazs-gibizer)
status: Confirmed → In Progress
Changed in nova:
assignee: Balazs Gibizer (balazs-gibizer) → Ed Leafe (ed-leafe)
Changed in nova:
assignee: Ed Leafe (ed-leafe) → Balazs Gibizer (balazs-gibizer)
Revision history for this message
Matt Riedemann (mriedem) wrote :

This appears to be a regression in Pike:

https://github.com/openstack/nova/blob/stable/ocata/nova/scheduler/filter_scheduler.py#L188

So tagged with pike-rc-potential.

tags: added: pike-r
tags: added: pike-rc-potential
removed: pike-r
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.openstack.org/490814
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=13f52d443ed2a5154c9b10ee19ea5aed8205e37b
Submitter: Jenkins
Branch: master

commit 13f52d443ed2a5154c9b10ee19ea5aed8205e37b
Author: Balazs Gibizer <email address hidden>
Date: Fri Aug 4 09:30:38 2017 +0200

    Test resize with too big flavor

    This test tries to resize to a flavor that requests more VCPU than
    what the compute hosts has available and expect the resize to fail.
    However placement returns no allocation candidate and the scheduler
    falls back to the legacy filtering. As CoreFilter is not enabled the
    filtering result in hosts selected without enough VCPU resource.

    This is a test for an open bug therefore it asserts the wrong behavior
    but it has the proper assert commented out.

    Related-bug: #1708637
    Change-Id: Ibd7f695d51b1f8497ca492968c7e5c69ada0a85c

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

Reviewed: https://review.openstack.org/491491
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6b0ab40e4233a480c9bdcca657f594d7e90fadc8
Submitter: Jenkins
Branch: master

commit 6b0ab40e4233a480c9bdcca657f594d7e90fadc8
Author: Balazs Gibizer <email address hidden>
Date: Mon Aug 7 15:12:25 2017 +0200

    Raise NoValidHost if no allocation candidates

    Placement took over the role of the CoreFilter, RamFilter and DiskFilter
    from the FilterScheduler. Therefore if placement returns no allocation
    candidates for a request then scheduling should be stopped as this means
    there is not enough VCPU, MEMORY_MB, or DISK_GB available in any compute
    node for the request.

    Change-Id: If20a20e5cce7ab490998643e32556a1016646b07
    Closes-Bug: #1708637

Changed in nova:
status: In Progress → Fix Released
Matt Riedemann (mriedem)
tags: removed: pike-rc-potential
tags: added: resize
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 16.0.0.0rc1

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

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.