resize revert still hitting the legacy allocation handling

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

Bug Description

During reverting a resize or a migration Nova still hits the legacy allocation handling code even if the migration is started without any old compute or controller in the system. Search for "Doing legacy allocation math" in [2] for examples.

It is caused by a faulty logic in compute manager[1]. It tries to decide if the reverted migration holds allocation or not to see if the migration is a legacy one or not. However in case of [1] the cn_uuid points to the destination node. Migration never holds allocation on the destination node so the condition at L3955 never be true and the code falls to the legacy path.

It seems that the legacy path still able to handled the allocation properly in the above case so no resource is leaked.

[1] https://github.com/openstack/nova/blob/8688b25ca7379391cba28fab30b5a628957e673e/nova/compute/manager.py#L3952-L3955
[2] http://logs.openstack.org/72/587772/1/check/neutron-tempest-multinode-full/0a2fb57/logs/screen-n-cpu.txt.gz

Tags: compute resize
Changed in nova:
importance: Undecided → Low
assignee: nobody → Balazs Gibizer (balazs-gibizer)
tags: added: compute
tags: added: resize
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/589425

Changed in nova:
status: New → In Progress
Changed in nova:
assignee: Balazs Gibizer (balazs-gibizer) → Dan Smith (danms)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 3311d579db2482c5d06cd4e245da57333b79a8db
Author: Balazs Gibizer <email address hidden>
Date: Tue Aug 7 12:57:47 2018 +0200

    Fix resize revert to use non-legacy alloc handling

    During the revert of resize or migrate nova tries to drop the
    allocation on the target host. But first it decides if the resize uses
    the new style allocation handling where the source host allocation is
    held by the migration. If not then the legacy double-up allocation
    handling is triggered.

    However the implementation tried to check if the migration holds
    allocation on the destination host and that is clearly wrong as migration
    only holds alloction on the source host.

    This patch now changes the check to simply assert if there is any
    allocation held by the migration.uuid.

    Change-Id: I41c10ca5caa01dda950dd17319889963850fed59
    Closes-Bug: #1785776

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0rc1

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