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

[Xen-users] Xendomains always broken for me, nobody else?


  • To: xen-users <xen-users@xxxxxxxxxxxxx>
  • From: Ian Murray <murrayie@xxxxxxxxxxx>
  • Date: Mon, 7 Jan 2013 12:42:44 +0000 (GMT)
  • Delivery-date: Mon, 07 Jan 2013 12:43:54 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=Gz32lyEXiJuVNMfPHDz7fTB9HhUvvj1NNVloJkBe9jgr1uvUfMgPCxbpMNY3qXnNNMB4x+iGR7k9zT5VZ8jeK9nAmIwot3b8Ya8Z9XG1TneWHUFon73SxvsDJIEv3jkgX45kogjsmyzX2lMYkuGYzw4TVtYlz6zPIPntLkKAB+w=;
  • List-id: Xen user discussion <xen-users.lists.xen.org>

Hi All,

Everytime I upgrade to a new version of Xen (just did 4.2.1 this weekend) I find the xendomains script completely unusable. I use xl exclusively and the behaviour is slightly different to what the script appears to be expecting.

Am I the only one that has this problem? I have an Ubuntu 12.04 based Xen server and a Scientific Linux 6.3 based server and both suffer the same problem.

I am no bash guru, so apologies if there are better/cleaner ways. I did submit it as a patch on the devel list but it got ignored plus I have no idea if it works for xm or not.

Thanks for reading,

Ian.

diff:


--- xendomains.421      2012-12-17 15:00:34.000000000 +0000
+++ xendomains  2013-01-06 11:14:44.622409914 +0000
@@ -27,11 +27,13 @@
 #                    boots / shuts down.
 ### END INIT INFO

+HEADCOMP="LinuxGuestRecord"
 CMD=xm
 $CMD list &> /dev/null
 if test $? -ne 0
 then
        CMD=xl
+       HEADCOMP="Xen saved domain"
 fi

 $CMD list &> /dev/null
@@ -202,10 +204,10 @@
     done
 }

-LIST_GREP='((domain\|(domid\|(name\|^{$\|"name":\|"domid":'
+LIST_GREP='((domain$\|(domid\|(name\|^{$\|"name":\|"domid":'
 parseln()
 {
-    if [[ "$1" =~ '(domain' ]] || [[ "$1" = "{" ]]; then
+    if [[ "$1" = '(domain' ]] || [[ "$1" = "{" ]]; then
         name=;id=
     elif [[ "$1" =~ '(name' ]]; then
         name=$(echo $1 | sed -e 's/^.*(name \(.*\))$/\1/')
@@ -255,7 +257,7 @@
         for dom in $XENDOMAINS_SAVE/*; do
             if [ -f $dom ] ; then
                 HEADER=`head -c 16 $dom | head -n 1 2> /dev/null`
-                if [ $HEADER = "LinuxGuestRecord" ]; then
+                if [ "$HEADER" = "$HEADCOMP" ]; then
                     echo -n " ${dom##*/}"
                     XMR=`$CMD restore $dom 2>&1 1>/dev/null`
                     #$CMD restore $dom
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

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