xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Shriram Rajagopalan <rshriram@cs.ubc.ca>
To: xen-devel@lists.xen.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH 5 of 5 V3] tools/xl: Remus - Network buffering cmdline switch
Date: Sun, 20 Oct 2013 22:58:07 -0700	[thread overview]
Message-ID: <f4eea1e0ac3ed92ed17b.1382335087@athos.nss.cs.ubc.ca> (raw)
In-Reply-To: <patchbomb.1382335082@athos.nss.cs.ubc.ca>

# HG changeset patch
# User Shriram Rajagopalan <rshriram@cs.ubc.ca>
# Date 1382295556 25200
# Node ID f4eea1e0ac3ed92ed17bbd74b0705743d20b302d
# Parent  a8deb9499e9dcce9869025fa1c02cf2e0d58612a
tools/xl: Remus - Network buffering cmdline switch

Command line switch to 'xl remus' command, to enable network buffering.
Pass on this flag to libxl so that it can act accordingly.
Also update man pages to reflect the addition of a new option to
'xl remus' command.

Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>

diff -r a8deb9499e9d -r f4eea1e0ac3e docs/man/xl.conf.pod.5
--- a/docs/man/xl.conf.pod.5	Sun Oct 20 11:59:06 2013 -0700
+++ b/docs/man/xl.conf.pod.5	Sun Oct 20 11:59:16 2013 -0700
@@ -105,6 +105,12 @@ Configures the default gateway device to
 
 Default: C<None>
 
+=item B<remus.default.netbufscript="PATH">
+
+Configures the default script used by Remus to setup network buffering.
+
+Default: C</etc/xen/scripts/remus-netbuf-setup>
+
 =item B<output_format="json|sxp">
 
 Configures the default output format used by xl when printing "machine
diff -r a8deb9499e9d -r f4eea1e0ac3e docs/man/xl.pod.1
--- a/docs/man/xl.pod.1	Sun Oct 20 11:59:06 2013 -0700
+++ b/docs/man/xl.pod.1	Sun Oct 20 11:59:16 2013 -0700
@@ -398,8 +398,7 @@ Print huge (!) amount of debug during th
 Enable Remus HA for domain. By default B<xl> relies on ssh as a transport
 mechanism between the two hosts.
 
-N.B: Remus support in xl is still in experimental (proof-of-concept) phase.
-     There is no support for network or disk buffering at the moment.
+N.B: There is no support for disk buffering at the moment.
 
 B<OPTIONS>
 
@@ -418,6 +417,13 @@ Generally useful for debugging.
 
 Disable memory checkpoint compression.
 
+=item B<-n>
+
+Enable network output buffering.  The default script used to configure
+network buffering is /etc/xen/scripts/remus-netbuf-setup. If you wish to
+use a custom script, set the global variable "remus.default.netbufscript"
+in /etc/xen/xl.conf to point to your script.
+
 =item B<-s> I<sshcommand>
 
 Use <sshcommand> instead of ssh.  String will be passed to sh.
diff -r a8deb9499e9d -r f4eea1e0ac3e tools/libxl/xl.c
--- a/tools/libxl/xl.c	Sun Oct 20 11:59:06 2013 -0700
+++ b/tools/libxl/xl.c	Sun Oct 20 11:59:16 2013 -0700
@@ -46,6 +46,7 @@ char *default_vifscript = NULL;
 char *default_bridge = NULL;
 char *default_gatewaydev = NULL;
 char *default_vifbackend = NULL;
+char *default_remus_netbufscript = NULL;
 enum output_format default_output_format = OUTPUT_FORMAT_JSON;
 int claim_mode = 1;
 
@@ -177,6 +178,9 @@ static void parse_global_config(const ch
     if (!xlu_cfg_get_long (config, "claim_mode", &l, 0))
         claim_mode = l;
 
+    xlu_cfg_replace_string (config, "remus.default.netbufscript",
+                            &default_remus_netbufscript, 0);
+
     xlu_cfg_destroy(config);
 }
 
diff -r a8deb9499e9d -r f4eea1e0ac3e tools/libxl/xl.h
--- a/tools/libxl/xl.h	Sun Oct 20 11:59:06 2013 -0700
+++ b/tools/libxl/xl.h	Sun Oct 20 11:59:16 2013 -0700
@@ -152,6 +152,7 @@ extern char *default_vifscript;
 extern char *default_bridge;
 extern char *default_gatewaydev;
 extern char *default_vifbackend;
