[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] xendomains script fails if more than one DomU in AUTO


  • To: "xen-users@xxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxx>
  • From: "Daniel Asplund" <danielsaori@xxxxxxxxx>
  • Date: Thu, 7 Aug 2008 09:53:02 +0200
  • Delivery-date: Thu, 07 Aug 2008 00:53:37 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=M4+3OmQgKfP4xzSogmxK86NBbLp16Aa11wyCwnHYVc5NOPpdO3+y4fNeCju2rEApS7 29l4RMvBDaqcwY3ylbrqAYuxW5TFar01plCIbTacjDBXIJG8prjE1QcDJnklmUtb7Owz YHIM1hKmSnJqI2Rwfo+hZHW5pAcNeDzDCOw7s=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

I noticed a problem with the xendomains script that it fails to manage
my domains if I have two or more configured in my XENDOMAINS_AUTO
directory. So running a "xendomains stop" will skip all domains and
keep them running. I am running Ubuntu 8.04 and found out that the
xendomains script has a problem in a case statement where it fails to
match the running domains. With the help of Ubuntuforum I managed to
find a solution for the script:
http://ubuntuforums.org/showthread.php?p=5538064

Can anyone confirm this behavior and try out the solution below.

The rdnames() function now looks like this:
rdnames()
{
    NAMES=
    if ! contains_something "$XENDOMAINS_AUTO"
    then
        return
    fi
    for dom in $XENDOMAINS_AUTO/*; do
        rdname $dom
        if test -z "$NAMES"; then
            NAMES=$NM;
        else
            NAMES="$NAMES $NM";
        fi
    done
}

And the beginning of the stop() function look likes this:
stop()
{
    # Collect list of domains to shut down
    if test "$XENDOMAINS_AUTO_ONLY" = "true"; then
        rdnames
    fi
    echo -n "Shutting down Xen domains:"
    while read LN; do
        parseln "$LN"
        if test "$id" = "0"; then continue; fi
        echo -n " $name"
        found="0"
        if test "$XENDOMAINS_AUTO_ONLY" = "true"; then
                for i in ${NAMES[@]}
                do
                if test $found="0"; then
                        if test $i = $name; then
                            found=1
                        fi
                fi
                done
                if test $found = "0"; then
                        echo -n "(skip)"
                        continue
                fi
        fi
        # XENDOMAINS_SYSRQ chould be something like just "s"

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.