-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DetachVolume
failure: Disk
is not getting unplugged from Domain
#114
Comments
Detach logic for libvirtd works properly. Detach is asynchronous call too, so it cannot detach disk immediately <disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none' io='threads'/>
<source protocol='rbd' name='ceph/img_05979169209155bdb34087ec06ddc31bfb6eeadf5c47b3f9f4389304e678fc4' index='3'>
<host name='2a00...' port='6789'/>
<auth username='volume-rook-ceph--ceph'>
<secret type='ceph' uuid='4013d936-3459-5fb5-815e-79a85f3f2c1a'/>
</auth>
</source>
<target dev='vda' bus='virtio'/>
<serial>oda-4127059624245cdc</serial>
<alias name='ua-volume-b3MtZGlzaw'/>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/home/.../.libvirt-provider/machines/cf5caf4b-9af8-4402-856f-2aae5b9281d3/volumes/libvirt-provider.ironcore.dev~empty-disk/ephe-disk/disk.raw' index='2'/>
<backingStore/>
<target dev='vdb' bus='virtio'/>
<serial>odb-8d534764e409d8df</serial>
<alias name='ua-volume-ZXBoZS1kaXNr'/>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/home/../.libvirt-provider/machines/cf5caf4b-9af8-4402-856f-2aae5b9281d3/volumes/libvirt-provider.ironcore.dev~empty-disk/ephe-disk2/disk.raw' index='1'/>
<backingStore/>
<target dev='vdc' bus='virtio'/>
<serial>odc-d3c005e425b513c9</serial>
<alias name='ua-volume-ZXBoZS1kaXNrMg'/>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</disk> after detach: <disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none' io='threads'/>
<source protocol='rbd' name='ceph/img_05979169209155bdb34087ec06ddc31bfb6eeadf5c47b3f9f4389304e678fc4' index='3'>
<host name='2a00... port='6789'/>
<auth username='volume-rook-ceph--ceph'>
<secret type='ceph' uuid='4013d936-3459-5fb5-815e-79a85f3f2c1a'/>
</auth>
</source>
<target dev='vda' bus='virtio'/>
<serial>oda-4127059624245cdc</serial>
<alias name='ua-volume-b3MtZGlzaw'/>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/home/.../cf5caf4b-9af8-4402-856f-2aae5b9281d3/volumes/libvirt-provider.ironcore.dev~empty-disk/ephe-disk2/disk.raw' index='1'/>
<backingStore/>
<target dev='vdc' bus='virtio'/>
<serial>odc-d3c005e425b513c9</serial>
<alias name='ua-volume-ZXBoZS1kaXNrMg'/>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</disk> Root cause for wrong behavior in this case is using wrong os image. Image isn't booted properly and vm is stuck in efi shell. Problem is efi shell doesn't process ACPI signal. These signals are required for detach volume (https://wiki.ubuntu.com/QemuDiskHotplug#Removing_disks_from_Guests). I didn't go extremely depth into problematic because detach of volume for wrong booted os is edge case. |
Minimally, we have wrong logic for update status of api.Machine in store. Main problem is deleting volume from status, which is still part of domain xml. "status": {
"volumeStatus": [
{
"name": "ephe-disk2",
"handle": "libvirt-provider.ironcore.dev/empty-disk/ephe-disk2",
"state": "Attached",
"size": 524288000
}
], |
Describe the bug
Disk is not getting unplugged from domain when
DetachVolume()
IRI call is triggered. Volume gets removed from store but not from DomainXML.To Reproduce
Expected behavior
Empty disk should be removed from Domain XML also.
The text was updated successfully, but these errors were encountered: