<div dir="ltr">Hi Rajat,<br><font face="arial, sans-serif">It's not about deleting attachments entries but the normal operations from horizon or via cli does not work because of that. So it really needs to be fixed to perform resize, shelve unshelve operations. <br></font><br>Here are the detailed attachment entries you can see for the shelved instance.<br><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><br></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">+--------------------------------------+--------------------------------------+--------------------------+----------------------------------<b>----+---------------+-----------------------------------------</b></span><b><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ <span class="gmail-Apple-converted-space">            </span></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">| id <span class="gmail-Apple-converted-space">                                  </span>| volume_id<span class="gmail-Apple-converted-space">                            </span>| attached_host<span class="gmail-Apple-converted-space">            </span>| instance_uuid<span class="gmail-Apple-converted-space">                        </span>| attach_status | connector <span class="gmail-Apple-converted-space">                              </span></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                                                                                                                                                                                            </span>| <span class="gmail-Apple-converted-space">            </span></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">+--------------------------------------+--------------------------------------+--------------------------+--------------------------------------+---------------+-----------------------------------------</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ <span class="gmail-Apple-converted-space">            </span></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">| 8daddacc-8fc8-4d2b-a738-d05deb20049f | 67ea3a39-78b8-4d04-a280-166acdc90b8a | <a href="http://nfv1compute43.nfv1.o2.cz">nfv1compute43.nfv1.o2.cz</a> | 9266a2d7-9721-4994-a6b5-6b3290862dc6 | attached<span class="gmail-Apple-converted-space">      </span>| {"platform": "x86_64", "os_type": "linux</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">", "ip": "10.42.168.87", "host": "<a href="http://nfv1compute43.nfv1.o2.cz">nfv1compute43.nfv1.o2.cz</a>", "multipath": false, "do_local_attach": false, "system uuid": "65917e4f-c8c4-a2af-ec11-fe353e13f4dd", "mountpoint": "/dev/vda"} | <span class="gmail-Apple-converted-space">            </span></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">| d3278543-4920-42b7-b217-0858e986fcce | 67ea3a39-78b8-4d04-a280-166acdc90b8a | NULL <span class="gmail-Apple-converted-space">                    </span>| 9266a2d7-9721-4994-a6b5-6b3290862dc6 | reserved<span class="gmail-Apple-converted-space">      </span>| NULL<span class="gmail-Apple-converted-space">                                    </span></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                                                                                                                                                                                            </span>| <span class="gmail-Apple-converted-space">            </span></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">+--------------------------------------+--------------------------------------+--------------------------+--------------------------------------+---------------+-----------------------------------------</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ <span class="gmail-Apple-converted-space">            </span></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><b>2 rows in set (0.00 sec) </b><span class="gmail-Apple-converted-space"><b>   </b><br><br><br>for e.g 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 <br><br>





</span></span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">root@master01:/home/hemant# cinder --os-volume-api-version 3.27 attachment-list --all | grep 67ea3a39-78b8-4d04-a280-166acdc90b8a <span class="gmail-Apple-converted-space">                                                                        </span></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">| 8daddacc-8fc8-4d2b-a738-d05deb20049f | </span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)">67ea3a39-78b8-4d04-a280-166acdc90b8a</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> | attached | 9266a2d7-9721-4994-a6b5-6b3290862dc6 | <span class="gmail-Apple-converted-space">                                                                        </span></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,74,5);background-color:rgb(203,74,5)">│</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(161,113,161)">·</span></b></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:"MesloLGS NF";color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"><b>

</b></span></span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0)"><b style="font-size:11px;font-family:"MesloLGS NF""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">| d3278543-4920-42b7-b217-0858e986fcce | </span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(202,51,35)">67ea3a39-78b8-4d04-a280-166acdc90b8a</span></b><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><b style="font-size:11px;font-family:"MesloLGS NF""> | reserved | 9266a2d7-9721-4994-a6b5-6b3290862dc6 |</b><br><br><b style="font-size:11px;font-family:"MesloLGS NF"">cinder --os-volume-api-version 3.27 attachment-delete 8daddacc-8fc8-4d2b-a738-d05deb20049f</b><br><br><font face="arial, sans-serif" style="">this is the only choice I have if I would like to unshelve vm. But this is not a good approach for production envs. I hope you understand me. Please feel free to ask me anything if you don't understand.</font><font face="MesloLGS NF" style="font-size:11px"> </font><br><br><br></span></p></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 25 Nov 2022 at 13:20, Rajat Dhasmana <<a href="mailto:rdhasman@redhat.com">rdhasman@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Hemant,<div><br></div><div>If your final goal is to delete the attachment entries in the cinder DB, we have attachment APIs to perform these tasks. The command useful for you is attachment list[1] and attachment delete[2].</div><div>Make sure you pass the right microversion i.e. 3.27 to be able to execute these operations.</div><div><br></div><div>Eg:</div><div>cinder --os-volume-api-version 3.27 attachment-list</div><div><br></div><div>[1] <a href="https://docs.openstack.org/python-cinderclient/latest/cli/details.html#cinder-attachment-list" target="_blank">https://docs.openstack.org/python-cinderclient/latest/cli/details.html#cinder-attachment-list</a></div><div>[2] <a href="https://docs.openstack.org/python-cinderclient/latest/cli/details.html#cinder-attachment-delete" target="_blank">https://docs.openstack.org/python-cinderclient/latest/cli/details.html#cinder-attachment-delete</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 25, 2022 at 5:44 PM Hemant Sonawane <<a href="mailto:hemant.sonawane@itera.io" target="_blank">hemant.sonawane@itera.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello  <br>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 then it works. Is there any way to fix this issue ?<br clear="all"><div><br></div><div>nova-compute logs:<br><br>cinderclient.exceptions.ClientException: Unable to update attachment.(Invalid volume: duplicate connectors detected on volume<br><br>Help will be really appreciated Thanks !</div>-- <br><div dir="ltr"><div dir="ltr">Thanks and Regards,<div><br></div><div>Hemant Sonawane</div><div><img width="96" height="37" src="https://ci3.googleusercontent.com/mail-sig/AIorK4x8nIGqikcShn_0zvLqn8N5Q_X7samOLi0X9Ztcfux-Zmk47oem97UgQbLfzWjlxQTZ7P3zKhw"><br></div></div></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Thanks and Regards,<div><br></div><div>Hemant Sonawane</div><div><img width="96" height="37" src="https://ci3.googleusercontent.com/mail-sig/AIorK4x8nIGqikcShn_0zvLqn8N5Q_X7samOLi0X9Ztcfux-Zmk47oem97UgQbLfzWjlxQTZ7P3zKhw"><br></div></div></div>