openstack volume snapshot create fails for in-use volumes w/ cinder mv 3.66+

Bug #2089188 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
In Progress
Undecided
Unassigned

Bug Description

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-d0b8e05316f3 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-d0b8e05316f3 myvolumesnapshot --os-volume-api-version 3.68 --debug
START with options: volume snapshot create --volume 3f692a4b-c6ba-4ec3-b536-d0b8e05316f3 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.CreateVolumeSnapshot (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-10a1a7c44b73
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-10a1a7c44b73
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": "b55ab99079e3406ba258e880c0a522f1", "name": "admin", "password_expires_at": null}, "audit_ids": ["XGUxat3rQTKzruFpCg2k2A"], "expires_at": "2024-11-20T20:26:18.000000Z", "issued_at": "2024-11-20T19:26:18.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "aaa8713994504245b4c71bb1c6064bd0", "name": "admin"}, "is_domain": false, "roles": [{"id": "bec6ca540d55467d90b7438c643f8dc5", "name": "member"}, {"id": "774fe6ae9165484ca29f9dfbce997a4d", "name": "admin"}, {"id": "e3f8a2cb3fd84d428ebdc09478b96815", "name": "manager"}, {"id": "63da18c084024a03b4bb0b2d5fed41ad", "name": "reader"}], "catalog": [{"endpoints": [{"id": "9df5bc21787540569754f63e595c7dc5", "interface": "public", "region_id": "RegionOne", "url": "http://10.0.110.250/identity", "region": "RegionOne"}], "id": "2b1cc733d3bb440a805a4201ed9f4e63", "type": "identity", "name": "keystone"}, {"endpoints": [{"id": "652565b78fa7496fad79b84e25a7443c", "interface": "public", "region_id": "RegionOne", "url": "http://10.0.110.250/image", "region": "RegionOne"}], "id": "371b0dd662034cd48ce67bbb7f9e7275", "type": "image", "name": "glance"}, {"endpoints": [{"id": "767cc8c18f8e4cacac6c7f1367bd2a09", "interface": "public", "region_id": "RegionOne", "url": "http://10.0.110.250/placement", "region": "RegionOne"}], "id": "4fa574dc40374086b1688ddf515b1b49", "type": "placement", "name": "placement"}, {"endpoints": [{"id": "a6745653a6714c9d8c629bb4b6cb20c6", "interface": "public", "region_id": "RegionOne", "url": "http://10.0.110.250/volume/v3", "region": "RegionOne"}], "id": "a19926daa5a24990985aec92e65ec517", "type": "block-storage", "name": "cinder"}, {"endpoints": [{"id": "358bbd99b63b4813b17cd27a44b097c1", "interface": "public", "region_id": "RegionOne", "url": "http://10.0.110.250:9696/networking", "region": "RegionOne"}], "id": "c33babb615dd4523a10c34c5aa4579cf", "type": "network", "name": "neutron"}, {"endpoints": [{"id": "0461720bcca145a58a92e2da05189e99", "interface": "public", "region_id": "RegionOne", "url": "http://10.0.110.250/compute/v2.1", "region": "RegionOne"}], "id": "d9769d6eb05849c0ba836f3bccfa5695", "type": "compute", "name": "nova"}, {"endpoints": [{"id": "7115c79de4a34be683f9eb3a2e40c46d", "interface": "public", "region_id": "RegionOne", "url": "http://10.0.110.250/compute/v2/aaa8713994504245b4c71bb1c6064bd0", "region": "RegionOne"}], "id": "fc352f9bb79c4852b8696807d1a98b7e", "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='myvolumesnapshot', volume='3f692a4b-c6ba-4ec3-b536-d0b8e05316f3', 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-d0b8e05316f3 -H "Accept: application/json" -H "OpenStack-API-Version: volume 3.68" -H "User-Agent: python-cinderclient" -H "X-Auth-Token: {SHA256}c061f47c3921e9b22d52165b2373b183bd00d410aca175cf336f716f4a40c62b"
Resetting dropped connection: 10.0.110.250
http://10.0.110.250:80 "GET /volume/v3/volumes/3f692a4b-c6ba-4ec3-b536-d0b8e05316f3 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-19158157472b x-openstack-request-id: req-266b277f-ebe3-4af4-bd37-19158157472b
RESP BODY: {"volume": {"id": "3f692a4b-c6ba-4ec3-b536-d0b8e05316f3", "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-d0b8e05316f3"}, {"rel": "bookmark", "href": "http://10.0.110.250/volume/volumes/3f692a4b-c6ba-4ec3-b536-d0b8e05316f3"}], "user_id": "b55ab99079e3406ba258e880c0a522f1", "bootable": "true", "encrypted": false, "replication_status": null, "consistencygroup_id": null, "multiattach": false, "attachments": [{"id": "3f692a4b-c6ba-4ec3-b536-d0b8e05316f3", "attachment_id": "6e41e0c3-920d-4cfb-936c-eaf7f835616b", "volume_id": "3f692a4b-c6ba-4ec3-b536-d0b8e05316f3", "server_id": "0d9092f6-bcbc-4bad-8bb1-b7010e213daf", "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-44471d0d5188", "cluster_name": null, "volume_type_id": "91964c7a-c24d-4e1f-8946-34bc911c4912", "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-7bbe33c65ddc", "image_name": "cirros-0.6.3-x86_64-disk", "checksum": "87617e24a5e30cb3b87fda8c0764838f", "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": "aaa8713994504245b4c71bb1c6064bd0", "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-d0b8e05316f3 used request id req-266b277f-ebe3-4af4-bd37-19158157472b
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 CreateVolumeSnapshot: 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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)
Changed in python-openstackclient:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.