[Libvir] [PATCH]fix the judgment of the domain state between hypervisor and xend

Hi, According to the xm & virsh man page, I make a patch which fixes the judgment of the domain state between xenHypervisorDriver and xenDaemonDriver. Signed-off-by: Kazuki Mizushima <mizushima.kazuk@jp.fujitsu.com> Thanks, Kazuki Mizushima Index: xend_internal.c =================================================================== RCS file: /data/cvs/libvirt/src/xend_internal.c,v retrieving revision 1.101 diff -u -p -r1.101 xend_internal.c --- xend_internal.c 8 Mar 2007 14:12:06 -0000 1.101 +++ xend_internal.c 14 Mar 2007 10:42:16 -0000 @@ -1722,9 +1722,9 @@ sexpr_to_xend_domain_info(virDomainPtr d if (strchr(flags, 'c')) info->state = VIR_DOMAIN_CRASHED; else if (strchr(flags, 's')) - info->state = VIR_DOMAIN_SHUTDOWN; - else if (strchr(flags, 'd')) info->state = VIR_DOMAIN_SHUTOFF; + else if (strchr(flags, 'd')) + info->state = VIR_DOMAIN_SHUTDOWN; else if (strchr(flags, 'p')) info->state = VIR_DOMAIN_PAUSED; else if (strchr(flags, 'b'))

On Wed, Mar 14, 2007 at 08:13:10PM +0900, Kazuki Mizushima wrote:
Hi,
According to the xm & virsh man page, I make a patch which fixes the judgment of the domain state between xenHypervisorDriver and xenDaemonDriver.
Signed-off-by: Kazuki Mizushima <mizushima.kazuk@jp.fujitsu.com>
Okay, it looks like there was an inversion between 's' which should be shutoff and 'd' which should be shutoff, can you confirm this ? thanks ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Hi Daniel,
Okay, it looks like there was an inversion between 's' which should be shutoff and 'd' which should be shutoff, can you confirm this ?
Yes, I can confirm. But I tested at xen older(3.03) version which doesn't have life-cycle . # xm list Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 1509 4 r----- 2848.5 guest_dom 2 511 2 ---s-- 19.1 The domain state is differnet form REMOTE and LOCAL. # virsh list Id Name State ---------------------------------- 0 Domain-0 running 2 guest_dom shut off # virsh --connect http://10.131.236.110:8000 list Id Name State ---------------------------------- 0 Domain-0 running 2 guest_dom in shutdown This patch fixes it. # ./virsh list Id Name State ---------------------------------- 0 Domain-0 running 2 guest_dom shut off # ./virsh --connect http://10.131.236.110:8000 list Id Name State ---------------------------------- 0 Domain-0 running 2 guest_dom shut off But at latest version(xen 3.0.4), the follwing new problem is occured. The domains which is the state of "shut off" vanishes. # ./virsh list Id Name State ---------------------------------- 0 Domain-0 running 2 guest_dom shut off # ./virsh --connect http://10.131.236.110:8000 list Id Name State ---------------------------------- 0 Domain-0 running I suspect that this cause is changing of XenD behavior with life-cycle. If XenD is going to return shut off domain information, this patch is needed I think.. Thanks, Kazuki Mizushima ----- Original Message ----- From: "Daniel Veillard" <veillard@redhat.com> To: "Kazuki Mizushima" <mizushima.kazuk@jp.fujitsu.com> Cc: <libvir-list@redhat.com> Sent: Wednesday, March 14, 2007 10:14 PM Subject: Re: [Libvir] [PATCH]fix the judgment of the domain state between hypervisor and xend
On Wed, Mar 14, 2007 at 08:13:10PM +0900, Kazuki Mizushima wrote:
Hi,
According to the xm & virsh man page, I make a patch which fixes the judgment of the domain state between xenHypervisorDriver and xenDaemonDriver.
Signed-off-by: Kazuki Mizushima <mizushima.kazuk@jp.fujitsu.com>
Okay, it looks like there was an inversion between 's' which should be shutoff and 'd' which should be shutoff, can you confirm this ?
thanks !
Daniel
-- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (2)
-
Daniel Veillard
-
Kazuki Mizushima