← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1533663] Re: Volume migration works only via CLI

 

Seems that the issue is a bit more complicated.

The v2 client migrate_volume method[0] calls the
manager.migrate_volume[1] with only 3 parameters: host, force_host_copy,
lock_volume while the manager.migrate_volume signature needs 4: volume,
host, force_host_copy, lock_volume.

Looks like the volume ID is not being passed down in the method.


[0]: https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/volumes.py#L143-L145
[1]: https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/volumes.py#L505-L517

** Also affects: python-cinderclient
   Importance: Undecided
       Status: New

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

Title:
  Volume migration works only via CLI

Status in OpenStack Dashboard (Horizon):
  New
Status in python-cinderclient:
  New

Bug description:
  Running OpenStack Stable/Liberty on CentOS 7.1.

  The volume migration between Cinder hosts does not work when invoked via Horizon (Pop-up shows: "Error: Failed to migrate volume.").
  The Volume migration invoked via command line however works fine.

  In /var/log/httpd/error_log the following messages can be found on
  every attempt to migrate a volume via Dashboard:

  [:error] [pid 4111] Recoverable error: migrate_volume() takes exactly
  5 arguments (4 given)

  The error presumably comes from /usr/lib/python2.7/site-
  packages/cinderclient/v2/volumes.py at line 578.

  The 'migrate_volume' method there expects all arguments as positional
  and the 'lock_volume' var seems not being provided in the case when
  migration invoked in Horizon.

  Making 'lock_volume' a kwarg with False value as default fixes the issue and does not break the original CLI behavior. I.e.  when volume migration invoked via CLI the lock_volume will be False, unless the respective flag was explicitly given.
  The volume migration invoked via Horizon with this change will now work, but volume cannot be 'locked' during migration. The respective functionality seems to be not yet fully integrated in Horizon -> there is even no check box in the frontend yet and I could not find blueprints proposing those changes..

  So, attached patch is a simple workaround rather than a solution, it
  allows run volume migrations via Horizon, however with no volume
  locking.

  
  My setup includes 2 Cinder Storage nodes (LVM/iSCSI) , where one is also a controller (i.e. with cinder-api and cinder-scheduler).

  The versions are as follows:

  openstack-dashboard  1:8.0.0-1.el7
  openstack-dashboard-theme  1:8.0.0-1.el7
  openstack-cinder  1:7.0.1-1.el7
  python-cinder  1:7.0.1-1.el7
  python-cinderclient  1.4.0-1.el7

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


References