Compute manager _poll_live_migration 'instance_ref' argument should be renamed to 'instance'

Bug #1296593 reported by Nikola Đipanov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Nikola Đipanov

Bug Description

The reason is 2-fold:

* wrap_instance_fault decorator expects the argument to be 'instance'
* We are using new-wold objects in live migration and instance_ref used to imply a dict.

Changed in nova:
milestone: none → icehouse-rc1
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Nikola Đipanov (ndipanov)
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Nikola Đipanov (ndipanov) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/78984
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=7cf7d4a6db69d9feefd8a3b120ec272528f90eea
Submitter: Jenkins
Branch: master

commit 7cf7d4a6db69d9feefd8a3b120ec272528f90eea
Author: Nikola Dipanov <email address hidden>
Date: Fri Mar 7 15:04:44 2014 +0100

    Add a decorator decorator that checks func args

    This patch adds a decorator for decorators that allows specifying the
    arg names that the function being decorated must accept. If the function
    being decorated does not accept the specified args, an exception will be
    thrown during 'decoration', meaning import time usually.

    If however the function accepts variable number of arguments, the
    decorator will be a no-op as it is not possible to guess what will be
    passed at runtime. This is however good enough for Nova's compute
    manager decorators that inspired this work, as they decorate methods
    with well defined and even versioned arguments.

    Several decorators used in compute manager are now fortified with this
    "compile time" check.

    Partial-bug:#1296593
    Change-Id: I00ebcc8a092fa0894ba8764699093f59a46b8647

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/78985
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=706971bdf25b28cc1d572efe278cebec88506f29
Submitter: Jenkins
Branch: master

commit 706971bdf25b28cc1d572efe278cebec88506f29
Author: Nikola Dipanov <email address hidden>
Date: Fri Mar 7 16:16:46 2014 +0100

    Rename _post_live_migration instance_ref arg

    This was causing issues with the wrap_instance_fault decorator, as it
    expects the argument to be called 'instance'. Also it is being passed an
    instance object now so instance_ref can be misleading.

    This patch also moves all the tests for the said method to use instance
    objects instead of a dict, as this is what is happening in reality.

    Finally we secure the wrap_instance_fault decorator with a recently
    introduced expects_func_args decorator so that we make sure this issue
    does not go unnoticed in the future.

    Closes-bug:#1296593
    Change-Id: I140bfec2a52bf659a725a7dbe78ba5c527ed26de

Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-rc1 → 2014.1
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.