Launchpad

Cinder and python-cinderclient don't allow the force arg for volume snapshots on microversion 3.66+. cinderclient throws an error, which results in an error from osc in this situation.

Details below:

eharney@ eharney- devstack3: ~$ openstack volume snapshot create --volume 3f692a4b- c6ba-4ec3- b536-d0b8e05316 f3 myvolumesnapshot --os-volume- api-version 3.68
Since microversion 3.66 of the Block Storage API, the 'force' option is invalid for this request. For backward compatibility, however, when the 'force' flag is passed with a value evaluating to True, it is silently ignored.

eharney@ eharney- devstack3: ~$ openstack volume snapshot list

eharney@ eharney- devstack3: ~$ openstack volume snapshot create --volume 3f692a4b- c6ba-4ec3- b536-d0b8e05316 f3 myvolumesnapshot --os-volume- api-version 3.68 --debug
START with options: volume snapshot create --volume 3f692a4b- c6ba-4ec3- b536-d0b8e05316 f3 myvolumesnapshot --os-volume- api-version 3.68 --debug
options: Namespace( verbose_ level=3, log_file=None, deferred_ help=False, debug=True, cloud='', region_ name='RegionOne ', cacert=None, cert='', key='', verify=None, insecure=None, default_ domain= 'default' , interface='', service_ provider= '', remote_ project_ name='' , remote_ project_ id='', remote_ project_ domain_ name='' , remote_ project_ domain_ id='', timing=False, os_beta_ command= False, profile='', os_compute_ api_version= '', os_identity_ api_version= '', os_image_ api_version= '', os_network_ api_version= '', os_object_ api_version= '', os_volume_ api_version= '3.68', os_key_ manager_ api_version= '1', os_dns_ api_version= '2', os_placement_ api_version= '1', auth_type= 'password' , username='admin', password='***', endpoint='', auth_url='http:// 10.0.110. 250/identity', system_scope='', domain_id='', domain_name='', project_id='', project_ name='admin' , project_ domain_ id='default' , project_ domain_ name='' , trust_id='', identity_ provider= '', protocol='', client_id='', client_ secret= '***', openid_scope='', access_ token_endpoint= '', discovery_ endpoint= '', access_ token_type= '', idp_otp_key='', user_id='', user_domain_ id='default' , user_domain_ name='' , passcode='', oauth2_endpoint='', oauth2_ client_ id='', oauth2_ client_ secret= '***', default_ domain_ id='', default_ domain_ name='' , token='***', consumer_key='', consumer_ secret= '***', access_key='', access_ secret= '***', identity_ provider_ url='', service_ provider_ endpoint= '', service_ provider_ entity_ id='', application_ credential_ secret= '***', application_ credential_ id='', application_ credential_ name='' , access_token='***', redirect_uri='', code='', device_ authorization_ endpoint= '', code_challenge_ method= '', auth_methods='', os_project_ name=None, os_project_id=None)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_ status_ code_retries' : '5', 'baremetal_ introspection_ status_ code_retries' : '5', 'image_ status_ code_retries' : '5', 'disable_ vendor_ agent': {}, 'interface': 'public', 'floating_ ip_source' : 'neutron', 'image_ api_use_ tasks': False, 'image_format': 'qcow2', 'message': '', 'network_ api_version' : '2', 'object_ store_api_ version' : '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_id': 'default', 'project_ domain_ id': 'default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'RegionOne', 'default_domain': 'default', 'timing': False, 'username': 'admin', 'password': '***', 'auth_url': 'http:// 10.0.110. 250/identity', 'beta_command': False, 'volume_ api_version' : '3.68', 'key_manager_ api_version' : '1', 'dns_api_version': '2', 'placement_ api_version' : '1', 'auth_type': 'password', ': []}
defaults: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'auth_type': 'password', 'baremetal_ status_ code_retries' : 5, 'baremetal_ introspection_ status_ code_retries' : 5, 'image_ status_ code_retries' : 5, 'disable_ vendor_ agent': {}, 'interface': 'public', 'floating_ ip_source' : 'neutron', 'image_ api_use_ tasks': False, 'image_format': 'qcow2', 'message': '', 'network_ api_version' : '2', 'object_ store_api_ version' : '1', 'secgroup_source': 'neutron', 'status': 'active'}
cloud cfg: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_ status_ code_retries' : '5', 'baremetal_ introspection_ status_ code_retries' : '5', 'image_ status_ code_retries' : '5', 'disable_ vendor_ agent': {}, 'interface': 'public', 'floating_ ip_source' : 'neutron', 'image_ api_use_ tasks': False, 'image_format': 'qcow2', 'message': '', 'network_ api_version' : '2', 'object_ store_api_ version' : '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_id': 'default', 'project_ domain_ id': 'default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'RegionOne', 'default_domain': 'default', 'timing': False, 'username': 'admin', 'password': '***', 'auth_url': 'http:// 10.0.110. 250/identity', 'beta_command': False, 'volume_ api_version' : '3.68', 'key_manager_ api_version' : '1', 'dns_api_version': '2', 'placement_ api_version' : '1', 'auth_type': 'password', ': []}
compute API version 2.1, cmd group openstack. compute. v2
identity API version 3, cmd group openstack. identity. v3
image API version 2, cmd group openstack.image.v2
network API version 2, cmd group openstack. network. v2
object_store API version 1, cmd group openstack. object_ store.v1
volume API version 3.68, cmd group openstack.volume.v3
key_manager API version 1, cmd group openstack. key_manager. v1
dns API version 2, cmd group openstack.dns.v2
neutronclient API version 2, cmd group openstack. neutronclient. v2
placement API version 1, cmd group openstack. placement. v1
command: volume snapshot create -> openstackclient .volume. v2.volume_ snapshot. CreateVolumeSna pshot (auth=True)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_ status_ code_retries' : '5', 'baremetal_ introspection_ status_ code_retries' : '5', 'image_ status_ code_retries' : '5', 'disable_ vendor_ agent': {}, 'interface': 'public', 'floating_ ip_source' : 'neutron', 'image_ api_use_ tasks': False, 'image_format': 'qcow2', 'message': '', 'network_ api_version' : '2', 'object_ store_api_ version' : '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_id': 'default', 'project_ domain_ id': 'default', 'project_name': 'admin'}, 'additional_ user_agent' : [('osc-lib', '3.1.0')], 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'RegionOne', 'default_domain': 'default', 'timing': False, 'username': 'admin', 'password': '***', 'auth_url': 'http:// 10.0.110. 250/identity', 'beta_command': False, 'volume_ api_version' : '3.68', 'key_manager_ api_version' : '1', 'dns_api_version': '2', 'placement_ api_version' : '1', 'auth_type': 'password', ': []}
Using auth plugin: password
Using parameters {'auth_url': 'http:// 10.0.110. 250/identity', 'project_name': 'admin', 'project_ domain_ id': 'default', 'username': 'admin', 'user_domain_id': 'default', 'password': '***'}
Get auth_ref
REQ: curl -g -i -X GET http:// 10.0.110. 250/identity -H "Accept: application/json" -H "User-Agent: openstacksdk/4.1.0 keystoneauth1/5.8.0 python- requests/ 2.32.3 CPython/3.10.12"
Starting new HTTP connection (1): 10.0.110.250:80
http:// 10.0.110. 250:80 "GET /identity HTTP/1.1" 300 271
RESP: [300] Connection: close Content-Length: 271 Content-Type: application/json Date: Wed, 20 Nov 2024 19:26:18 GMT Location: http:// 10.0.110. 250/identity/ v3/ Server: Apache/2.4.52 (Ubuntu) Vary: X-Auth-Token x-openstack- request- id: req-383cc040- fde5-4ead- ab0e-10a1a7c44b 73
RESP BODY: {"versions": {"values": [{"id": "v3.14", "status": "stable", "updated": "2020-04- 07T00:00: 00Z", "links": [{"rel": "self", "href": "http:// 10.0.110. 250/identity/ v3/"}], "media-types": [{"base": "application/json", "type": "application/ vnd.openstack. identity- v3+json" }]}]}}
GET call to http:// 10.0.110. 250/identity used request id req-383cc040- fde5-4ead- ab0e-10a1a7c44b 73
Making authentication request to http:// 10.0.110. 250/identity/ v3/auth/ tokens
Resetting dropped connection: 10.0.110.250
http:// 10.0.110. 250:80 "POST /identity/ v3/auth/ tokens HTTP/1.1" 201 2549
{"token": {"methods": ["password"], "user": {"domain": {"id": "default", "name": "Default"}, "id": "b55ab99079e340 6ba258e880c0a52 2f1", "name": "admin", "password_ expires_ at": null}, "audit_ids": ["XGUxat3rQTKzr uFpCg2k2A" ], "expires_at": "2024-11- 20T20:26: 18.000000Z" , "issued_at": "2024-11- 20T19:26: 18.000000Z" , "project": {"domain": {"id": "default", "name": "Default"}, "id": "aaa87139945042 45b4c71bb1c6064 bd0", "name": "admin"}, "is_domain": false, "roles": [{"id": "bec6ca540d5546 7d90b7438c643f8 dc5", "name": "member"}, {"id": "774fe6ae916548 4ca29f9dfbce997 a4d", "name": "admin"}, {"id": "e3f8a2cb3fd84d 428ebdc09478b96 815", "name": "manager"}, {"id": "63da18c084024a 03b4bb0b2d5fed4 1ad", "name": "reader"}], "catalog": [{"endpoints": [{"id": "9df5bc21787540 569754f63e595c7 dc5", "interface": "public", "region_id": "RegionOne", "url": "http:// 10.0.110. 250/identity", "region": "RegionOne"}], "id": "2b1cc733d3bb44 0a805a4201ed9f4 e63", "type": "identity", "name": "keystone"}, {"endpoints": [{"id": "652565b78fa749 6fad79b84e25a74 43c", "interface": "public", "region_id": "RegionOne", "url": "http:// 10.0.110. 250/image", "region": "RegionOne"}], "id": "371b0dd662034c d48ce67bbb7f9e7 275", "type": "image", "name": "glance"}, {"endpoints": [{"id": "767cc8c18f8e4c acac6c7f1367bd2 a09", "interface": "public", "region_id": "RegionOne", "url": "http:// 10.0.110. 250/placement", "region": "RegionOne"}], "id": "4fa574dc403740 86b1688ddf515b1 b49", "type": "placement", "name": "placement"}, {"endpoints": [{"id": "a6745653a6714c 9d8c629bb4b6cb2 0c6", "interface": "public", "region_id": "RegionOne", "url": "http:// 10.0.110. 250/volume/ v3", "region": "RegionOne"}], "id": "a19926daa5a249 90985aec92e65ec 517", "type": "block-storage", "name": "cinder"}, {"endpoints": [{"id": "358bbd99b63b48 13b17cd27a44b09 7c1", "interface": "public", "region_id": "RegionOne", "url": "http:// 10.0.110. 250:9696/ networking", "region": "RegionOne"}], "id": "c33babb615dd45 23a10c34c5aa457 9cf", "type": "network", "name": "neutron"}, {"endpoints": [{"id": "0461720bcca145 a58a92e2da05189 e99", "interface": "public", "region_id": "RegionOne", "url": "http:// 10.0.110. 250/compute/ v2.1", "region": "RegionOne"}], "id": "d9769d6eb05849 c0ba836f3bccfa5 695", "type": "compute", "name": "nova"}, {"endpoints": [{"id": "7115c79de4a34b e683f9eb3a2e40c 46d", "interface": "public", "region_id": "RegionOne", "url": "http:// 10.0.110. 250/compute/ v2/aaa871399450 4245b4c71bb1c60 64bd0", "region": "RegionOne"}], "id": "fc352f9bb79c48 52b8696807d1a98 b7e", "type": "compute_legacy", "name": "nova_legacy"}]}}
run(Namespace( formatter= 'table' , columns=[], noindent=False, variables=[], prefix='', max_width=0, fit_width=False, print_empty=False, snapshot_ name='myvolumes napshot' , volume= '3f692a4b- c6ba-4ec3- b536-d0b8e05316 f3', description=None, force=False, property=None, remote_ source= None))
Instantiating volume client: <class 'cinderclient. v3.client. Client' >
REQ: curl -g -i -X GET http:// 10.0.110. 250/volume/ v3/volumes/ 3f692a4b- c6ba-4ec3- b536-d0b8e05316 f3 -H "Accept: application/json" -H "OpenStack- API-Version: volume 3.68" -H "User-Agent: python- cinderclient" -H "X-Auth-Token: {SHA256} c061f47c3921e9b 22d52165b2373b1 83bd00d410aca17 5cf336f716f4a40 c62b"
Resetting dropped connection: 10.0.110.250
http:// 10.0.110. 250:80 "GET /volume/ v3/volumes/ 3f692a4b- c6ba-4ec3- b536-d0b8e05316 f3 HTTP/1.1" 200 1972
RESP: [200] Connection: close Content-Length: 1972 Content-Type: application/json Date: Wed, 20 Nov 2024 19:26:18 GMT OpenStack- API-Version: volume 3.68 Server: Apache/2.4.52 (Ubuntu) Vary: OpenStack- API-Version x-compute- request- id: req-266b277f- ebe3-4af4- bd37-1915815747 2b x-openstack- request- id: req-266b277f- ebe3-4af4- bd37-1915815747 2b
RESP BODY: {"volume": {"id": "3f692a4b- c6ba-4ec3- b536-d0b8e05316 f3", "status": "in-use", "size": 1, "availability_ zone": "nova", "created_at": "2024-11- 20T19:20: 42.000000" , "updated_at": "2024-11- 20T19:21: 31.000000" , "name": "myvolume", "description": null, "volume_type": "nfs", "snapshot_id": null, "source_volid": null, "metadata": {}, "links": [{"rel": "self", "href": "http:// 10.0.110. 250/volume/ v3/volumes/ 3f692a4b- c6ba-4ec3- b536-d0b8e05316 f3"}, {"rel": "bookmark", "href": "http:// 10.0.110. 250/volume/ volumes/ 3f692a4b- c6ba-4ec3- b536-d0b8e05316 f3"}], "user_id": "b55ab99079e340 6ba258e880c0a52 2f1", "bootable": "true", "encrypted": false, "replication_ status" : null, "consistencygro up_id": null, "multiattach": false, "attachments": [{"id": "3f692a4b- c6ba-4ec3- b536-d0b8e05316 f3", "attachment_id": "6e41e0c3- 920d-4cfb- 936c-eaf7f83561 6b", "volume_id": "3f692a4b- c6ba-4ec3- b536-d0b8e05316 f3", "server_id": "0d9092f6- bcbc-4bad- 8bb1-b7010e213d af", "host_name": "eharney- devstack3" , "device": "/dev/vda", "attached_at": "2024-11- 20T19:21: 30.000000" }], "migration_status": null, "group_id": null, "provider_id": null, "shared_targets": false, "service_uuid": "fb71b937- 17fe-4e26- 8ebd-44471d0d51 88", "cluster_name": null, "volume_type_id": "91964c7a- c24d-4e1f- 8946-34bc911c49 12", "consumes_quota": true, "volume_ image_metadata" : {"signature_ verified" : "False", "hw_rng_model": "virtio", "owner_ specified. openstack. md5": "", "owner_ specified. openstack. object" : "images/ cirros- 0.6.3-x86_ 64-disk" , "owner_ specified. openstack. sha256" : "", "image_id": "056d1a04- 99e4-42d8- 931b-7bbe33c65d dc", "image_name": "cirros- 0.6.3-x86_ 64-disk" , "checksum": "87617e24a5e30c b3b87fda8c07648 38f", "container_format": "bare", "disk_format": "qcow2", "min_disk": "0", "min_ram": "0", "size": "21692416"}, "os-vol- mig-status- attr:migstat" : null, "os-vol- mig-status- attr:name_ id": null, "os-vol- tenant- attr:tenant_ id": "aaa87139945042 45b4c71bb1c6064 bd0", "os-vol- host-attr: host": "eharney- devstack3@ nfs#nfs" }}
GET call to volumev3 for http:// 10.0.110. 250/volume/ v3/volumes/ 3f692a4b- c6ba-4ec3- b536-d0b8e05316 f3 used request id req-266b277f- ebe3-4af4- bd37-1915815747 2b
Since microversion 3.66 of the Block Storage API, the 'force' option is invalid for this request. For backward compatibility, however, when the 'force' flag is passed with a value evaluating to True, it is silently ignored.
Traceback (most recent call last):
  File "/opt/stack/ data/venv/ lib/python3. 10/site- packages/ cinderclient/ v3/volume_ snapshots. py", line 163, in create
    raise ValueError()
