TypeError: delete_allocation_for_failed_resize() takes exactly 5 arguments (4 given) in ComputeManager.prep_resize

Bug #1781100 reported by Matt Riedemann on 2018-07-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Medium
Matt Riedemann
Queens
Medium
Matt Riedemann

Bug Description

I found this (without trying) but writing this test:

http://paste.openstack.org/show/725514/

    2018-07-10 22:03:11,206 INFO [nova.compute.manager] Old-style migration 156eaee2-48f0-49f8-aa8a-daa297864d25 is being reverted; no migration claims found on original node to swap.
    2018-07-10 22:03:11,220 ERROR [nova.compute.manager] Setting instance vm_state to ERROR
    Traceback (most recent call last):
      File "nova/compute/manager.py", line 7634, in _error_out_instance_on_exception
        yield
      File "nova/compute/manager.py", line 4163, in prep_resize
        instance, node, instance_type)
    TypeError: delete_allocation_for_failed_resize() takes exactly 5 arguments (4 given)

The bug was introduced with this change:

https://review.openstack.org/#/q/I7891b98f225f97ad47f189afb9110ef31c810717

Matt Riedemann (mriedem) on 2018-07-11
Changed in nova:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Matt Riedemann (mriedem)

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

Changed in nova:
status: Triaged → In Progress

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

commit 78af1de1587fb83e09d1c0639fb5a28eb6e51a27
Author: Matt Riedemann <email address hidden>
Date: Tue Jul 10 22:11:05 2018 -0400

    Fix TypeError in prep_resize allocation cleanup

    The CachingScheduler doesn't create allocations in
    placement so when prep_resize fails and it tries
    to revert allocations, the _revert_allocation() method
    returns False and then prep_resize calls
    delete_allocation_for_failed_resize() which since change
    I7891b98f225f97ad47f189afb9110ef31c810717 has taken a
    context argument, but that's not being passed so it
    results in a TypeError.

    This fixes the TypeError and adds a functional test case
    which runs a resize reschedule scenario with the
    CachingScheduler.

    Change-Id: I0ec0c2d3f7ef8d2274b97a28a175d53921edc9db
    Closes-Bug: #1781100

Changed in nova:
status: In Progress → Fix Released

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

Reviewed: https://review.openstack.org/581741
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=246c61d82b6d2a4249cf2408268830dfbd71b8f6
Submitter: Zuul
Branch: stable/queens

commit 246c61d82b6d2a4249cf2408268830dfbd71b8f6
Author: Matt Riedemann <email address hidden>
Date: Tue Jul 10 22:11:05 2018 -0400

    Fix TypeError in prep_resize allocation cleanup

    The CachingScheduler doesn't create allocations in
    placement so when prep_resize fails and it tries
    to revert allocations, the _revert_allocation() method
    returns False and then prep_resize calls
    delete_allocation_for_failed_resize() which since change
    I7891b98f225f97ad47f189afb9110ef31c810717 has taken a
    context argument, but that's not being passed so it
    results in a TypeError.

    This fixes the TypeError and adds a functional test case
    which runs a resize reschedule scenario with the
    CachingScheduler.

    Change-Id: I0ec0c2d3f7ef8d2274b97a28a175d53921edc9db
    Closes-Bug: #1781100
    (cherry picked from commit 78af1de1587fb83e09d1c0639fb5a28eb6e51a27)

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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers