Comment 1 for bug 1394382

Revision history for this message
Mike McCracken (mikemc) wrote : Re: [Bug 1394382] Re: maas does not know about VM "paused" state

Thanks for looking at this. Here's some info that might be useful when
adding support for other states to virsh.py:

libvirt's docs are incomplete, so looking through the source, domstate can
return these states:

(this is line 132 in tools/virsh-domain-monitor.c)
VIR_ENUM_IMPL(vshDomainState,
              VIR_DOMAIN_LAST,
              N_("no state"),
              N_("running"),
              N_("idle"),
              N_("paused"),
              N_("in shutdown"),
              N_("shut off"),
              N_("crashed"),
              N_("pmsuspended"))

Note that domstate also has a --reason flag that "also prints the reason
for the state", and it will print it like this:
"paused (reason)"

Also note that if domstate returns paused "due to io error" (which you'll
know because of the --reason flag), run domblkerror to get info:
(from a manpage or something in the source:)
=item B<domblkerror> I<domain>

Show errors on block devices. This command usually comes handy when
B<domstate> command says that a domain was paused due to I/O error.
The B<domblkerror> command lists all block devices in error state and
the error seen on each of them.

On Wed, Nov 19, 2014 at 4:45 PM, Julian Edwards <email address hidden>
wrote:

> ** Changed in: maas
> Status: New => Triaged
>
> ** Changed in: maas
> Importance: Undecided => Critical
>
> ** Changed in: maas
> Milestone: None => 1.7.1
>
> ** Tags added: power
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1394382
>
> Title:
> maas does not know about VM "paused" state
>
> Status in MAAS:
> Triaged
>
> Bug description:
> If an enlisted VM with power type "Virsh" is paused for any reason,
> this triggers an internal server error, traceable back to virsh.py
> line 245, which shows that power_state_virsh only knows about 'off' or
> 'on'.
>
> This looks like it happened to us when the machine that the VM (on an
> orange box) was running on ran out of disk. The VM got paused, and
> then maas crashed trying to show us the node info.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/maas/+bug/1394382/+subscriptions
>