From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xen.org
Subject: [PATCH v2] libxl: pass debug flag down to libxl_domain_suspend
Date: Thu, 31 Jan 2013 19:49:38 +0100 [thread overview]
Message-ID: <7265026699c6a72e150d.1359658178@probook.site> (raw)
In-Reply-To: <256d59b2bc8a41387655.1359648303@probook.site>
# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1359658156 -3600
# Node ID 7265026699c6a72e150d40d2fb45fd4131c83c19
# Parent 12455da211d4e841692b2374086356a87eb74ff7
libxl: pass debug flag down to libxl_domain_suspend
libxl_domain_suspend is already prepared to handle LIBXL_SUSPEND_DEBUG,
and xl migrate handles the -d switch as well. Pass this flag down to
libxl_domain_suspend, so that finally xc_domain_save can dump huge
amount of debug data to stdout.
Update xl.1 and help text output.
v2:
- fix xl.1 option, really use -d instead of -e
Signed-off-by: Olaf Hering <olaf@aepfle.de>
diff -r 12455da211d4 -r 7265026699c6 docs/man/xl.pod.1
--- a/docs/man/xl.pod.1
+++ b/docs/man/xl.pod.1
@@ -387,6 +387,10 @@ domain. See the corresponding option of
Send <config> instead of config file from creation.
+=item B<-d>
+
+Print huge (!) amount of debug during the migration process.
+
=back
=item B<remus> [I<OPTIONS>] I<domain-id> I<host>
diff -r 12455da211d4 -r 7265026699c6 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -3331,7 +3331,7 @@ static void migrate_do_preamble(int send
}
-static void migrate_domain(uint32_t domid, const char *rune,
+static void migrate_domain(uint32_t domid, const char *rune, int debug,
const char *override_config_file)
{
pid_t child = -1;
@@ -3340,7 +3340,7 @@ static void migrate_domain(uint32_t domi
char *away_domname;
char rc_buf;
uint8_t *config_data;
- int config_len;
+ int config_len, flags = LIBXL_SUSPEND_LIVE;
save_domain_core_begin(domid, override_config_file,
&config_data, &config_len);
@@ -3358,7 +3358,9 @@ static void migrate_domain(uint32_t domi
xtl_stdiostream_adjust_flags(logger, XTL_STDIOSTREAM_HIDE_PROGRESS, 0);
- rc = libxl_domain_suspend(ctx, domid, send_fd, LIBXL_SUSPEND_LIVE, NULL);
+ 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"
" (rc=%d)\n", rc);
@@ -3784,7 +3786,7 @@ int main_migrate(int argc, char **argv)
return 1;
}
- migrate_domain(domid, rune, config_filename);
+ migrate_domain(domid, rune, debug, config_filename);
return 0;
}
diff -r 12455da211d4 -r 7265026699c6 tools/libxl/xl_cmdtable.c
--- a/tools/libxl/xl_cmdtable.c
+++ b/tools/libxl/xl_cmdtable.c
@@ -153,7 +153,8 @@ struct cmd_spec cmd_table[] = {
" to sh. If empty, run <host> instead of ssh <host> xl\n"
" migrate-receive [-d -e]\n"
"-e Do not wait in the background (on <host>) for the death\n"
- " of the domain."
+ " of the domain.\n"
+ "-d Print huge (!) amount of debug during the migration process."
},
{ "dump-core",
&main_dump_core, 0, 1,
next prev parent reply other threads:[~2013-01-31 18:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-31 16:05 [PATCH] libxl: pass debug flag down to libxl_domain_suspend Olaf Hering
2013-01-31 18:49 ` Olaf Hering [this message]
2013-02-05 11:07 ` [PATCH v2] " Ian Campbell
2013-02-05 11:07 ` [PATCH] " Ian Campbell
2013-02-05 14:16 ` Olaf Hering
2013-02-05 14:27 ` Ian Campbell
2013-02-05 14:20 ` [PATCH v3] " Olaf Hering
2013-02-05 15:09 ` [PATCH v4] " Olaf Hering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7265026699c6a72e150d.1359658178@probook.site \
--to=olaf@aepfle.de \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).