
Hello, I have a problem when i tried to hotplug a disk to a VM. Here is the situation. We use a VM (let's call this backupVM) which is responsible of doing our VM backup by : - Making a snapshot of the VM we want to backup - Attach the snapshot disk - Make the copy using DD - Unplug the snapshot disk and then delete snapshot. For some reason that i don't know, for certain VM, the backupVM cannot hot plug the snapshot disk. I'm using ovirt 4.2.4 Here is what is see in engine.log 2018-08-04 19:52:30,496-10 ERROR [org.ovirt.engine.core.bll.storage.disk.AttachDiskToVmCommand] (default task-61) [361eca85-ca85-4e23-b292-cd8303a1a86d] Command 'org.ovirt.engine.core.bll.storage.disk.AttachDiskToVmCommand' failed: EngineException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: VDSGenericException: VDSErrorException: Failed to HotPlugDiskVDS, error = internal error: unable to execute QEMU command 'device_add': Failed to get shared "write" lock, code = 45 (Failed with error FailedToPlugDisk and code 45) Here is the vdsm.log 2018-08-04 19:51:38,512-1000 INFO (jsonrpc/5) [virt.vm] (vmId='78ef239f-3cb3-4eef-921f-f989724009ef') Hotplug disk xml: <?xml version='1.0' encoding='utf-8'?> <disk address="" device="disk" snapshot="no" type="file"> <source file="/var/lib/vdsm/transient/225ec856-d661-4374-bb7d-8ea7168fe5f2-b641bb09-325a-4932-a9af-32c907e4a381.D52Nkj" /> <target bus="virtio" dev="vdg" /> <serial>c312a0c3-8c58-472f-99ad-cfbabb42337d</serial> <driver cache="writethrough" error_policy="stop" io="threads" name="qemu" type="qcow2" /> </disk> (vm:3859) 2018-08-04 19:51:38,672-1000 ERROR (jsonrpc/5) [virt.vm] (vmId='78ef239f-3cb3-4eef-921f-f989724009ef') Hotplug failed (vm:3867) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 3865, in hotplugDisk self._dom.attachDevice(driveXml) File "/usr/lib/python2.7/site-packages/vdsm/virt/virdomain.py", line 98, in f ret = attr(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/common/libvirtconnection.py", line 130, in wrapper ret = f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/common/function.py", line 92, in wrapper return func(inst, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 570, in attachDevice if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self) libvirtError: internal error: unable to execute QEMU command 'device_add': Failed to get shared "write" lock here is libvirtd log in /var/log/messages libvirtd: 2018-08-05 05:51:38.637+0000: 4967: error : qemuMonitorJSONCheckError:389 : internal error: unable to execute QEMU command 'device_add': Failed to get shared "write" lock Do you guys have any idea of what going on ? How can i check this lock ?

Hi Punaatua, This looks like a bug, please submit it. You can have a look at this bug https://bugzilla.redhat.com/show_bug.cgi?id=1469235 which is very similar issue with hotplug __ Raz Tamir Manager, RHV QE On Sun, Aug 5, 2018, 09:13 Punaatua PK <punaatua.pk@gmail.com> wrote:
Hello,
I have a problem when i tried to hotplug a disk to a VM. Here is the situation.
We use a VM (let's call this backupVM) which is responsible of doing our VM backup by : - Making a snapshot of the VM we want to backup - Attach the snapshot disk - Make the copy using DD - Unplug the snapshot disk and then delete snapshot.
For some reason that i don't know, for certain VM, the backupVM cannot hot plug the snapshot disk.
I'm using ovirt 4.2.4 Here is what is see in engine.log
2018-08-04 19:52:30,496-10 ERROR [org.ovirt.engine.core.bll.storage.disk.AttachDiskToVmCommand] (default task-61) [361eca85-ca85-4e23-b292-cd8303a1a86d] Command 'org.ovirt.engine.core.bll.storage.disk.AttachDiskToVmCommand' failed: EngineException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: VDSGenericException: VDSErrorException: Failed to HotPlugDiskVDS, error = internal error: unable to execute QEMU command 'device_add': Failed to get shared "write" lock, code = 45 (Failed with error FailedToPlugDisk and code 45)
Here is the vdsm.log
2018-08-04 19:51:38,512-1000 INFO (jsonrpc/5) [virt.vm] (vmId='78ef239f-3cb3-4eef-921f-f989724009ef') Hotplug disk xml: <?xml version='1.0' encoding='utf-8'?> <disk address="" device="disk" snapshot="no" type="file"> <source file="/var/lib/vdsm/transient/225ec856-d661-4374-bb7d-8ea7168fe5f2-b641bb09-325a-4932-a9af-32c907e4a381.D52Nkj" /> <target bus="virtio" dev="vdg" /> <serial>c312a0c3-8c58-472f-99ad-cfbabb42337d</serial> <driver cache="writethrough" error_policy="stop" io="threads" name="qemu" type="qcow2" /> </disk> (vm:3859) 2018-08-04 19:51:38,672-1000 ERROR (jsonrpc/5) [virt.vm] (vmId='78ef239f-3cb3-4eef-921f-f989724009ef') Hotplug failed (vm:3867) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 3865, in hotplugDisk self._dom.attachDevice(driveXml) File "/usr/lib/python2.7/site-packages/vdsm/virt/virdomain.py", line 98, in f ret = attr(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/common/libvirtconnection.py", line 130, in wrapper ret = f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/vdsm/common/function.py", line 92, in wrapper return func(inst, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 570, in attachDevice if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self) libvirtError: internal error: unable to execute QEMU command 'device_add': Failed to get shared "write" lock
here is libvirtd log in /var/log/messages
libvirtd: 2018-08-05 05:51:38.637+0000: 4967: error : qemuMonitorJSONCheckError:389 : internal error: unable to execute QEMU command 'device_add': Failed to get shared "write" lock
Do you guys have any idea of what going on ? How can i check this lock ? _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/6VWU3RCP4JEEGG...

Hello Raz, yes i saw this bug. But the problem doesn't seem to be the same. I search on google with qemu + write lock but didn't find anything. Do you know the command launch by this opération ? qemu-img ?

On Sun, Aug 5, 2018 at 9:47 AM, Punaatua PK <punaatua.pk@gmail.com> wrote:
Hello Raz,
yes i saw this bug. But the problem doesn't seem to be the same. I search on google with qemu + write lock but didn't find anything.
Take a look at this - https://bugs.launchpad.net/qemu/+bug/1740364
Do you know the command launch by this opération ? qemu-img ? _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community- guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/ message/2OUJ63JSQEZPWZ6X666TZQZQJ2DMGLXS/
-- Raz Tamir Manager, RHV QE

We've opened a bug for that - https://bugzilla.redhat.com/show_bug.cgi?id=1613282 On Sun, Aug 5, 2018 at 9:51 AM, Raz Tamir <ratamir@redhat.com> wrote:
On Sun, Aug 5, 2018 at 9:47 AM, Punaatua PK <punaatua.pk@gmail.com> wrote:
Hello Raz,
yes i saw this bug. But the problem doesn't seem to be the same. I search on google with qemu + write lock but didn't find anything.
Take a look at this - https://bugs.launchpad.net/qemu/+bug/1740364
Do you know the command launch by this opération ? qemu-img ? _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/communit y/about/community-guidelines/ List Archives: https://lists.ovirt.org/archiv es/list/users@ovirt.org/message/2OUJ63JSQEZPWZ6X666TZQZQJ2DMGLXS/
--
Raz Tamir Manager, RHV QE
_______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community- guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/ message/SC4A73B6RW7WOQLT6IAGQ3FZKOKSR62Q/

On 7 Aug 2018, at 13:25, Elad Ben Aharon <ebenahar@redhat.com> wrote:
We've opened a bug for that - https://bugzilla.redhat.com/show_bug.cgi?id=1613282 <https://bugzilla.redhat.com/show_bug.cgi?id=1613282>
this bug tracks a different issue. I suggest to open a different one. Or, if that qemu-img -U is the suspect, wait for storage team feedback on that. Weve added that several months ago Thanks, michal
On Sun, Aug 5, 2018 at 9:51 AM, Raz Tamir <ratamir@redhat.com <mailto:ratamir@redhat.com>> wrote:
On Sun, Aug 5, 2018 at 9:47 AM, Punaatua PK <punaatua.pk@gmail.com <mailto:punaatua.pk@gmail.com>> wrote: Hello Raz,
yes i saw this bug. But the problem doesn't seem to be the same. I search on google with qemu + write lock but didn't find anything. Take a look at this - https://bugs.launchpad.net/qemu/+bug/1740364 <https://bugs.launchpad.net/qemu/+bug/1740364>
Do you know the command launch by this opération ? qemu-img ? _______________________________________________ Users mailing list -- users@ovirt.org <mailto:users@ovirt.org> To unsubscribe send an email to users-leave@ovirt.org <mailto:users-leave@ovirt.org> Privacy Statement: https://www.ovirt.org/site/privacy-policy/ <https://www.ovirt.org/site/privacy-policy/> oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ <https://www.ovirt.org/community/about/community-guidelines/> List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/2OUJ63JSQEZPWZ... <https://lists.ovirt.org/archives/list/users@ovirt.org/message/2OUJ63JSQEZPWZ6X666TZQZQJ2DMGLXS/>
--
Raz Tamir Manager, RHV QE
_______________________________________________ Users mailing list -- users@ovirt.org <mailto:users@ovirt.org> To unsubscribe send an email to users-leave@ovirt.org <mailto:users-leave@ovirt.org> Privacy Statement: https://www.ovirt.org/site/privacy-policy/ <https://www.ovirt.org/site/privacy-policy/> oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ <https://www.ovirt.org/community/about/community-guidelines/> List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/SC4A73B6RW7WOQ... <https://lists.ovirt.org/archives/list/users@ovirt.org/message/SC4A73B6RW7WOQLT6IAGQ3FZKOKSR62Q/>
_______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/LFILMX37EUSRUE...
participants (4)
-
Elad Ben Aharon
-
Michal Skrivanek
-
Punaatua PK
-
Raz Tamir