Hello
I am using wallaby release openstack and having issues with cinder volumes as once I try to delete, resize or unshelve the shelved vms the volume_attachement entries do not get deleted in cinder db and therefore the above mentioned operations fail every time. I have to delete these volume_attachement entries manually to make it work.
For e.g I shelved some instance via openstack horizon to reproduce the same scenario.
Here are the detailed attachment entries you can see for the shelved instance.
If I would like to unshelve this instance it wont work as it has a duplicate entry in cinder db for the attachment. So i have to delete it manually from db or via cli.
cinderclient.exceptions.ClientException: Unable to update attachment.(Invalid volume: duplicate connectors detected on volume
This is the only choice I have if I would like to unshelve vm. But this is not a good approach for production env to delete duplicate volume attachments entries every time for every vm.
Hello
I am using wallaby release openstack and having issues with cinder volumes as once I try to delete, resize or unshelve the shelved vms the volume_attachement entries do not get deleted in cinder db and therefore the above mentioned operations fail every time. I have to delete these volume_attachement entries manually to make it work.
For e.g I shelved some instance via openstack horizon to reproduce the same scenario.
Here are the detailed attachment entries you can see for the shelved instance.
+------ ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- -+----- ------- ------- ------- +------ ------- ------- ------- ------- ----+-- ------- ------+ ------- ------- ------- ------- ------- ------│ ·
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------+ │·
| id | volume_id | attached_host | instance_uuid | attach_status | connector │·
+------ ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- -+----- ------- ------- ------- +------ ------- ------- ------- ------- ----+-- ------- ------+ ------- ------- ------- ------- ------- ------│ ·
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------+ │·
| 8daddacc- 8fc8-4d2b- a738-d05deb2004 9f | 67ea3a39- 78b8-4d04- a280-166acdc90b 8a | nfv1compute43. nfv1.o2. cz | 9266a2d7- 9721-4994- a6b5-6b3290862d c6 | attached | {"platform": "x86_64", "os_type": "linux│·
", "ip": "10.42.168.87", "host": "nfv1compute43. nfv1.o2. cz", "multipath": false, "do_local_attach": false, "system uuid": "65917e4f- c8c4-a2af- ec11-fe353e13f4 dd", "mountpoint": "/dev/vda"} | │·
| d3278543- 4920-42b7- b217-0858e986fc ce | 67ea3a39- 78b8-4d04- a280-166acdc90b 8a | NULL | 9266a2d7- 9721-4994- a6b5-6b3290862d c6 | reserved | NULL │·
+------ ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- -+----- ------- ------- ------- +------ ------- ------- ------- ------- ----+-- ------- ------+ ------- ------- ------- ------- ------- ------│ ·
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------+ │·
2 rows in set (0.00 sec)
If I would like to unshelve this instance it wont work as it has a duplicate entry in cinder db for the attachment. So i have to delete it manually from db or via cli.
root@master01: /home/hemant# cinder --os-volume- api-version 3.27 attachment-list --all | grep 67ea3a39- 78b8-4d04- a280-166acdc90b 8a │·
| 8daddacc- 8fc8-4d2b- a738-d05deb2004 9f | 67ea3a39- 78b8-4d04- a280-166acdc90b 8a | attached | 9266a2d7- 9721-4994- a6b5-6b3290862d c6 | │·
| d3278543- 4920-42b7- b217-0858e986fc ce | 67ea3a39- 78b8-4d04- a280-166acdc90b 8a | reserved | 9266a2d7- 9721-4994- a6b5-6b3290862d c6 |
cinder --os-volume- api-version 3.27 attachment-delete 8daddacc- 8fc8-4d2b- a738-d05deb2004 9f
I could only gather logs from nova-compute
nova-compute logs:
cinderclient. exceptions. ClientException : Unable to update attachment.(Invalid volume: duplicate connectors detected on volume
This is the only choice I have if I would like to unshelve vm. But this is not a good approach for production env to delete duplicate volume attachments entries every time for every vm.
Is there any way to fix this issue ?