Well, I believe the problem is no more valid.
My code before was:
virsh qemu-agent-command $INSTANCE '{"execute":"guest-fsfreeze-freeze"}'
rbd snap create $RBD_ID --snap `date +%F-%T`

and then snapshot creation was hanging forever. I inserted a 2 second sleep.

My code after
virsh qemu-agent-command $INSTANCE '{"execute":"guest-fsfreeze-freeze"}'
sleep 2
rbd snap create $RBD_ID --snap `date +%F-%T`

And now it works perfectly. Again, I have no idea, how it solved the problem.
Thanks :)

2016-01-06 0:49 GMT+08:00 Мистер Сёма <[email protected]>:
> I am very sorry, but I am not able to increase log versbosity because
> it's a production cluster with very limited space for logs. Sounds
> crazy, but that's it.
> I have found out that the RBD snapshot process hangs forever only when
> QEMU fsfreeze was issued just before the snapshot. If the guest is not
> frozen - snapshot is taken with no problem... I have absolutely no
> idea how these two things could be related to each other... And again
> this issue occurs only when there is an exclusive lock on image and
> exclusive lock feature is enabled also on it.
>
> Do somebody else have such a problem?
>
> 2016-01-05 2:55 GMT+08:00 Jason Dillaman <[email protected]>:
>> I am surprised by the error you are seeing with exclusive lock enabled.  The 
>> rbd CLI should be able to send the 'snap create' request to QEMU without an 
>> error.  Are you able to provide "debug rbd = 20" logs from shortly before 
>> and after your snapshot attempt?
>>
>> --
>>
>> Jason Dillaman
>>
>>
>> ----- Original Message -----
>>> From: "Мистер Сёма" <[email protected]>
>>> To: "ceph-users" <[email protected]>
>>> Sent: Monday, January 4, 2016 12:37:07 PM
>>> Subject: [ceph-users] How to do quiesced rbd snapshot in libvirt?
>>>
>>> Hello,
>>>
>>> Can anyone please tell me what is the right way to do quiesced RBD
>>> snapshots in libvirt (OpenStack)?
>>> My Ceph version is 0.94.3.
>>>
>>> I found two possible ways, none of them is working for me. Wonder if
>>> I'm doing something wrong:
>>> 1) Do VM fsFreeze through QEMU guest agent, perform RBD snapshot, do
>>> fsThaw. Looks good but the bad thing here is that libvirt uses
>>> exclusive lock on image, which results in errors like that when taking
>>> snapshot: " 7f359d304880 -1 librbd::ImageWatcher: no lock owners
>>> detected". It seems like rbd client is trying to take snapshot on
>>> behalf of exclusive lock owner but is unable to find this owner.
>>> Without an exclusive lock everything is working nice.
>>>
>>> 2)  Performing QEMU external snapshots with local QCOW2 file being
>>> overlayed on top of RBD image. This seems really interesting but the
>>> bad thing is that there is no way currently to remove this kind of
>>> snapshot because active blockcommit is not currently working for RBD
>>> images (https://bugzilla.redhat.com/show_bug.cgi?id=1189998).
>>>
>>> So again my question is: how do you guys take quiesced RBD snapshots in
>>> libvirt?
>>> _______________________________________________
>>> ceph-users mailing list
>>> [email protected]
>>> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>>>
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to