]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
xl: error if vif backend!=0 is used with run_hotplug_scripts
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 14 Sep 2012 09:02:49 +0000 (10:02 +0100)
committerRoger Pau Monne <roger.pau@citrix.com>
Fri, 14 Sep 2012 09:02:49 +0000 (10:02 +0100)
Print an error and exit if backend!=0 is used in conjunction with
run_hotplug_scripts. Currently libxl can only execute hotplug scripts
from the toolstack domain (the same domain xl is running from).

Added a description and workaround of this issue on
xl-network-configuration.

Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
docs/misc/xl-network-configuration.markdown
tools/libxl/xl_cmdimpl.c

index 650926cb03a4fef7deeca931e5e3d7ee6f862144..5e2f049477130c30606ca86c17f13b378584697e 100644 (file)
@@ -122,8 +122,10 @@ specified IP address to be used by the guest (blocking all others).
 ### backend
 
 Specifies the backend domain which this device should attach to. This
-defaults to domain 0. Specifying another domain requires setting up a
-driver domain which is outside the scope of this document.
+defaults to domain 0. This option does not work if `run_hotplug_scripts`
+is not disabled in xl.conf (see xl.conf(5) man page for more information
+on this option). Specifying another domain requires setting up a driver
+domain which is outside the scope of this document.
 
 ### rate
 
index 2d6ab972988ad7407a250b3f31e47b1a8dc22ab1..5b59dd08477d51dde3c626f44c06ee9ed27e4e84 100644 (file)
@@ -1096,6 +1096,13 @@ static void parse_config_data(const char *config_source,
                         fprintf(stderr, "Specified backend domain does not exist, defaulting to Dom0\n");
                         nic->backend_domid = 0;
                     }
+                    if (nic->backend_domid != 0 && run_hotplug_scripts) {
+                        fprintf(stderr, "ERROR: the vif 'backend=' option "
+                                "cannot be used in conjunction with "
+                                "run_hotplug_scripts, please set "
+                                "run_hotplug_scripts to 0 in xl.conf\n");
+                        exit(EXIT_FAILURE);
+                    }
                 } else if (!strcmp(p, "rate")) {
                     parse_vif_rate(&config, (p2 + 1), nic);
                 } else if (!strcmp(p, "accel")) {