[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v20210209 4/4] xl: disable --debug option for xl migrate



xl migrate --debug used to track every pfn in every batch of pages.

Since commit cfa955591caea5d7ec505cdcbf4442f2d6e889e1 from Xen 4.6 the
debug flag changed meaning from "verify transferred memory during live
migration" to "verify transferred memory in remus/colo". At least xl
will not be able to trigger execution of the verifying code in
send_domain_memory_live anymore.

Remove "--debug" from "xl migrate -h" output.
Remove "--debug" from from xl man page.
Do not send "-d" as potential option for "xl migrate-receive" anymore.
Do not pass the flag LIBXL_SUSPEND_DEBUG anymore to libxl_domain_suspend.
Continue to recognize "--debug" as valid option for "xl migrate".
Continue to recognize "-d" as valid option for "xl migrate-receive".

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
 docs/man/xl.1.pod.in   |  4 ----
 tools/xl/xl_cmdtable.c |  1 -
 tools/xl/xl_migrate.c  | 15 ++++++---------
 3 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in
index e2176bd696..b14196ccfe 100644
--- a/docs/man/xl.1.pod.in
+++ b/docs/man/xl.1.pod.in
@@ -479,10 +479,6 @@ domain. See the corresponding option of the I<create> 
subcommand.
 Send the specified <config> file instead of the file used on creation of the
 domain.
 
-=item B<--debug>
-
-Display huge (!) amount of debug information during the migration process.
-
 =item B<-p>
 
 Leave the domain on the receive side paused after migration.
diff --git a/tools/xl/xl_cmdtable.c b/tools/xl/xl_cmdtable.c
index 07f54daabe..150f4cd1d3 100644
--- a/tools/xl/xl_cmdtable.c
+++ b/tools/xl/xl_cmdtable.c
@@ -171,7 +171,6 @@ struct cmd_spec cmd_table[] = {
       "                migrate-receive [-d -e]\n"
       "-e              Do not wait in the background (on <host>) for the 
death\n"
       "                of the domain.\n"
-      "--debug         Print huge (!) amount of debug during the migration 
process.\n"
       "-p              Do not unpause domain after migrating it.\n"
       "-D              Preserve the domain id"
     },
diff --git a/tools/xl/xl_migrate.c b/tools/xl/xl_migrate.c
index b8594f44a5..e4e4f918c7 100644
--- a/tools/xl/xl_migrate.c
+++ b/tools/xl/xl_migrate.c
@@ -177,8 +177,7 @@ static void migrate_do_preamble(int send_fd, int recv_fd, 
pid_t child,
 }
 
 static void migrate_domain(uint32_t domid, int preserve_domid,
-                           const char *rune, int debug,
-                           const char *override_config_file)
+                           const char *rune, const char *override_config_file)
 {
     pid_t child = -1;
     int rc;
@@ -204,8 +203,6 @@ static void migrate_domain(uint32_t domid, int 
preserve_domid,
 
     xtl_stdiostream_adjust_flags(logger, XTL_STDIOSTREAM_HIDE_PROGRESS, 0);
 
-    if (debug)
-        flags |= LIBXL_SUSPEND_DEBUG;
     rc = libxl_domain_suspend(ctx, domid, send_fd, flags, NULL);
     if (rc) {
         fprintf(stderr, "migration sender: libxl_domain_suspend failed"
@@ -500,6 +497,7 @@ int main_migrate_receive(int argc, char **argv)
         monitor = 0;
         break;
     case 'd':
+        /* For compatibility with older variants of xl */
         debug = 1;
         break;
     case 'r':
@@ -537,7 +535,7 @@ int main_migrate(int argc, char **argv)
     const char *ssh_command = "ssh";
     char *rune = NULL;
     char *host;
-    int opt, daemonize = 1, monitor = 1, debug = 0, pause_after_migration = 0;
+    int opt, daemonize = 1, monitor = 1, pause_after_migration = 0;
     int preserve_domid = 0;
     static struct option opts[] = {
         {"debug", 0, 0, 0x100},
@@ -566,7 +564,7 @@ int main_migrate(int argc, char **argv)
         preserve_domid = 1;
         break;
     case 0x100: /* --debug */
-        debug = 1;
+        /* ignored for compatibility with older variants of xl */
         break;
     case 0x200: /* --live */
         /* ignored for compatibility with xm */
@@ -592,17 +590,16 @@ int main_migrate(int argc, char **argv)
         } else {
             verbose_len = (minmsglevel_default - minmsglevel) + 2;
         }
-        xasprintf(&rune, "exec %s %s xl%s%s%.*s migrate-receive%s%s%s",
+        xasprintf(&rune, "exec %s %s xl%s%s%.*s migrate-receive%s%s",
                   ssh_command, host,
                   pass_tty_arg ? " -t" : "",
                   timestamps ? " -T" : "",
                   verbose_len, verbose_buf,
                   daemonize ? "" : " -e",
-                  debug ? " -d" : "",
                   pause_after_migration ? " -p" : "");
     }
 
-    migrate_domain(domid, preserve_domid, rune, debug, config_filename);
+    migrate_domain(domid, preserve_domid, rune, config_filename);
     return EXIT_SUCCESS;
 }
 



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.