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

Re: [Xen-devel] [PATCH v11 27/27] cmdline switches and config vars to control colo-proxy



On 03/05/2016 02:09 AM, Ian Jackson wrote:
Changlong Xie writes ("[PATCH v11 27/27] cmdline switches and config vars to control 
colo-proxy"):
From: Wen Congyang <wency@xxxxxxxxxxxxxx>

Add cmdline switches to 'xl migrate-receive' command to specify
a domain-specific hotplug script to setup COLO proxy.

Add a new config var 'colo.default.agentscript' to xl.conf, that
allows the user to override the default global script used to
setup COLO proxy.
...

+(b) An example for COLO network configuration: vif =[ '...,forwarddev=xxx,...']
+
+=item B<forwarddev>     :Forward devices for primary and secondary, there are
+directly connected.

What should the user specify as a `forwarddev' ?

a physical NIC(forwarddev=eth0) or a virtual NIC(forwarddev=vlan0) could be fine.


diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index bff08b0..63e1a0d 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -1072,6 +1072,11 @@ static void domcreate_bootloader_done(libxl__egc *egc,
              crs->recv_fd = restore_fd;
              crs->hvm = (info->type == LIBXL_DOMAIN_TYPE_HVM);
              crs->callback = libxl__colo_restore_setup_done;
+            if (dcs->colo_proxy_script)
+                crs->colo_proxy_script = libxl__strdup(gc, 
dcs->colo_proxy_script);
+            else
+                crs->colo_proxy_script = GCSPRINTF("%s/colo-proxy-setup",
+                                                   
libxl__xen_script_dir_path());

Would it be possible to separate out this setting and plubming of
colo_proxy_script into its own patch ?  It is quite formulaic and
makes the substance of the patch harder to read.

Will try that.


@@ -4660,8 +4666,9 @@ int main_migrate_receive(int argc, char **argv)
      int debug = 0, daemonize = 1, monitor = 1;
      libxl_checkpointed_stream checkpointed = LIBXL_CHECKPOINTED_STREAM_NONE;
      int opt;
+    char *script = NULL;

-    SWITCH_FOREACH_OPT(opt, "Fedrc", NULL, "migrate-receive", 0) {
+    SWITCH_FOREACH_OPT(opt, "Fedrcn:", NULL, "migrate-receive", 0) {

I don't think we want to allocate `-n' for this.  I think needing to
specify this will be rare.  Can we use a long option instead ?


Ok

Thanks
        -Xie

Thanks,
Ian.


.




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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