WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

RE: [Xen-users] Error stopping xendomains

To: <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-users] Error stopping xendomains
From: "Schober Walter" <Walter.Schober@xxxxxxxxx>
Date: Fri, 1 Jun 2007 15:19:26 +0200
Cc: Michael Watters <michael@xxxxxxxxxx>
Delivery-date: Fri, 01 Jun 2007 06:18:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AceiEsAB2GapB9TdTLmDich54Rf1lQCOEnJg
Thread-topic: [Xen-users] Error stopping xendomains
Acc. to the script, it strips 17 digits for the name.

Also the readln doesn't work in 3.1 anymore, because my xm list gives
one parameter less than parseln() expects:
[root@s12 sysconfig]# xm list
Name                                      ID   Mem VCPUs      State
Time(s)
Domain-0                                   0  1985     8     r-----
9685.9
vs01                                       8  2000     4     -b----
32.4
[root@s12 sysconfig]#

/etc/init.d/xendomains:
---
parseln()
{
    name=`echo "$1" | cut -c0-17`
    name=${name%% *}
    rest=`echo "$1" | cut -c18- `
#    read id mem cpu vcpu state tm < <(echo "$rest")
# -- fixed wsc 20070601
    read id mem vcpu state tm < <(echo "$rest")
}

-> cpu not present. So 
all_zombies()
{
    while read LN; do
        parseln "$LN"
        if test $id = 0; then continue; fi
        if test "$state" != "-b---d" -a "$state" != "-----d"; then
            return 1;
        fi
    done < <(xm list | grep -v '^Name')
    return 0
}

returns "1" always. 

And: Shouldn't it be the other way round: return 1 only if all have
state != ....d?
Otherwise this get's "break" as soon as one specified $2.

watchdog_xm()
[...]
        # go to kill immediately if there's only zombies left
        if all_zombies && test -n "$2"; then echo -n "B"; break; fi
[...]

So: Shouldn't it be 
        # go to kill immediately if there's only zombies left
        if test -n "$2" && ! all_zombies; then echo -n "B"; break; fi
?

I would suggest attached patch for /etc/init.d/xendomains.

br
Walter 

> -----Original Message-----
> From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Michael Watters
> Sent: Tuesday, May 29, 2007 6:59 PM
> To: xen-users@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-users] Error stopping xendomains
> 
> Is there a limit on how long a domU name can be?  When I run 
> /etc/init.d/xendomains stop I get a bunch of errors like this:
> 
> [root@xentest6 images]# /etc/init.d/xendomains stop        [FAILED]
> Shutting down Xen domains: host.applepenguin(save)Error: 
> Domain '.org' 
> does not exist.
> !(shut).Error: Domain '.org' does not exist.
> /etc/init.d/xendomains: line 306:  3730 Terminated              
> watchdog_xm save
> !/etc/init.d/xendomains: line 188:  3740 Terminated              
> watchdog_xm shutdown
>  host.earwig-facto(save)/etc/init.d/xendomains: line 306:  3740 
> Terminated              watchdog_xm shutdown
> .Error: Domain 'ry.net' does not exist.
> !(shut).Error: Domain 'ry.net' does not exist.
> /etc/init.d/xendomains: line 306:  3757 Terminated              
> watchdog_xm save
> !/etc/init.d/xendomains: line 188:  3768 Terminated              
> watchdog_xm shutdown
>  host.kingrst.com(save)/etc/init.d/xendomains: line 306:  3768 
> Terminated              watchdog_xm shutdown
> ................/etc/init.d/xendomains: line 188:  3785 
> Terminated              watchdog_xm save
>  host.slave-networ(save)/etc/init.d/xendomains: line 306:  3785 
> Terminated              watchdog_xm save
> .Error: Domain 'k.org' does not exist.
> !(shut).Error: Domain 'k.org' does not exist.
> /etc/init.d/xendomains: line 306:  4170 Terminated              
> watchdog_xm save
> !/etc/init.d/xendomains: line 188:  4190 Terminated              
> watchdog_xm shutdown
>  host4.thegbox.com(save)/etc/init.d/xendomains: line 306:  4190 
> Terminated              watchdog_xm shutdown
> 
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
> 

Attachment: xendomains.patch
Description: xendomains.patch

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
  • RE: [Xen-users] Error stopping xendomains, Schober Walter <=