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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]