errors_out_migration decorator does not work with RPC calls

Bug #1300380 reported by John Warren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
John Warren
Icehouse
Fix Released
Medium
Chuck Short

Bug Description

The errors_out_migration decorator in nova/compute/manager.py is attempting to use positional arguments to get the migration parameter. However, at run time, the decorated methods are called via RPC calls which specify all of their arguments as keyword arguments. The decorator needs to be fixed so that it works with RPC calls.

John Warren (jswarren)
Changed in nova:
status: New → In Progress
Revision history for this message
Matt Riedemann (mriedem) wrote :

Patch is here: https://review.openstack.org/#/c/84215

This was a bug introduced late in Icehouse.

Changed in nova:
assignee: nobody → John Warren (jswarren)
importance: Undecided → High
tags: added: icehouse-rc-potential
Changed in nova:
importance: High → Medium
tags: added: icehouse-backport-potential
removed: icehouse-rc-potential
Revision history for this message
Matt Riedemann (mriedem) wrote :

(2:37:29 PM) mriedem: jswarren: so what do we lose when that fails?
(2:38:02 PM) mriedem: jswarren: it's a decorator on resize_instance and finish_resize that sets the migration.status to error right?
(2:38:16 PM) jswarren: It will continuously log that a migration is being skipped.
(2:38:23 PM) mriedem: jswarren: oh, so we're no worse off than the original bug
(2:38:29 PM) mriedem: that the decorator was added for
(2:38:39 PM) jswarren: correct.
(2:38:42 PM) mriedem: jswarren: i'd consider that less than high priority for icehouse, it could be a backport
(2:38:56 PM) jswarren: Yeah, that's what I thought. Just wanted to confirm.

Revision history for this message
John Warren (jswarren) wrote :

I got requests for a traceback or other log info when the failure occurs... The failure is actually silent. The code iterates through the args list, but it is empty, because the decorated methods were called with only kwargs, so there is no log or traceback to add to this bug.

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

Reviewed: https://review.openstack.org/84215
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=72cd430e971589f7872a9d4e8f173c68b4955375
Submitter: Jenkins
Branch: master

commit 72cd430e971589f7872a9d4e8f173c68b4955375
Author: John Warren <email address hidden>
Date: Mon Mar 31 18:52:12 2014 +0000

    Change errors_out_migration decorator to work with RPC

    This decorator in nova/compute/manager.py was written to work with
    positional arguments, but at run time the decorated methods are
    called via RPC with keyword arguments. This change fixes the
    decorator and the associated test cases.

    Closes-Bug: #1300380

    Change-Id: I9f87151a71e5217e7eff97cdc5cad2c85b620fa5

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to nova (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/89655

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

Reviewed: https://review.openstack.org/89655
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=66c7ca1ed63ac08afaa62728f7a165769bca5b56
Submitter: Jenkins
Branch: stable/icehouse

commit 66c7ca1ed63ac08afaa62728f7a165769bca5b56
Author: John Warren <email address hidden>
Date: Mon Mar 31 18:52:12 2014 +0000

    Change errors_out_migration decorator to work with RPC

    This decorator in nova/compute/manager.py was written to work with
    positional arguments, but at run time the decorated methods are
    called via RPC with keyword arguments. This change fixes the
    decorator and the associated test cases.

    Closes-Bug: #1300380

    Change-Id: I9f87151a71e5217e7eff97cdc5cad2c85b620fa5
    (cherry picked from commit 72cd430e971589f7872a9d4e8f173c68b4955375)

Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-1 → 2014.2
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.