Bug 1732755 - Openstack volume backup set fails -> API version '3.0' is not supported on 'cinderclient.v3.volume_backups.update' method.
Summary: Openstack volume backup set fails -> API version '3.0' is not supported on 'c...
Keywords:
Status: NEW
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-openstackclient
Version: 15.0 (Stein)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact: Tzach Shefi
URL:
Whiteboard:
Depends On: 1713701
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-24 09:51 UTC by Tzach Shefi
Modified: 2020-02-25 10:08 UTC (History)
5 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)

Description Tzach Shefi 2019-07-24 09:51:40 UTC
Description of problem: Due to the lack of microversion support this command which is listed under OSC help (argo excepted to work) fails.  


$ openstack --help volume backup set
usage: openstack volume backup set [-h] [--name <name>]
                                   [--description <description>]
                                   [--state <state>]
                                   <backup>
Set volume backup properties
positional arguments:
  <backup>              Backup to modify (name or ID)
optional arguments:
  -h, --help            show this help message and exit
  --name <name>         New backup name
  --description <description>
                        New backup description
  --state <state>       New backup state ("available" or "error") (admin only)
                        (This option simply changes the state of the backup in
                        the database with no regard to actual status, exercise
                        caution when using)

However when we try to use it, bck is a name of an existing cinder volume backup, it fails with below error: 

openstack volume backup set bck --description kuku
Failed to update backup name or description: API version '3.0' is not supported on 'cinderclient.v3.volume_backups.update' method.


Support for this command was added on Cinder's python micro version 3.9
$ cinder --os-volume-api-version 3.9 help backup-update
usage: cinder backup-update [--name [<name>]] [--description <description>]
                            <backup>

Updates a backup.

Positional arguments:
  <backup>              Name or ID of backup to rename.

Optional arguments:
  --name [<name>]       New name for backup.
  --description <description>
                        Backup description. Default=None.


Version-Release number of selected component (if applicable):
python-openstackclient-lang-3.14.3-3.el7ost.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Create a cinder volume:
#openstack volume create vol2 --size 2 
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| attachments         | []                                   |
| availability_zone   | nova                                 |
| bootable            | false                                |
| consistencygroup_id | None                                 |
| created_at          | 2019-07-24T09:46:51.000000           |
| description         | None                                 |
| encrypted           | False                                |
| id                  | 6819dddb-9285-42c2-adfb-03a061aabbc8 |
| migration_status    | None                                 |
| multiattach         | False                                |
| name                | vol2                                 |
| properties          |                                      |
| replication_status  | None                                 |
| size                | 2                                    |
| snapshot_id         | None                                 |
| source_volid        | None                                 |
| status              | creating                             |
| type                | None                                 |
| updated_at          | None                                 |
| user_id             | a164356849714cfc8d815401edd222d3     |
+---------------------+--------------------------------------+


2. Create a backup for said volume:
#openstack volume backup create vol2 --name bck
+-------+--------------------------------------+
| Field | Value                                |
+-------+--------------------------------------+
| id    | aac97cf8-3471-4f04-b1b6-8333fa4b8146 |
| name  | bck                                  |
+-------+--------------------------------------+


3. Once backup is available:
openstack volume backup list
+--------------------------------------+------+-------------+-----------+------+
| ID                                   | Name | Description | Status    | Size |
+--------------------------------------+------+-------------+-----------+------+
| aac97cf8-3471-4f04-b1b6-8333fa4b8146 | bck  | None        | available |    2 |
+--------------------------------------+------+-------------+-----------+------+


4. Try to update backup's description:
#openstack volume backup set bck --description kuku
Failed to update backup name or description: API version '3.0' is not supported on 'cinderclient.v3.volume_backups.update' method.
One or more of the set operations failed


Actual results:
Fails to work we get an error

Expected results:
If it's listed under OSC help it should work.
Or we should remove/hide it from OSC help till it's enabled. 


Additional info:

Comment 1 Tzach Shefi 2019-07-24 10:01:48 UTC
Upstream wise where should I report this under python openstack client or Cinder? 

A minor openstack client bug, none the less should be reported, 
ideally also fixed somewhere done the line.

Comment 2 Tzach Shefi 2019-07-24 13:06:57 UTC
Sorry the version I gave before what from a wrong deployment.
OSP13 which also had the same problem. 

Any way this is the correct version: 
python-openstackclient-lang-3.18.0-0.20190312140834.6868499.el8ost.noarch

Comment 3 Alan Bishop 2019-07-30 02:33:01 UTC
I don't know why the openstack client is offering a command that requires a microversion, when the openstack client itself doesn't support microversions on "volume" commands. The problem, as recently discussed in a DFG:Storage meeting, is the cinder community (including the upstream community) has been inclined to work on the openstack client.


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