From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xen.org
Cc: Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH v2 2/2] xl: error if vif backend!=0 is used with run_hotplug_scripts
Date: Tue, 4 Sep 2012 17:16:52 +0200 [thread overview]
Message-ID: <1346771812-98690-2-git-send-email-roger.pau@citrix.com> (raw)
In-Reply-To: <1346771812-98690-1-git-send-email-roger.pau@citrix.com>
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>
---
docs/misc/xl-network-configuration.markdown | 6 ++++--
tools/libxl/xl_cmdimpl.c | 7 +++++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/docs/misc/xl-network-configuration.markdown b/docs/misc/xl-network-configuration.markdown
index 650926c..5e2f049 100644
--- a/docs/misc/xl-network-configuration.markdown
+++ b/docs/misc/xl-network-configuration.markdown
@@ -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
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 138cd72..02b9ce8 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1000,6 +1000,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")) {
--
1.7.7.5 (Apple Git-26)
next prev parent reply other threads:[~2012-09-04 15:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-04 15:16 [PATCH v2 1/2] libxl: fix usage of backend parameter and run_hotplug_scripts Roger Pau Monne
2012-09-04 15:16 ` Roger Pau Monne [this message]
2012-09-14 9:06 ` [PATCH v2 2/2] xl: error if vif backend!=0 is used with run_hotplug_scripts Ian Campbell
2012-09-06 7:29 ` [PATCH v2 1/2] libxl: fix usage of backend parameter and run_hotplug_scripts Ian Campbell
2012-09-06 8:30 ` Roger Pau Monne
2012-09-06 8:48 ` Ian Campbell
2012-09-14 9:06 ` Ian Campbell
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=1346771812-98690-2-git-send-email-roger.pau@citrix.com \
--to=roger.pau@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).