Comment 7 for bug 1444300

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

Reviewed: https://review.openstack.org/175570
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a4e9a146c3993f5775501716a21632f34a63a3ad
Submitter: Jenkins
Branch: stable/kilo

commit a4e9a146c3993f5775501716a21632f34a63a3ad
Author: Rajesh Tailor <email address hidden>
Date: Wed Apr 15 06:59:04 2015 -0700

    Fix kwargs['migration'] KeyError in @errors_out_migration decorator

    @errors_out_migration decorator is used in the compute manager on
    resize_instance and finish_resize methods of ComputeManager class.
    It is decorated via @utils.expects_func_args('migration') to check
    'migration' is a parameter to the decorator method, however, that
    only ensures there is a migration argument, not that it's in args or
    kwargs (either is fine for what expects_func_args checks).
    The errors_out_migration decorator can get a KeyError when checking
    kwargs['migration'] and fails to set the migration status to 'error'.

    This fixes the KeyError in the decorator by normalizing the args/kwargs
    list into a single dict that we can pull the migration from.

    Change-Id: I774ac9b749b21085f4fbcafa4965a78d68eec9c7
    Closes-Bug: 1444300
    (cherry picked from commit 3add7923fc16c050d4cfaef98a87886c6b6a589c)