[Sheepdog] [RFC PATCH 1/2] close all the block drivers before the qemu process exits
morita.kazutaka at lab.ntt.co.jp
Thu May 13 04:34:29 CEST 2010
At Thu, 13 May 2010 05:16:35 +0900,
MORITA Kazutaka wrote:
> On 2010/05/12 23:28, Avi Kivity wrote:
> > On 05/12/2010 01:46 PM, MORITA Kazutaka wrote:
> >> This patch calls the close handler of the block driver before the qemu
> >> process exits.
> >> This is necessary because the sheepdog block driver releases the lock
> >> of VM images in the close handler.
> > How do you handle abnormal termination?
> In the case, we need to release the lock manually, unfortunately.
> Sheepdog admin tool has a command to do that.
More precisely, if qemu fails down with its host machine, we detect
the qemu failure and release the lock. It is because Sheepdog
currently assumes that all the qemu processes are in the sheepdog
cluster, and remember that where they are running. When machine
failures happen, sheepdog release the lock of the VMs on the machines
(We uses corosync to check which machines are alive or not).
If the qemu process exits abnormally and its host machine is alive,
the sheepdog daemon on the host needs to detect the qemu failure.
However, the feature is not implemented yet. We think of checking a
socket connection between qemu and sheepdog daemon to detect the
failure. Currently, we need to release the lock manually from the
admin tool in this case.
More information about the sheepdog