wrong argument when calling saft_utils.getcallargs() in nova/exception.py

Bug #1207153 reported by David Xie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
David Xie

Bug Description

When calling live-migration on nova and it failes, nova will try to send a notification. However, this notification sends wrong parameters then.

David Xie (david-xie)
Changed in nova:
assignee: nobody → David Xie (david-xie)
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/39633

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

Reviewed: https://review.openstack.org/39633
Committed: http://github.com/openstack/nova/commit/32b1aa24a6f45bd00165820f8b6e342ddc2867b6
Submitter: Jenkins
Branch: master

commit 32b1aa24a6f45bd00165820f8b6e342ddc2867b6
Author: David Xie <email address hidden>
Date: Wed Sep 11 21:54:47 2013 +0800

    Wrong arguments when calling safe_utils.getcallargs()

    When calling safe_utils.getcallargs(), it will get all argnames from
    definition of a function. As every function in Nova has a argument named
    `context`, so argnames will always start with `context`.

    In nova/exception.py#81, *args is a list of arguments which does not
    start with
    `context`, however, argnames starts with `context`, this will lead to a
    mismatching when zip it into a dict.

    Solution for this is that when calling getcallargs(), pass context as
    one argument.

    Change-Id: I4ce81e1862fb2d741f15747b04aa6bf1a2243364
    Fixes: bug #1207153

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → havana-rc1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-rc1 → 2013.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.