openstack volume backup restore fails to produce output
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-openstackclient |
In Progress
|
Undecided
|
Pavlo Shchelokovskyy |
Bug Description
using python-
restoring backup to volume produces the following output
❯ openstack volume backup restore cirros-lvm2ceph restored
too many values to unpack (expected 2)
note that the command actually succeeds (backup is restored to the volume as expected), problem is clearly in the output path
runnning with --debug shows a bit more hints
❯ openstack volume backup restore cirros-lvm2ceph restored2
...
RESP BODY: {"restore": {"backup_id": "6390761c-
POST call to block-storage for https:/
too many values to unpack (expected 2)
Traceback (most recent call last):
File "/home/
result = cmd.run(
File "/home/
return super(Command, self).run(
File "/home/
column_names, data = self.take_
ValueError: too many values to unpack (expected 2)
clean_up RestoreVolumeBa
END return value: 1
So the problem is that this
https:/
returns openstack.
What's more, the code in openstacksdk is also sub-optimal. It returns the Backup object itself, loosing actual response that has some useful info like volume_id of the restored volume that might've not been known before (if the volume was created).
So there're several options IMO:
- return nothing, only fail if the restore call fails
- return the same as backup show
- return the backup list of one current backup (like shortened version of backup show)
- return a custom table/object with what was actually returned by the API call, which is backup_id, volume_id, volume_name (need to be resolved first).
Changed in python-openstackclient: | |
assignee: | nobody → Pavlo Shchelokovskyy (pshchelo) |
Fix proposed to branch: master /review. opendev. org/c/openstack /python- openstackclient /+/916906
Review: https:/