[libvirt] [PATCH] qemu: Fix shutoff reason when domain crashes

Jiri Denemark jdenemar at redhat.com
Fri Sep 16 15:24:15 UTC 2011


On Tue, Sep 13, 2011 at 10:48:34 -0600, Eric Blake wrote:
> On 09/13/2011 10:39 AM, Jiri Denemark wrote:
> > Commit 4454a9efc728b91e791b1f14c26ea23a19d57f48 changed shutoff reason
> > from VIR_DOMAIN_SHUTOFF_CRASHED to VIR_DOMAIN_SHUTOFF_FAILED in case we
> > see an unexpected EOF on monitor connection. But FAILED reason is
> > dedicated for domains that fail to start. CRASHED reason is the right
> > one to use in this situation.
> > ---
> >   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 8a12e2a..ca4f21f 100644
> > --- a/src/qemu/qemu_process.c
> > +++ b/src/qemu/qemu_process.c
> > @@ -139,7 +139,7 @@ qemuProcessHandleMonitorEOF(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
> >           VIR_DEBUG("Monitor connection to '%s' closed without SHUTDOWN event; "
> >                     "assuming the domain crashed", vm->def->name);
> >           eventReason = VIR_DOMAIN_EVENT_STOPPED_FAILED;
> > -        stopReason = VIR_DOMAIN_SHUTOFF_FAILED;
> > +        stopReason = VIR_DOMAIN_SHUTOFF_CRASHED;
> >           auditReason = "failed";
> 
> Is auditReason still correct at this point?  I think so, so I'm giving 
> ACK, but you may want to wait for a second review before pushing.

I think it's right. At least it was like that before the commit that changed
stopReason.

Pushed, thanks.

Jirka




More information about the libvir-list mailing list