+extern char *default_remus_netbufscript;
 extern char *blkdev_start;
 
 enum output_format {
diff -r a8deb9499e9d -r f4eea1e0ac3e tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Sun Oct 20 11:59:06 2013 -0700
+++ b/tools/libxl/xl_cmdimpl.c	Sun Oct 20 11:59:16 2013 -0700
@@ -7111,8 +7111,9 @@ int main_remus(int argc, char **argv)
     r_info.interval = 200;
     r_info.blackhole = 0;
     r_info.compression = 1;
-
-    SWITCH_FOREACH_OPT(opt, "bui:s:e", NULL, "remus", 2) {
+    r_info.netbuf = 0;
+
+    SWITCH_FOREACH_OPT(opt, "buni:s:N:e", NULL, "remus", 2) {
     case 'i':
         r_info.interval = atoi(optarg);
         break;
@@ -7122,6 +7123,12 @@ int main_remus(int argc, char **argv)
     case 'u':
         r_info.compression = 0;
         break;
+    case 'n':
+        r_info.netbuf = 1;
+        break;
+    case 'N':
+        r_info.netbufscript = optarg;
+        break;
     case 's':
         ssh_command = optarg;
         break;
@@ -7133,6 +7140,11 @@ int main_remus(int argc, char **argv)
     domid = find_domain(argv[optind]);
     host = argv[optind + 1];
 
+    if (r_info.netbuf && !r_info.netbufscript) {
+        if (default_remus_netbufscript)
+            r_info.netbufscript = default_remus_netbufscript;
+    }
+
     if (r_info.blackhole) {
         send_fd = open("/dev/null", O_RDWR, 0644);
         if (send_fd < 0) {
@@ -7170,13 +7182,10 @@ int main_remus(int argc, char **argv)
     /* Point of no return */
     rc = libxl_domain_remus_start(ctx, &r_info, domid, send_fd, recv_fd, 0);
 
-    /* If we are here, it means backup has failed/domain suspend failed.
-     * Try to resume the domain and exit gracefully.
+    /* If we are here, it means remus setup/domain suspend/backup has
+     * failed. Try to resume the domain and exit gracefully.
      * TODO: Split-Brain check.
      */
-    fprintf(stderr, "remus sender: libxl_domain_suspend failed"
-            " (rc=%d)\n", rc);
-
     if (rc == ERROR_GUEST_TIMEDOUT)
         fprintf(stderr, "Failed to suspend domain at primary.\n");
     else {
diff -r a8deb9499e9d -r f4eea1e0ac3e tools/libxl/xl_cmdtable.c
--- a/tools/libxl/xl_cmdtable.c	Sun Oct 20 11:59:06 2013 -0700
+++ b/tools/libxl/xl_cmdtable.c	Sun Oct 20 11:59:16 2013 -0700
@@ -481,6 +481,9 @@ struct cmd_spec cmd_table[] = {
       "-i MS                   Checkpoint domain memory every MS milliseconds (def. 200ms).\n"
       "-b                      Replicate memory checkpoints to /dev/null (blackhole)\n"
       "-u                      Disable memory checkpoint compression.\n"
+      "-n                      Enable network output buffering.\n"
+      "-N <netbufscript>       Use netbufscript to setup network buffering instead of the\n"
+      "                        instead of the default (/etc/xen/scripts/remus-netbuf-setup).\n"
       "-s <sshcommand>         Use <sshcommand> instead of ssh.  String will be passed\n"
       "                        to sh. If empty, run <host> instead of \n"
       "                        ssh <host> xl migrate-receive -r [-e]\n"

  parent reply	other threads:[~2013-10-21  5:58 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21  5:58 [PATCH 0 of 5 V3] Remus/Libxl: Network buffering support Shriram Rajagopalan
2013-10-21  5:58 ` [PATCH 1 of 5 V3] remus: add libnl3 dependency to autoconf scripts Shriram Rajagopalan
2013-10-31 20:13   ` Ian Campbell
2013-10-21  5:58 ` [PATCH 2 of 5 V3] tools/hotplug: Remus network buffering setup scripts Shriram Rajagopalan
2013-10-31 20:21   ` Ian Campbell
2013-10-31 21:06     ` Shriram Rajagopalan
2013-10-31 22:25       ` Ian Campbell
2013-11-14  3:55         ` Shriram Rajagopalan
2013-10-21  5:58 ` [PATCH 3 of 5 V3] tools/libxl: setup/teardown Remus network buffering Shriram Rajagopalan
2013-10-31 20:28   ` Ian Campbell
2013-10-21  5:58 ` [PATCH 4 of 5 V3] tools/libxl: Control network buffering in remus callbacks Shriram Rajagopalan
2013-10-31 20:31   ` Ian Campbell
2013-11-01 18:28   ` Ian Jackson
2013-11-01 19:57     ` Shriram Rajagopalan
2013-11-04 12:12       ` [PATCH 4 of 5 V3] tools/libxl: Control network buffering in remus callbacks [and 1 more messages] Ian Jackson
2013-11-04 15:17         ` Shriram Rajagopalan
2013-11-04 15:32           ` Ian Campbell
2013-11-04 16:06             ` Ian Jackson
2013-11-04 16:40               ` [PATCH 4 of 5 V3] tools/libxl: Control network buffering in remus callbacks [and 1 more messages] " Ian Jackson
2013-11-11 17:56                 ` Shriram Rajagopalan
2013-11-12  9:48                   ` Ian Campbell
2013-11-12 15:38                   ` Ian Jackson
2013-11-12 16:24                     ` Shriram Rajagopalan
2013-11-12 16:38                       ` Ian Jackson
2013-11-12 16:43                         ` Shriram Rajagopalan
2013-11-12 17:00                           ` Ian Jackson
2013-11-04 16:45               ` [PATCH 4 of 5 V3] tools/libxl: Control network buffering in remus callbacks " Ian Campbell
2013-11-04 16:47               ` Shriram Rajagopalan
2013-11-04 17:01                 ` Ian Jackson
2013-11-04 17:23                   ` Shriram Rajagopalan
2013-11-04 17:33                     ` Ian Jackson
2013-11-01 20:04     ` [PATCH 4 of 5 V3] tools/libxl: Control network buffering in remus callbacks Shriram Rajagopalan
2013-10-21  5:58 ` Shriram Rajagopalan [this message]
2013-10-31 20:38   ` [PATCH 5 of 5 V3] tools/xl: Remus - Network buffering cmdline switch Ian Campbell
2013-10-31 21:47     ` Shriram Rajagopalan
2013-10-31 22:29       ` Ian Campbell
2013-10-30 23:05 ` [PATCH 0 of 5 V3] Remus/Libxl: Network buffering support Shriram Rajagopalan

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=f4eea1e0ac3ed92ed17b.1382335087@athos.nss.cs.ubc.ca \
    --to=rshriram@cs.ubc.ca \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --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).