[Libvir] [PATCH] libvirt incorrectly reports crashed domains as shutoff
Daniel P. Berrange
berrange at redhat.com
Wed Oct 11 15:17:44 UTC 2006
On Wed, Oct 11, 2006 at 11:02:38AM -0400, Peter Vetere wrote:
> Hi, I've noticed that libvirt seems to report crashed domains as
> shutoff. Here's an example:
>
> [root at XXXXX ~]# virsh list
> Id Name State
> ----------------------------------
> 0 Domain-0 running
> 27 test03 blocked
> 34 test01 shut off
> 36 onetwentyeight blocked
>
> [root at XXXXX ~]# xm list
> Name ID Mem(MiB) VCPUs State Time(s)
> Domain-0 0 356 1 r----- 3655.4
> onetwentyeight 36 128 1 -b---- 16.7
> test01 34 256 1 ----c- 7.4
> test03 27 256 1 -b---- 231.7
>
> The reason is because xen_internal.c does not interpret the additional
> shutdown flags when it checks the domain's state. Attached is a patch
> which correctly checks these flags and reports the crashed state. I
> wasn't sure of the best way to react to the other shutdown flags, so I
> just defaulted to "SHUTOFF" for everything else.
Looks like a reasonable patch to me - the other states should be basicaly
transient anyway - with the 'reboot' state the domain will shortly be
switching back to its running state again. Likewise with 'suspend' state
the domain will shortly go away altogether.
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
More information about the libvir-list
mailing list