Updates with respect to migration
authorStefan de Konink <skinkie@xs4all.nl>
Mon, 6 Oct 2008 21:43:46 +0000 (6 23:43 +0200)
committerStefan de Konink <skinkie@xs4all.nl>
Mon, 6 Oct 2008 21:43:46 +0000 (6 23:43 +0200)
default.xsl
handler_virt.c
node/main.c
node/publish.c

index ce86891..c7b4288 100644 (file)
@@ -9,6 +9,7 @@
   <a href="/virt/{translate(./name,'_', '/')}/virDomainShutdown" style="background-image: url('/images/power.png'); background-repeat: no-repeat; display: block; width: 45px; height: 47px; font-size: 0; float: left;">Shutdown</a>
   <a href="/virt/{translate(./name,'_', '/')}/virDomainReboot" style="background-image: url('/images/reboot.png'); background-repeat: no-repeat; display: block; width: 45px; height: 47px; font-size: 0; float: left;">Reboot</a>
   <a href="/virt/{translate(./name,'_', '/')}/virDomainSave" style="background-image: url('/images/restore.png'); background-repeat: no-repeat; display: block; width: 45px; height: 47px; font-size: 0; float: left;">Snapshot</a>
+  <a href="/virt/{translate(./name,'_', '/')}/virDomainMigrate" style="background-image: url('/images/migrate.png'); background-repeat: no-repeat; display: block; width: 45px; height: 47px; font-size: 0; float: left;">Migrate</a>
   </xsl:when>
   <xsl:otherwise>
     <a href="/virt/{translate(./name,'_', '/')}/virDomainCreate" style="background-image: url('/images/power.png'); background-repeat: no-repeat; display: block; width: 45px; height: 47px; font-size: 0; float: left;">Create</a>
index 52d5c92..cff82ce 100644 (file)
@@ -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);
index 2bdcc59..4121cef 100644 (file)
@@ -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);
index 5f020ed..a0c66b1 100644 (file)
@@ -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);
                 }
 
             }