[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xen-users
Subject:    Re: [Xen-users] Xen 4.2.2 /etc/init.d/xendomains save and restore of domains does not work
From:       Andreas Greve <greve-ml () a-greve ! de>
Date:       2013-06-30 21:45:20
Message-ID: 51D0A6F0.6080108 () a-greve ! de
[Download RAW message or body]

Hello Ian,

On 06/30/13 17:30, Ian Murray wrote:
> On 30/06/13 10:49, Andreas Greve wrote:
>> Hello,
>>
>> in the last days I switched from Xen 4.2.1 to Xen 4.2.2 (source from 
>> git repository tag 4.2.2)
>>
>>
>> commit a125ec6a4a2f028f97f0bdd8946d347a36dbe76b
>> Author: Jan Beulich <jbeulich@suse.com>
>> Date:   Tue Apr 23 18:42:55 2013 +0200
>>
>>     update Xen version to 4.2.2
>>
>>
>> My "base system" is a debian squeeze. For Xen I use the xl toolstack.
>>
>> Since updating to 4.2.2 the autosave and autorestore of domains dos 
>> not work any more.
>>
>> The reason is that there are some bugs in /etc/init.d/xendomains
>>
>> At the  end of the mail there is a diff of my corrections. The 
>> correction are only tested on my system under xl toolstack
>>
>
> There are some fixes going into Xen 4.3. My suggestion would be try 
> one commit after RC6, namely...
>
> http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=543a2657182dbb9237d1feeb1d3193096ab2cb2d 
>

  I download the file by from git and give him a chance. It works nearly 
perfect.
On xendomains stop there was all ok.

On xendomains start it restores the saved domains but after that it 
tries to start them again and produce some error messages like domain is 
already running.

The reason is  the sed script in rdname() does not work with xl output.
I'll changed it in the way as you have done with HEADCOMP (see the diff 
below).
After that all was nice for me


------------------------------------------------
root@srv01:/etc/init.d# diff -u .xendomains.4.3.original xendomains
--- .xendomains.4.3.original    2013-06-30 20:54:14.000000000 +0200
+++ xendomains  2013-06-30 23:27:44.000000000 +0200
@@ -31,11 +31,13 @@

  CMD=${SBINDIR}/xm
  HEADCOMP="LinuxGuestRecord"
+RDNAMESED='s/^.*(name \(.*\))$/\1/p'
  $CMD list &> /dev/null
  if test $? -ne 0
  then
         CMD=${SBINDIR}/xl
         HEADCOMP="Xen saved domain"
+        RDNAMESED='s/^.*"name": "\(.*\)",$/\1/p'
  fi

  $CMD list &> /dev/null
@@ -185,8 +187,8 @@
  # read name from xen config file
  rdname()
  {
-    NM=$($CMD create --quiet --dryrun --defconfig "$1" |
-         sed -n 's/^.*(name \(.*\))$/\1/p')
+    NM=$( $CMD create --quiet --dryrun --defconfig "$1" |
+         sed -n "${RDNAMESED}" )
  }

  rdnames()
----------------------------------------------------

>
> I am surprised you did not have issue with 4.2.1 because the header 
> issues have been present ever since xl became the default/preferred 
> toolstack, unless your Xen 4.2.1 came from a third-party.
Your are right I remember that there were some problems with 4.2.1 too. 
As I switched from 4.1 to 4.2.1.

Sorry at that time I had not much time. If I remember right, I fixed 
that in any way for me, but forget to report.

Thanks for your help. I learned a lot about bash (bla) seams to be equal 
to bla) in case instructions. That was new for me.


Best wishes


Andreas

>
> _______________________________________________
> Xen-users mailing list
> Xen-users@lists.xen.org
> http://lists.xen.org/xen-users



_______________________________________________
Xen-users mailing list
Xen-users@lists.xen.org
http://lists.xen.org/xen-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic