I encountered a strange situation when deleting the volume.The volum :
openstack volume list
+--------------------------------------+----------+-----------+------+------------------------------------------+
| ID | Name | Status | Size | Attached to |
+--------------------------------------+----------+-----------+------+------------------------------------------+
| b6bf9037-eb3b-492a-98f4-d968e768ed0e | testdb | available | 1 | |
+--------------------------------------+----------+-----------+------+------------------------------------------+
Then I use the comman 'openstack volume delete testdb',there is no error responce on CLI. However the volume is still available. Then I create a new volume and it can be deleted successfully! I check the database :
select * from volumes where id='b6bf9037-eb3b-492a-98f4-d968e768ed0e'\G
*************************** 1. row ***************************
created_at: 2020-07-15 11:24:37
updated_at: 2020-08-04 06:23:09
deleted_at: NULL
deleted: 0
id: b6bf9037-eb3b-492a-98f4-d968e768ed0e
ec2_id: NULL
user_id: 60f5cfbb461b416eb95d7132e8b5b7d6
project_id: aaeea40dc1b0466ca37f317781275c68
host: ceph@ceph#ceph
size: 1
availability_zone: nova
status: available
attach_status: detached
scheduled_at: 2020-07-15 11:24:38
launched_at: 2020-07-15 11:24:40
terminated_at: 2020-08-04 06:23:09
display_name: testdb
display_description: NULL
provider_location: NULL
provider_auth: NULL
snapshot_id: NULL
volume_type_id: 57761cbd-b68f-4539-82b6-4f6e1f01256b
source_volid: NULL
bootable: 0
provider_geometry: NULL
_name_id: NULL
encryption_key_id: NULL
migration_status: NULL
replication_status: NULL
replication_extended_status: NULL
replication_driver_data: NULL
consistencygroup_id: NULL
provider_id: NULL
multiattach: 0
previous_status: NULL
cluster_name: NULL
group_id: NULL
service_uuid: 3ad040a2-c552-414a-8bcb-0d65dae7f8b2
shared_targets: 1
1 row in set (0.00 sec)
It hasn't benn deleted.The following is debug log,it seemed that the volume could not be found:
openstack volume delete testdb --debug
START with options: [u'volume', u'delete', u'testdb', u'--debug']
options: Namespace(access_key='', access_secret='***', access_token='***', access_token_endpoint='', access_token_type='', aodh_endpoint='', application_credential_id='', application_credential_name='', application_credential_secret='***', auth_type='', auth_url='http://10.0.2.20:35357/v3', cacert='/etc/ssl/certs/ca-certificates.crt', cert='', client_id='', client_secret='***', cloud='', code='', consumer_key='', consumer_secret='***', debug=True, default_domain='default', default_domain_id='', default_domain_name='', deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='internal', key='', log_file=None, openid_scope='', os_alarming_api_version='2', os_beta_command=False, os_clustering_api_version='1', os_compute_api_version='', os_container_api_version='1.12', os_container_infra_api_version='1', os_data_processing_api_version='1.1', os_data_processing_url='', os_database_api_version='1', os_dns_api_version='2', os_identity_api_version='3', os_image_api_version='', os_key_manager_api_version='1', os_loadbalancer_api_version='2.0', os_metrics_api_version='1', os_network_api_version='', os_object_api_version='', os_orchestration_api_version='1', os_project_id=None, os_project_name=None, os_queues_api_version='2', os_volume_api_version='', os_workflow_api_version='2', passcode='', password='***', profile='', project_domain_id='', project_domain_name='Default', project_id='', project_name='admin', protocol='', redirect_uri='', region_name='inspurtest', remote_project_domain_id='', remote_project_domain_name='', remote_project_id='', remote_project_name='', roles='', service_provider='', service_provider_endpoint='', service_provider_entity_id='', system_scope='', timing=False, token='***', trust_id='', url='', user='', user_domain_id='', user_domain_name='Default', user_id='', username='admin', verbose_level=3, verify=None)
***kestone***
REQ: curl -g -i --cacert "/etc/ssl/certs/ca-certificates.crt" -X GET http://10.0.2.20:8776/v2/aaeea40dc1b0466ca37f317781275c68/volumes/testdb -H "User-Agent: python-cinderclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}57affc290bd95b8597c4497bf8b46cd83c782792"
Starting new HTTP connection (1): 10.0.2.20
http://10.0.2.20:8776 "GET /v2/aaeea40dc1b0466ca37f317781275c68/volumes/testdb HTTP/1.1" 404 79
RESP: [404] Date: Tue, 04 Aug 2020 06:47:58 GMT Server: Apache Content-Length: 79 x-compute-request-id: req-1aa2cc21-9c80-472d-bd78-2102e3273d1f x-openstack-request-id: req-1aa2cc21-9c80-472d-bd78-2102e3273d1f Connection: close Content-Type: application/json
RESP BODY: {"itemNotFound": {"message": "Volume testdb could not be found.", "code": 404}}
GET call to volumev2 for http://10.0.2.20:8776/v2/aaeea40dc1b0466ca37f317781275c68/volumes/testdb used request id req-1aa2cc21-9c80-472d-bd78-2102e3273d1f
REQ: curl -g -i --cacert "/etc/ssl/certs/ca-certificates.crt" -X GET http://10.0.2.20:8776/v2/aaeea40dc1b0466ca37f317781275c68/volumes/detail?all_tenants=1&name=testdb -H "User-Agent: python-cinderclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}57affc290bd95b8597c4497bf8b46cd83c782792"
Resetting dropped connection: 10.0.2.20
http://10.0.2.20:8776 "GET /v2/aaeea40dc1b0466ca37f317781275c68/volumes/detail?all_tenants=1&name=testdb HTTP/1.1" 200 1019
RESP: [200] Date: Tue, 04 Aug 2020 06:47:58 GMT Server: Apache Content-Length: 1019 x-compute-request-id: req-1026d396-0688-47b6-bac5-0d5ba64a8ddd x-openstack-request-id: req-1026d396-0688-47b6-bac5-0d5ba64a8ddd Connection: close Content-Type: application/json
RESP BODY: {"volumes": [{"migration_status": null, "attachments": [], "links": [{"href": "http://10.0.2.20:8776/v2/aaeea40dc1b0466ca37f317781275c68/volumes/b6bf9037-eb3b-492a-98f4-d968e768ed0e", "rel": "self"}, {"href": "http://10.0.2.20:8776/aaeea40dc1b0466ca37f317781275c68/volumes/b6bf9037-eb3b-492a-98f4-d968e768ed0e", "rel": "bookmark"}], "availability_zone": "nova", "os-vol-host-attr:host": "ceph@ceph#ceph", "encrypted": false, "updated_at": "2020-08-04T06:47:50.000000", "replication_status": null, "snapshot_id": null, "id": "b6bf9037-eb3b-492a-98f4-d968e768ed0e", "size": 1, "user_id": "60f5cfbb461b416eb95d7132e8b5b7d6", "os-vol-tenant-attr:tenant_id": "aaeea40dc1b0466ca37f317781275c68", "os-vol-mig-status-attr:migstat": null, "metadata": {}, "status": "available", "description": null, "multiattach": false, "source_volid": null, "consistencygroup_id": null, "os-vol-mig-status-attr:name_id": null, "name": "testdb", "bootable": "false", "created_at": "2020-07-15T11:24:37.000000", "volume_type": "standard-iops"}]}
GET call to volumev2 for http://10.0.2.20:8776/v2/aaeea40dc1b0466ca37f317781275c68/volumes/detail?all_tenants=1&name=testdb used request id req-1026d396-0688-47b6-bac5-0d5ba64a8ddd
REQ: curl -g -i --cacert "/etc/ssl/certs/ca-certificates.crt" -X DELETE http://10.0.2.20:8776/v2/aaeea40dc1b0466ca37f317781275c68/volumes/b6bf9037-eb3b-492a-98f4-d968e768ed0e -H "User-Agent: python-cinderclient" -H "X-OpenStack-Request-ID: req-1026d396-0688-47b6-bac5-0d5ba64a8ddd" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}57affc290bd95b8597c4497bf8b46cd83c782792"
Resetting dropped connection: 10.0.2.20
http://10.0.2.20:8776 "DELETE /v2/aaeea40dc1b0466ca37f317781275c68/volumes/b6bf9037-eb3b-492a-98f4-d968e768ed0e HTTP/1.1" 202 0
RESP: [202] Date: Tue, 04 Aug 2020 06:47:58 GMT Server: Apache Content-Length: 0 x-openstack-request-id: req-fee400c9-03ac-4e4a-a3cf-23b70f873866 Connection: close Content-Type: text/html; charset=UTF-8
RESP BODY: Omitted, Content-Type is set to text/html; charset=UTF-8. Only application/json responses have their bodies logged.
DELETE call to volumev2 for http://10.0.2.20:8776/v2/aaeea40dc1b0466ca37f317781275c68/volumes/b6bf9037-eb3b-492a-98f4-d968e768ed0e used request id req-fee400c9-03ac-4e4a-a3cf-23b70f873866
clean_up DeleteVolume:
END return value: 0
hi hanchl
can you explain the steps of how you get this error,
because you need to detach volume and then use the delete command
or else use a force-delete command to delete it regardless of its state so do you use force and still facing this error.