← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1538619] Re: Fix up argument order in remove_volume_connection()

 

Reviewed:  https://review.openstack.org/280923
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=603e7db9a8091191ed2605c04c5b72593f0b0094
Submitter: Jenkins
Branch:    master

commit 603e7db9a8091191ed2605c04c5b72593f0b0094
Author: gh159m <gh159m@xxxxxxx>
Date:   Tue Feb 16 14:42:25 2016 -0600

    Fixed arguement order in remove_volume_connection
    
    RPC API and ComputeManager both contain a function named
    remove_volume_connection with the same arguments, but ordered
    differently.  This causes problems when called by
    _rollback_live_migration.
    
    This fix is more for future consistency, as this was affecting the
    _ComputeV4Proxy class, which is present in stable/kilo but
    no longer exists.
    
    Change-Id: Iacadd5f015888c4181b8a332625ec746f991e239
    Closes-Bug: #1538619


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1538619

Title:
  Fix up argument order in remove_volume_connection()

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  The RPC API function for remove_volume_connection() uses a different argument order than the ComputeManager function of the same name.
      
  The normal RPC code uses named arguments, but the _ComputeV4Proxy version doesn't, and it has the order wrong.  This causes problems when called by _rollback_live_migration().

  The fix seems to be trivial:
  diff --git a/nova/compute/manager.py b/nova/compute/manager.py
  index d6efd18..65c1b75 100644
  --- a/nova/compute/manager.py
  +++ b/nova/compute/manager.py
  @@ -6870,7 +6870,8 @@ class _ComputeV4Proxy(object):
                                                             instance)
   
       def remove_volume_connection(self, ctxt, instance, volume_id):
  -        return self.manager.remove_volume_connection(ctxt, instance, volume_id)
  +        # The RPC API uses different argument order than the local API.
  +        return self.manager.remove_volume_connection(ctxt, volume_id, instance)
   
       def rescue_instance(self, ctxt, instance, rescue_password,
                           rescue_image_ref, clean_shutdown):

  Given that this only applies to stable/kilo I'm guessing there's no
  point in trying to push a patch, but I thought I'd include this here
  in case anyone else runs into it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1538619/+subscriptions


References