All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch[ xl problems with xendomains
@ 2013-05-21 21:12 Ian Murray
  2013-05-22  9:53 ` Ian Campbell
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ian Murray @ 2013-05-21 21:12 UTC (permalink / raw)
  To: xen-devel, ian.jackson

Hi,

Ever since xl become the preferred toolstack, I have had problems using 
the xendomains startup/shutdown script.  Having retested today, it seems 
that the issues are now reduced down to xendomains being unable to 
restart previously saved domains.

Here is a typical session using xl running Xen 4.2.2 on Ubuntu 64 12.04 
bit server, using stock Dom0 kernel (3.2.0-43-generic)

root@xen6:/etc/init.d# service xendomains start
root@xen6:/etc/init.d# service xendomains stop
Shutting down Xen domains: *   [done]
root@xen6:/etc/init.d# xl create /etc/xen/vpn2
Parsing config from /etc/xen/vpn2
Daemon running with PID 3969
root@xen6:/etc/init.d# service xendomains start
root@xen6:/etc/init.d# service xendomains stop
Shutting down Xen domains: vpn2(save)....
  *   [done]
root@xen6:/etc/init.d# service xendomains start
Restoring Xen domains:/etc/init.d/xendomains: line 258: [: too many 
arguments

  *   [done]
root@xen6:/# rm /var/lib/xen/save/vpn2

Line 258 reads as:-

-                if [ $HEADER = "LinuxGuestRecord" ]; then

There were further issues of xendomains not suspending domains properly 
but this appear resolved now because I think the behaviour of xl list -l 
has changed. AFAIR an extra 'domain' identifier was thrown in which was 
causing issues with the regex parser.

Anyway, as far as I can tell, the two issues that I see are that the if 
statement at line 258 borks because there are no quotes around the 
$HEADER. I'll leave it to the Bash gurus to explain that; I am not one 
and I just hacked it to work.

Secondly, it would appear that when using xl to save a running domain, 
the header in the save file does not contain the text "LinuxGuestRecord" 
but in fact contains "Xen saved domain". This causes xendomains to miss 
the save files and will not try to restore them. Placing a simple 
variable that contains the correct header text appears to fix this.

So applying the following patch to xendomains appears to ease these 
issues. Please be aware that I haven't tested this on anything earlier 
than 4.2.2 and hasn't been tested at all using xm, although the issues 
with the regex would likely break xm rather than the change below. 
Looking back at my original submission (2 years ago), I reported the 
issues against 4.1.1. As previously stated this had more problems 
because of differing output of xl list -l, which appears to be employed 
by xendomains. I haven't thoroughly tested the patch against every 
combination of domains sysreq'd, etc, but it appears to work for auto 
start, save and restore.

Thanks for reading and I hope this makes sense,

Ian.


Signed-off-by: Ian MURRAY <murrayie@yahoo.co.uk>

--- xendomains.422.orig 2013-05-19 18:06:18.525195879 +0100
+++ xendomains  2013-05-21 21:27:57.253429073 +0100
@@ -28,10 +28,12 @@
  ### END INIT INFO

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

  $CMD list &> /dev/null
@@ -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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch[ xl problems with xendomains
  2013-05-21 21:12 [Patch[ xl problems with xendomains Ian Murray
@ 2013-05-22  9:53 ` Ian Campbell
  2013-05-22 10:27   ` George Dunlap
                     ` (2 more replies)
  2013-05-22 10:35 ` George Dunlap
  2013-05-23  9:58 ` Fabio Fantoni
  2 siblings, 3 replies; 8+ messages in thread
From: Ian Campbell @ 2013-05-22  9:53 UTC (permalink / raw)
  To: Ian Murray; +Cc: ian.jackson, xen-devel

On Tue, 2013-05-21 at 22:12 +0100, Ian Murray wrote:
> Hi,
> 
> Ever since xl become the preferred toolstack, I have had problems using 
> the xendomains startup/shutdown script.  Having retested today, it seems 
> that the issues are now reduced down to xendomains being unable to 
> restart previously saved domains.
> 
> Here is a typical session using xl running Xen 4.2.2 on Ubuntu 64 12.04 
> bit server, using stock Dom0 kernel (3.2.0-43-generic)
> 
> root@xen6:/etc/init.d# service xendomains start
> root@xen6:/etc/init.d# service xendomains stop
> Shutting down Xen domains: *   [done]
> root@xen6:/etc/init.d# xl create /etc/xen/vpn2
> Parsing config from /etc/xen/vpn2
> Daemon running with PID 3969
> root@xen6:/etc/init.d# service xendomains start
> root@xen6:/etc/init.d# service xendomains stop
> Shutting down Xen domains: vpn2(save)....
>   *   [done]
> root@xen6:/etc/init.d# service xendomains start
> Restoring Xen domains:/etc/init.d/xendomains: line 258: [: too many 
> arguments
> 
>   *   [done]
> root@xen6:/# rm /var/lib/xen/save/vpn2
> 
> Line 258 reads as:-
> 
> -                if [ $HEADER = "LinuxGuestRecord" ]; then
> 
> There were further issues of xendomains not suspending domains properly 
> but this appear resolved now because I think the behaviour of xl list -l 
> has changed. AFAIR an extra 'domain' identifier was thrown in which was 
> causing issues with the regex parser.
> 
> Anyway, as far as I can tell, the two issues that I see are that the if 
> statement at line 258 borks because there are no quotes around the 
> $HEADER. I'll leave it to the Bash gurus to explain that; I am not one 
> and I just hacked it to work.

$HEADER presumably includes spaces, because the xl save header does, and
therefore requires quoting. This was also broken for xm because even
though the xm save header has no spaces the point of this check is to
look for corrupt/invalid save files, which may well have a space.

> Secondly, it would appear that when using xl to save a running domain, 
> the header in the save file does not contain the text "LinuxGuestRecord" 
> but in fact contains "Xen saved domain". This causes xendomains to miss 
> the save files and will not try to restore them. Placing a simple 
> variable that contains the correct header text appears to fix this.
> 
> So applying the following patch to xendomains appears to ease these 
> issues. Please be aware that I haven't tested this on anything earlier 
> than 4.2.2 and hasn't been tested at all using xm, although the issues 
> with the regex would likely break xm rather than the change below. 
> Looking back at my original submission (2 years ago), I reported the 
> issues against 4.1.1. As previously stated this had more problems 
> because of differing output of xl list -l, which appears to be employed 
> by xendomains. I haven't thoroughly tested the patch against every 
> combination of domains sysreq'd, etc, but it appears to work for auto 
> start, save and restore.

It looks correct to me.

> Thanks for reading and I hope this makes sense,
> 
> Ian.
> 
> 
> Signed-off-by: Ian MURRAY <murrayie@yahoo.co.uk>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

That actual patch seems to be a bit mangled (looks like an unresolved
git conflict 3 way diff thing). Since it is simple I can fix it up as I
apply.

> 
> --- xendomains.422.orig 2013-05-19 18:06:18.525195879 +0100
> +++ xendomains  2013-05-21 21:27:57.253429073 +0100
> @@ -28,10 +28,12 @@
>   ### END INIT INFO
> 
>   CMD=xm
> ++HEADCOMP="LinuxGuestRecord"
>   $CMD list &> /dev/null
>   if test $? -ne 0
>   then
>          CMD=xl
> +       HEADCOMP="Xen saved domain"
>   fi
> 
>   $CMD list &> /dev/null
> @@ -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-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch[ xl problems with xendomains
  2013-05-22  9:53 ` Ian Campbell
@ 2013-05-22 10:27   ` George Dunlap
  2013-05-22 11:44   ` Ian Murray
  2013-05-23 13:24   ` Ian Campbell
  2 siblings, 0 replies; 8+ messages in thread
From: George Dunlap @ 2013-05-22 10:27 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Ian Murray, Ian Jackson, xen-devel

On Wed, May 22, 2013 at 10:53 AM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Tue, 2013-05-21 at 22:12 +0100, Ian Murray wrote:
>> Hi,
>>
>> Ever since xl become the preferred toolstack, I have had problems using
>> the xendomains startup/shutdown script.  Having retested today, it seems
>> that the issues are now reduced down to xendomains being unable to
>> restart previously saved domains.
>>
>> Here is a typical session using xl running Xen 4.2.2 on Ubuntu 64 12.04
>> bit server, using stock Dom0 kernel (3.2.0-43-generic)
>>
>> root@xen6:/etc/init.d# service xendomains start
>> root@xen6:/etc/init.d# service xendomains stop
>> Shutting down Xen domains: *   [done]
>> root@xen6:/etc/init.d# xl create /etc/xen/vpn2
>> Parsing config from /etc/xen/vpn2
>> Daemon running with PID 3969
>> root@xen6:/etc/init.d# service xendomains start
>> root@xen6:/etc/init.d# service xendomains stop
>> Shutting down Xen domains: vpn2(save)....
>>   *   [done]
>> root@xen6:/etc/init.d# service xendomains start
>> Restoring Xen domains:/etc/init.d/xendomains: line 258: [: too many
>> arguments
>>
>>   *   [done]
>> root@xen6:/# rm /var/lib/xen/save/vpn2
>>
>> Line 258 reads as:-
>>
>> -                if [ $HEADER = "LinuxGuestRecord" ]; then
>>
>> There were further issues of xendomains not suspending domains properly
>> but this appear resolved now because I think the behaviour of xl list -l
>> has changed. AFAIR an extra 'domain' identifier was thrown in which was
>> causing issues with the regex parser.
>>
>> Anyway, as far as I can tell, the two issues that I see are that the if
>> statement at line 258 borks because there are no quotes around the
>> $HEADER. I'll leave it to the Bash gurus to explain that; I am not one
>> and I just hacked it to work.
>
> $HEADER presumably includes spaces, because the xl save header does, and
> therefore requires quoting. This was also broken for xm because even
> though the xm save header has no spaces the point of this check is to
> look for corrupt/invalid save files, which may well have a space.
>
>> Secondly, it would appear that when using xl to save a running domain,
>> the header in the save file does not contain the text "LinuxGuestRecord"
>> but in fact contains "Xen saved domain". This causes xendomains to miss
>> the save files and will not try to restore them. Placing a simple
>> variable that contains the correct header text appears to fix this.
>>
>> So applying the following patch to xendomains appears to ease these
>> issues. Please be aware that I haven't tested this on anything earlier
>> than 4.2.2 and hasn't been tested at all using xm, although the issues
>> with the regex would likely break xm rather than the change below.
>> Looking back at my original submission (2 years ago), I reported the
>> issues against 4.1.1. As previously stated this had more problems
>> because of differing output of xl list -l, which appears to be employed
>> by xendomains. I haven't thoroughly tested the patch against every
>> combination of domains sysreq'd, etc, but it appears to work for auto
>> start, save and restore.
>
> It looks correct to me.
>
>> Thanks for reading and I hope this makes sense,
>>
>> Ian.
>>
>>
>> Signed-off-by: Ian MURRAY <murrayie@yahoo.co.uk>
>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
>
> That actual patch seems to be a bit mangled (looks like an unresolved
> git conflict 3 way diff thing). Since it is simple I can fix it up as I
> apply.

Release-wise, this is a pretty clear bug-fix:

Acked-by: George Dunlap <george.dunlap@eu.citrix.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch[ xl problems with xendomains
  2013-05-21 21:12 [Patch[ xl problems with xendomains Ian Murray
  2013-05-22  9:53 ` Ian Campbell
@ 2013-05-22 10:35 ` George Dunlap
  2013-05-23  9:58 ` Fabio Fantoni
  2 siblings, 0 replies; 8+ messages in thread
From: George Dunlap @ 2013-05-22 10:35 UTC (permalink / raw)
  To: Ian Murray; +Cc: xenbugs, Ian Jackson, xen-devel

create !
title -1 "xl problems with xendomains"
thanks

Just testing the bug-tracking system...

On Tue, May 21, 2013 at 10:12 PM, Ian Murray <murrayie@yahoo.co.uk> wrote:
> Hi,
>
> Ever since xl become the preferred toolstack, I have had problems using the
> xendomains startup/shutdown script.  Having retested today, it seems that
> the issues are now reduced down to xendomains being unable to restart
> previously saved domains.
>
> Here is a typical session using xl running Xen 4.2.2 on Ubuntu 64 12.04 bit
> server, using stock Dom0 kernel (3.2.0-43-generic)
>
> root@xen6:/etc/init.d# service xendomains start
> root@xen6:/etc/init.d# service xendomains stop
> Shutting down Xen domains: *   [done]
> root@xen6:/etc/init.d# xl create /etc/xen/vpn2
> Parsing config from /etc/xen/vpn2
> Daemon running with PID 3969
> root@xen6:/etc/init.d# service xendomains start
> root@xen6:/etc/init.d# service xendomains stop
> Shutting down Xen domains: vpn2(save)....
>  *   [done]
> root@xen6:/etc/init.d# service xendomains start
> Restoring Xen domains:/etc/init.d/xendomains: line 258: [: too many
> arguments
>
>  *   [done]
> root@xen6:/# rm /var/lib/xen/save/vpn2
>
> Line 258 reads as:-
>
> -                if [ $HEADER = "LinuxGuestRecord" ]; then
>
> There were further issues of xendomains not suspending domains properly but
> this appear resolved now because I think the behaviour of xl list -l has
> changed. AFAIR an extra 'domain' identifier was thrown in which was causing
> issues with the regex parser.
>
> Anyway, as far as I can tell, the two issues that I see are that the if
> statement at line 258 borks because there are no quotes around the $HEADER.
> I'll leave it to the Bash gurus to explain that; I am not one and I just
> hacked it to work.
>
> Secondly, it would appear that when using xl to save a running domain, the
> header in the save file does not contain the text "LinuxGuestRecord" but in
> fact contains "Xen saved domain". This causes xendomains to miss the save
> files and will not try to restore them. Placing a simple variable that
> contains the correct header text appears to fix this.
>
> So applying the following patch to xendomains appears to ease these issues.
> Please be aware that I haven't tested this on anything earlier than 4.2.2
> and hasn't been tested at all using xm, although the issues with the regex
> would likely break xm rather than the change below. Looking back at my
> original submission (2 years ago), I reported the issues against 4.1.1. As
> previously stated this had more problems because of differing output of xl
> list -l, which appears to be employed by xendomains. I haven't thoroughly
> tested the patch against every combination of domains sysreq'd, etc, but it
> appears to work for auto start, save and restore.
>
> Thanks for reading and I hope this makes sense,
>
> Ian.
>
>
> Signed-off-by: Ian MURRAY <murrayie@yahoo.co.uk>
>
> --- xendomains.422.orig 2013-05-19 18:06:18.525195879 +0100
> +++ xendomains  2013-05-21 21:27:57.253429073 +0100
> @@ -28,10 +28,12 @@
>  ### END INIT INFO
>
>  CMD=xm
> ++HEADCOMP="LinuxGuestRecord"
>  $CMD list &> /dev/null
>  if test $? -ne 0
>  then
>         CMD=xl
> +       HEADCOMP="Xen saved domain"
>  fi
>
>  $CMD list &> /dev/null
> @@ -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-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch[ xl problems with xendomains
  2013-05-22  9:53 ` Ian Campbell
  2013-05-22 10:27   ` George Dunlap
@ 2013-05-22 11:44   ` Ian Murray
  2013-05-23 13:24   ` Ian Campbell
  2 siblings, 0 replies; 8+ messages in thread
From: Ian Murray @ 2013-05-22 11:44 UTC (permalink / raw)
  To: Ian Campbell; +Cc: ian.jackson, xen-devel





----- Original Message -----
> From: Ian Campbell <Ian.Campbell@citrix.com>
> To: Ian Murray <murrayie@yahoo.co.uk>
> Cc: ian.jackson@eu.citrix.com; xen-devel <xen-devel@lists.xen.org>
> Sent: Wednesday, 22 May 2013, 10:53
> Subject: Re: [Xen-devel] [Patch[ xl problems with xendomains
> 


> 
> $HEADER presumably includes spaces, because the xl save header does, and
> therefore requires quoting. This was also broken for xm because even
> though the xm save header has no spaces the point of this check is to
> look for corrupt/invalid save files, which may well have a space.
> 

Yeah, by that point $HEADER should have "Xen saved domain" which indeed does include spaces. Makes perfect sense.


> 
> It looks correct to me.
> 

Great. :)


> 
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> 
> That actual patch seems to be a bit mangled (looks like an unresolved
> git conflict 3 way diff thing). Since it is simple I can fix it up as I
> apply.
> 

I just diffed the original file with a changed version. Anyway, as you say, whatever the issue, it's pretty obvious what is going on.

Thanks for actioning it and look forward to see it in Xen, whenever that is.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch[ xl problems with xendomains
  2013-05-21 21:12 [Patch[ xl problems with xendomains Ian Murray
  2013-05-22  9:53 ` Ian Campbell
  2013-05-22 10:35 ` George Dunlap
@ 2013-05-23  9:58 ` Fabio Fantoni
  2 siblings, 0 replies; 8+ messages in thread
From: Fabio Fantoni @ 2013-05-23  9:58 UTC (permalink / raw)
  To: Ian Murray; +Cc: ian.jackson, xen-devel

Il 21/05/2013 23:12, Ian Murray ha scritto:
> Hi,
>
> Ever since xl become the preferred toolstack, I have had problems 
> using the xendomains startup/shutdown script.  Having retested today, 
> it seems that the issues are now reduced down to xendomains being 
> unable to restart previously saved domains.
>
> Here is a typical session using xl running Xen 4.2.2 on Ubuntu 64 
> 12.04 bit server, using stock Dom0 kernel (3.2.0-43-generic)
>
> root@xen6:/etc/init.d# service xendomains start
> root@xen6:/etc/init.d# service xendomains stop
> Shutting down Xen domains: *   [done]
> root@xen6:/etc/init.d# xl create /etc/xen/vpn2
> Parsing config from /etc/xen/vpn2
> Daemon running with PID 3969
> root@xen6:/etc/init.d# service xendomains start
> root@xen6:/etc/init.d# service xendomains stop
> Shutting down Xen domains: vpn2(save)....
>  *   [done]
> root@xen6:/etc/init.d# service xendomains start
> Restoring Xen domains:/etc/init.d/xendomains: line 258: [: too many 
> arguments
>
>  *   [done]
> root@xen6:/# rm /var/lib/xen/save/vpn2
>
> Line 258 reads as:-
>
> -                if [ $HEADER = "LinuxGuestRecord" ]; then
>
> There were further issues of xendomains not suspending domains 
> properly but this appear resolved now because I think the behaviour of 
> xl list -l has changed. AFAIR an extra 'domain' identifier was thrown 
> in which was causing issues with the regex parser.
>
> Anyway, as far as I can tell, the two issues that I see are that the 
> if statement at line 258 borks because there are no quotes around the 
> $HEADER. I'll leave it to the Bash gurus to explain that; I am not one 
> and I just hacked it to work.
>
> Secondly, it would appear that when using xl to save a running domain, 
> the header in the save file does not contain the text 
> "LinuxGuestRecord" but in fact contains "Xen saved domain". This 
> causes xendomains to miss the save files and will not try to restore 
> them. Placing a simple variable that contains the correct header text 
> appears to fix this.
>
> So applying the following patch to xendomains appears to ease these 
> issues. Please be aware that I haven't tested this on anything earlier 
> than 4.2.2 and hasn't been tested at all using xm, although the issues 
> with the regex would likely break xm rather than the change below. 
> Looking back at my original submission (2 years ago), I reported the 
> issues against 4.1.1. As previously stated this had more problems 
> because of differing output of xl list -l, which appears to be 
> employed by xendomains. I haven't thoroughly tested the patch against 
> every combination of domains sysreq'd, etc, but it appears to work for 
> auto start, save and restore.
>
> Thanks for reading and I hope this makes sense,
>
> Ian.
>
>
> Signed-off-by: Ian MURRAY <murrayie@yahoo.co.uk>
Tested-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
>
> --- xendomains.422.orig 2013-05-19 18:06:18.525195879 +0100
> +++ xendomains  2013-05-21 21:27:57.253429073 +0100
> @@ -28,10 +28,12 @@
>  ### END INIT INFO
>
>  CMD=xm
> ++HEADCOMP="LinuxGuestRecord"
>  $CMD list &> /dev/null
>  if test $? -ne 0
>  then
>         CMD=xl
> +       HEADCOMP="Xen saved domain"
>  fi
>
>  $CMD list &> /dev/null
> @@ -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-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Patch[ xl problems with xendomains
  2013-05-22  9:53 ` Ian Campbell
  2013-05-22 10:27   ` George Dunlap
  2013-05-22 11:44   ` Ian Murray
@ 2013-05-23 13:24   ` Ian Campbell
  2013-05-23 19:23     ` Ian Murray
  2 siblings, 1 reply; 8+ messages in thread
From: Ian Campbell @ 2013-05-23 13:24 UTC (permalink / raw)
  To: Ian Murray; +Cc: ian.jackson, xen-devel

On Wed, 2013-05-22 at 10:53 +0100, Ian Campbell wrote:

> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> 
> That actual patch seems to be a bit mangled (looks like an unresolved
> git conflict 3 way diff thing). Since it is simple I can fix it up as I
> apply.

FYI what I applied was, please check that it is correct:

commit 13b37b6e08679d810544c99e69cfd81b7d34db18
Author: Ian Murray <murrayie@yahoo.co.uk>
Date:   Thu May 23 11:33:34 2013 +0100

    hotplug/Linux: xendomains compatibility with xl
    
    The xl save file uses a different header string to the xm one. Teach the
    xendomains script about it.
    
    Signed-off-by: Ian MURRAY <murrayie@yahoo.co.uk>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    [ ijc -- rewrote commit message ]

diff --git a/tools/hotplug/Linux/init.d/xendomains b/tools/hotplug/Linux/init.d/xendomains
index 2a1999a..730541e 100644
--- a/tools/hotplug/Linux/init.d/xendomains
+++ b/tools/hotplug/Linux/init.d/xendomains
@@ -30,10 +30,12 @@
 . /etc/xen/scripts/hotplugpath.sh
 
 CMD=${SBINDIR}/xm
+HEADCOMP="LinuxGuestRecord"
 $CMD list &> /dev/null
 if test $? -ne 0
 then
 	CMD=${SBINDIR}/xl
+	HEADCOMP="Xen saved domain"
 fi
 
 $CMD list &> /dev/null
@@ -257,7 +259,7 @@ start()
         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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Patch[ xl problems with xendomains
  2013-05-23 13:24   ` Ian Campbell
@ 2013-05-23 19:23     ` Ian Murray
  0 siblings, 0 replies; 8+ messages in thread
From: Ian Murray @ 2013-05-23 19:23 UTC (permalink / raw)
  To: Ian Campbell; +Cc: ian.jackson, xen-devel

On 23/05/13 14:24, Ian Campbell wrote:
> On Wed, 2013-05-22 at 10:53 +0100, Ian Campbell wrote:
>
>> Acked-by: Ian Campbell <ian.campbell@citrix.com>
>>
>> That actual patch seems to be a bit mangled (looks like an unresolved
>> git conflict 3 way diff thing). Since it is simple I can fix it up as I
>> apply.
> FYI what I applied was, please check that it is correct:
>
> commit 13b37b6e08679d810544c99e69cfd81b7d34db18
> Author: Ian Murray <murrayie@yahoo.co.uk>
> Date:   Thu May 23 11:33:34 2013 +0100
>
>      hotplug/Linux: xendomains compatibility with xl
>      
>      The xl save file uses a different header string to the xm one. Teach the
>      xendomains script about it.
>      
>      Signed-off-by: Ian MURRAY <murrayie@yahoo.co.uk>
>      Acked-by: Ian Campbell <ian.campbell@citrix.com>
>      [ ijc -- rewrote commit message ]
>
Yes, looks good. :)

Thanks,

Ian.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-23 19:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-21 21:12 [Patch[ xl problems with xendomains Ian Murray
2013-05-22  9:53 ` Ian Campbell
2013-05-22 10:27   ` George Dunlap
2013-05-22 11:44   ` Ian Murray
2013-05-23 13:24   ` Ian Campbell
2013-05-23 19:23     ` Ian Murray
2013-05-22 10:35 ` George Dunlap
2013-05-23  9:58 ` Fabio Fantoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.