[libvirt] [PATCH] qemu: Don't flag domain running when qemu dies

Eric Blake eblake at redhat.com
Thu May 5 18:51:56 UTC 2011


On 05/05/2011 02:29 AM, Michal Privoznik wrote:
> When we try to stop domain's CPUs and qemu crash meanwhile, a cleanup
> of domain is performed and domain gets into state VIR_DOMAIN_SHUTOFF.
> But this is later overwritten and thus results in domain marked as
> running but with negative ID.
> ---
>  src/qemu/qemu_process.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 7691cbe..539e4f3 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -1919,7 +1919,7 @@ int qemuProcessStopCPUs(struct qemud_driver *driver, virDomainObjPtr vm)
>      qemuDomainObjEnterMonitorWithDriver(driver, vm);
>      ret = qemuMonitorStopCPUs(priv->mon);
>      qemuDomainObjExitMonitorWithDriver(driver, vm);
> -    if (ret < 0) {
> +    if (ret < 0 && vm->state == VIR_DOMAIN_PAUSED) {

Interesting idea.  But I think it is subsumed by the larger patch to
make qemuDomainObjExitMonitorWithDriver return a warn-unused-result
status that states whether the vm is still active at the point when the
lock was regained.  That is, if we apply that patch, then this patch
might not be needed.

https://www.redhat.com/archives/libvir-list/2011-April/msg00689.html

I guess I still need to review that one.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110505/617a4bc9/attachment-0001.sig>


More information about the libvir-list mailing list