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

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



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

Attachment: signature.asc
Description: OpenPGP digital signature


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