libxl: Allow network driver domains when run_hotplug_scritps is set
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Fri, 5 Jul 2013 11:13:54 +0000 (12:13 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 17 Jul 2013 11:18:25 +0000 (12:18 +0100)
As of commit 05bfd984dfe7014f1f5ea1133608b9bab589c120, hotplug scripts
are not run if backend_domid != LIBXL_TOOSTACK_DOMID; so there is no reason
to restrict this for network driver domains any more.

This is a candidate for backporting to 4.3.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
CC: Ian Campbell <ian.campbell@citrix.com>
CC: Ian Jackson <ian.jackson@citrix.com>
CC: Jan Beulich <jbeulich@suse.com>
docs/misc/xl-network-configuration.markdown
tools/libxl/libxl.c

index e0d3d2ada8f7731baca51e0b4cc3aa177bce228c..3c439d41621e061f3d7eb33a665801699ed61c77 100644 (file)
@@ -131,10 +131,8 @@ 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. 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.
+defaults to domain 0.  Specifying another domain requires setting up a
+driver domain which is outside the scope of this document.
 
 ### rate
 
index bd63a305d7e87b877996ac42a7c8f5d3def8508d..81785dff4ff437f4d1260b36a6b97f27fc067aaf 100644 (file)
@@ -2820,13 +2820,6 @@ int libxl__device_nic_setdefault(libxl__gc *gc, libxl_device_nic *nic,
     rc = libxl__resolve_domid(gc, nic->backend_domname, &nic->backend_domid);
     if (rc < 0) return rc;
 
-    if (nic->backend_domid != LIBXL_TOOLSTACK_DOMID && run_hotplug_scripts) {
-        LOG(ERROR, "cannot use a backend domain different than %d if"
-                   "hotplug scripts are executed from libxl",
-                   LIBXL_TOOLSTACK_DOMID);
-        return ERROR_FAIL;
-    }
-
     switch (libxl__domain_type(gc, domid)) {
     case LIBXL_DOMAIN_TYPE_HVM:
         if (!nic->nictype)