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-devel

Re: [Xen-devel] XL: pv guests dont reboot after migration (xen4.1.2-rc2-

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: Re: [Xen-devel] XL: pv guests dont reboot after migration (xen4.1.2-rc2-pre)
From: Andreas Olsowski <andreas.olsowski@xxxxxxxxxxx>
Date: Fri, 23 Sep 2011 11:15:49 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 23 Sep 2011 02:18:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1316764843.23371.103.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4E785FDD.40209@xxxxxxxxxxx> <1316546621.5182.23.camel@xxxxxxxxxxxxxxxxxxxx> <4E7C37D6.7050109@xxxxxxxxxxx> <1316764843.23371.103.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Icedove/3.1.13
On 09/23/2011 10:00 AM, Ian Campbell wrote:
It smells like on reboot it is trying to receive another incoming
migration, instead of restarting the domain it already has.

This (untested) might help:

diff -r d7b14b76f1eb tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Thu Sep 22 14:26:08 2011 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Fri Sep 23 08:59:36 2011 +0100
@@ -1516,6 +1516,11 @@ start:
          ret = libxl_domain_create_restore(ctx,&d_config,
                                              cb,&child_console_pid,
                                              &domid, restore_fd);
+        /*
+         * On subsequent reboot etc we should create the domain, not
+         * restore/migrate-receive it again.
+         */
+        restore_file = NULL;
      }else{
          ret = libxl_domain_create_new(ctx,&d_config,
                                          cb,&child_console_pid,&domid);

Ian.


Patching works.

root@xenturio2:/usr/src/xen-4.1-testing.hg# patch -p1 < ../xl-migration-reboot.ian.patch
patching file tools/libxl/xl_cmdimpl.c
Hunk #1 succeeded at 1520 with fuzz 2 (offset 4 lines).

Compilation (clean/make/install) worked fine too.

The patch did what you intended for it to do, the guest reboots:

##############
root@xenturio2:/usr/src/xen-4.1-testing.hg# xl console thishopefullywontfail
PM: early restore of devices complete after 0.068 msecs
PM: restore of devices complete after 13.033 msecs
Setting capacity to 10485760
Setting capacity to 2097152

root@thishopefullywontfail:~# init 6
INIT: Switching to runlevel: 6
INIT: Sending processes the TERM signal
... usual shutdown ...
Restarting system.

root@xenturio2:/usr/src/xen-4.1-testing.hg# xl list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0 0 4661 8 r----- 78258.3 thishopefullywontfail 14 512 2 -b---- 2.6
root@xenturio2:/usr/src/xen-4.1-testing.hg# xl console thishopefullywontfail
Linux version 3.0.4-xenU (root@xenturio1) (gcc version 4.4.5 (Debian 4.4.5-8) ) #6 SMP Wed Aug 31 17:04:24 CEST 2011
... usual bootup ....

root@thishopefullywontfail:~#

#####################

Here is the output of the log:

root@xenturio2:/var/log/xen# cat xl-thishopefullywontfail--incoming.log
Waiting for domain thishopefullywontfail--incoming (domid 13) to die [pid 14668]
Domain 13 is dead
Action for shutdown reason code 1 is restart
Domain 13 needs to be cleaned up: destroying the domain
Done. Rebooting now
Waiting for domain thishopefullywontfail (domid 14) to die [pid 14668]



with best regards



andreas

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