Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1689342 - OpenStack CLI produces exception when trying to restore volume backup
Summary: OpenStack CLI produces exception when trying to restore volume backup
Keywords:
Status: NEW
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-openstackclient
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Sofia Enriquez
QA Contact: Filip Hubík
URL:
Whiteboard:
: 1693341 1694742 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-15 16:42 UTC by Filip Hubík
Modified: 2019-04-02 19:02 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)
output of "openstack volume ... --verbose --debug" (deleted)
2019-03-15 16:42 UTC, Filip Hubík
no flags Details


Links
System ID Priority Status Summary Last Updated
Launchpad 1733315 None None None 2019-04-02 19:01:34 UTC

Description Filip Hubík 2019-03-15 16:42:51 UTC
Created attachment 1544543 [details]
output of "openstack volume ... --verbose --debug"

Description of problem:
On deployed OSP14 overcloud it is not possible to restore volume backup using standardized python2-openstaclient's interface, it is possible only using python-cinder's one.

(overcloud) [stack@undercloud-0 ~]$ openstack image list
+--------------------------------------+--------------------------------------------------------+--------+
| ID                                   | Name                                                   | Status |
+--------------------------------------+--------------------------------------------------------+--------+
| c05d0150-c881-4cae-a60f-d7a9635f0222 | cirros-0.3.5-x86_64-disk.img                           | active |
| 93a1f193-b2e3-435d-a8d8-fc4501eb8d1e | cirros-0.3.5-x86_64-disk.img_alt                       | active |
+--------------------------------------+--------------------------------------------------------+--------+
$ openstack volume create test --image cirros-0.3.5-x86_64-disk.img --size 1
$ openstack volume backup create test --name backup_test
$ openstack volume backup restore backup_test test
'VolumeBackupsRestore' object is not iterable
$ echo $?
1

# In depth "openstack volume backup restore backup_test test --verbose --debug" ends with
...
RESP BODY: {"restore": {"backup_id": "e5442d2e-fe71-4365-8f28-a650c7339f9b", "volume_name": "test2", "volume_id": "7bd88087-1608-49ff-a668-731277e67a0c"}}
POST call to volumev3 for http://10.0.0.113:8776/v3/223d15715dd24bd2ac9a52795379f3b7/backups/e5442d2e-fe71-4365-8f28-a650c7339f9b/restore used request id req-496e2897-1ed7-43be-9444-84d50803ac18
'VolumeBackupsRestore' object is not iterable
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 402, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 116, in run
    column_names, data = self.take_action(parsed_args)
TypeError: 'VolumeBackupsRestore' object is not iterable
clean_up RestoreVolumeBackup: 'VolumeBackupsRestore' object is not iterable
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 281, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 175, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 402, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 116, in run
    column_names, data = self.take_action(parsed_args)
TypeError: 'VolumeBackupsRestore' object is not iterable

END return value: 1

# but on the other hand, using the old cinder CLI:

$ cinder backup-restore --volume test backup_test
+-------------+--------------------------------------+
| Property    | Value                                |
+-------------+--------------------------------------+
| backup_id   | e5442d2e-fe71-4365-8f28-a650c7339f9b |
| volume_id   | 7bd88087-1608-49ff-a668-731277e67a0c |
| volume_name | test                                 |
+-------------+--------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ echo $?
0

Version-Release number of selected component (if applicable):
OSP14

How reproducible:
Always

Steps to Reproduce:
1. Deploy OSP14 topology 1uc,3contr,2comp,3ceph using Infrared
2. Access stack@undercloud, source ~/overcloudrc
3. Perform above

Additional info:
python2-openstackclient-3.16.2-1.el7ost.noarch

Comment 1 Filip Hubík 2019-03-15 16:43:47 UTC
It looks like we might be missing changes around https://review.openstack.org/#/c/624860 .

Comment 2 Steve Linabery 2019-03-15 17:20:34 UTC
(In reply to Filip Hubík from comment #1)
> It looks like we might be missing changes around
> https://review.openstack.org/#/c/624860 .

Yes, osp14 has python-openstackclient-3.16.2-1.el7ost in 14z1. 624860 will have to be backported upstream to stable/rocky if that's the only missing piece.

Comment 4 Alan Bishop 2019-04-02 19:02:03 UTC
*** Bug 1693341 has been marked as a duplicate of this bug. ***

Comment 5 Alan Bishop 2019-04-02 19:02:14 UTC
*** Bug 1694742 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.