From: Stefan de Konink Date: Mon, 6 Oct 2008 21:43:46 +0000 (+0200) Subject: Updates with respect to migration X-Git-Url: https://repo.or.cz/w/handlervirt.git/commitdiff_plain/4105d93a0953bee0aa036826d3b3a4a15844153d Updates with respect to migration --- diff --git a/default.xsl b/default.xsl index ce86891..c7b4288 100644 --- a/default.xsl +++ b/default.xsl @@ -9,6 +9,7 @@ Shutdown Reboot Snapshot + Migrate Create diff --git a/handler_virt.c b/handler_virt.c index 52d5c92..cff82ce 100644 --- a/handler_virt.c +++ b/handler_virt.c @@ -637,7 +637,7 @@ virt_virt_function(cherokee_handler_virt_t *hdl, virDomainPtr dom, virConnectPtr virDomainPtr domNew = virDomainMigrate(dom, virConnNew, VIR_MIGRATE_LIVE, NULL, NULL, 0); if (domNew) { - virDomainFree(dom); +// virDomainFree(dom); dom = domNew; virConnectClose(virConn); diff --git a/node/main.c b/node/main.c index 2bdcc59..4121cef 100644 --- a/node/main.c +++ b/node/main.c @@ -20,7 +20,7 @@ void terminate(int sig) { if (pid == 0) { migrate_everything(); - exit(0); +// exit(0); } } @@ -34,7 +34,7 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char*argv[]) { /* The client that is going to do the work */ client_callback(NULL, AVAHI_CLIENT_FAILURE, NULL); - signal(SIGTERM, terminate); + signal(SIGUSR2, terminate); /* Run the main loop */ avahi_simple_poll_loop(simple_poll); diff --git a/node/publish.c b/node/publish.c index 5f020ed..a0c66b1 100644 --- a/node/publish.c +++ b/node/publish.c @@ -93,9 +93,8 @@ void migrate_everything() { if (dom) { if (client == NULL || migrate_domain(client, threaded_poll, dom) != 0) { virDomainShutdown(dom); + virDomainFree(dom); } - - virDomainFree(dom); } }