ValueError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/stack/ data/venv/ lib/python3. 10/site- packages/ cliff/app. py", line 431, in run_subcommand
    result = cmd.run( parsed_ args)
  File "/opt/stack/ data/venv/ lib/python3. 10/site- packages/ osc_lib/ command/ command. py", line 38, in run
    return super(Command, self).run( parsed_ args)
  File "/opt/stack/ data/venv/ lib/python3. 10/site- packages/ cliff/display. py", line 121, in run
    column_names, data = self.take_ action( parsed_ args)
  File "/opt/stack/ data/venv/ lib/python3. 10/site- packages/ openstackclient /volume/ v2/volume_ snapshot. py", line 141, in take_action
    snapshot = volume_ client. volume_ snapshots. create(
  File "/opt/stack/ data/venv/ lib/python3. 10/site- packages/ cinderclient/ api_versions. py", line 421, in substitution
    return method.func(obj, *args, **kwargs)
  File "/opt/stack/ data/venv/ lib/python3. 10/site- packages/ cinderclient/ v3/volume_ snapshots. py", line 165, in create
    raise ValueError( MV_3_66_ FORCE_FLAG_ ERROR)
ValueError: Since microversion 3.66 of the Block Storage API, the 'force' option is invalid for this request. For backward compatibility, however, when the 'force' flag is passed with a value evaluating to True, it is silently ignored.
clean_up CreateVolumeSna pshot: Since microversion 3.66 of the Block Storage API, the 'force' option is invalid for this request. For backward compatibility, however, when the 'force' flag is passed with a value evaluating to True, it is silently ignored.
END return value: 1

Read the original on bugs.launchpad.net ↗