[Bug 1968783] [NEW] no return code from cinder api calls

Walt Boring 1968783 at bugs.launchpad.net
Tue Apr 12 20:12:00 UTC 2022


Public bug reported:

Trying to use the openstacksdk to call cinder's migrate_volume and i was
not getting any return code.  The cinder API returns a 400 because the
volume I'm trying to migrate has a snapshot, so it will always fail.

The problem is the openstacksdk doesn't return anything from ANY of the
cinder calls.  Checking the volume status after the migrate_volume call
is useless, because no action was taken on the volume.


So looking at the openstacksdk code, you can see almost all the cinder calls don't return anything:
No return:
https://github.com/openstack/openstacksdk/blob/master/openstack/block_storage/v3/_proxy.py#L616

No Return:
https://github.com/openstack/openstacksdk/blob/master/openstack/block_storage/v3/_proxy.py#L588

No Return:
https://github.com/openstack/openstacksdk/blob/master/openstack/block_storage/v3/_proxy.py#L495


Yet, the underlying volume object's _action() method does return the result, but the volume object doesn't return the result of that _action call here:
https://github.com/openstack/openstacksdk/blob/master/openstack/block_storage/v3/volume.py#L205

** Affects: python-openstacksdk (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-openstacksdk in Ubuntu.
https://bugs.launchpad.net/bugs/1968783

Title:
  no return code from cinder api calls

Status in python-openstacksdk package in Ubuntu:
  New

Bug description:
  Trying to use the openstacksdk to call cinder's migrate_volume and i
  was not getting any return code.  The cinder API returns a 400 because
  the volume I'm trying to migrate has a snapshot, so it will always
  fail.

  The problem is the openstacksdk doesn't return anything from ANY of
  the cinder calls.  Checking the volume status after the migrate_volume
  call is useless, because no action was taken on the volume.


  So looking at the openstacksdk code, you can see almost all the cinder calls don't return anything:
  No return:
  https://github.com/openstack/openstacksdk/blob/master/openstack/block_storage/v3/_proxy.py#L616

  No Return:
  https://github.com/openstack/openstacksdk/blob/master/openstack/block_storage/v3/_proxy.py#L588

  No Return:
  https://github.com/openstack/openstacksdk/blob/master/openstack/block_storage/v3/_proxy.py#L495

  
  Yet, the underlying volume object's _action() method does return the result, but the volume object doesn't return the result of that _action call here:
  https://github.com/openstack/openstacksdk/blob/master/openstack/block_storage/v3/volume.py#L205

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-openstacksdk/+bug/1968783/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list