finish_revert_migration does not include context as parameter

Bug #1251261 reported by Guangya Liu (Jay Lau)
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Guangya Liu (Jay Lau)
Havana
Fix Released
Undecided
Unassigned

Bug Description

When finish_revert_migration is called, the caller of
finish_revert_migration already includes context as a parameter,
but finish_revert_migration did not reuse this parameter and still
re-generate the context inside finish_revert_migration, we should
add context as a new parameter for finish_revert_migration so that
the functions inside of it can reuse context when needed.

For the function _create_domain_and_network in libvirt/driver.py,
it set context as an optional parameter, but context isn't really
an optional parameter for this method. We should always pass a
context down because it might be needed somewhere inside
_create_domain_and_network().

Changed in nova:
assignee: nobody → Jay Lau (jay-lau-513)
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/54309
Committed: http://github.com/openstack/nova/commit/81fc3967bca0f154d72d5de7875b646e1b6c47c8
Submitter: Jenkins
Branch: master

commit 81fc3967bca0f154d72d5de7875b646e1b6c47c8
Author: Jay Lau <email address hidden>
Date: Fri Nov 22 23:32:38 2013 +0800

    Add context as parameter for two libvirt APIs

    When finish_revert_migration is called, the caller of
    finish_revert_migration already includes context as a parameter,
    but finish_revert_migration did not reuse this parameter and still
    re-generate the context inside finish_revert_migration, we should
    add context as a new parameter for finish_revert_migration so that
    the functions inside of it can reuse context when needed.

    For the function _create_domain_and_network in libvirt/driver.py,
    it set context as an optional parameter, but context isn't really
    an optional parameter for this method. We should always pass a
    context down because it might be needed somewhere inside
    _create_domain_and_network().

    The patch includes two parts:
    1) Add context as a new parameter for finish_revert_migration
    2) Set context as a required parameter for _create_domain_and_network

    Change-Id: I72d131fc8dce903400e3080d51ba0fc0a1320751
    Closes-Bug: #1251261

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/67613

wingwj (wingwj)
tags: added: havana-backport-potential
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/havana)

Reviewed: https://review.openstack.org/67613
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6a1def686449675a4524cbbb98689e9f66bdf1e4
Submitter: Jenkins
Branch: stable/havana

commit 6a1def686449675a4524cbbb98689e9f66bdf1e4
Author: Jay Lau <email address hidden>
Date: Fri Nov 22 23:32:38 2013 +0800

    Add context as parameter for two libvirt APIs

    When finish_revert_migration is called, the caller of
    finish_revert_migration already includes context as a parameter,
    but finish_revert_migration did not reuse this parameter and still
    re-generate the context inside finish_revert_migration, we should
    add context as a new parameter for finish_revert_migration so that
    the functions inside of it can reuse context when needed.

    For the function _create_domain_and_network in libvirt/driver.py,
    it set context as an optional parameter, but context isn't really
    an optional parameter for this method. We should always pass a
    context down because it might be needed somewhere inside
    _create_domain_and_network().

    The patch includes two parts:
    1) Add context as a new parameter for finish_revert_migration
    2) Set context as a required parameter for _create_domain_and_network

    Closes-Bug: #1251261
    (cherry picked from commit 81fc3967bca0f154d72d5de7875b646e1b6c47c8)

    Conflicts:
     nova/tests/compute/test_compute_mgr.py
     nova/virt/vmwareapi/vmops.py

    Change-Id: I72d131fc8dce903400e3080d51ba0fc0a1320751

tags: added: in-stable-havana
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.