tools/hotplug/Linux changes
cover tools/hotplug/Linux changes
As suggested by IanC:
With these changes the existing XENSTORED_TRACE= sysconfig variable is removed, in favor of a new XENSTORED_ARGS= variable. This variable is already used in the code, but it was never put into the sysconfig files.
All this is to remove the illusion that XENSTORED_TRACE= will work with systemd service files.
Note: it seems that XENSTORED_TRACE=yes will not work even today with oxenstored and sysv runlevel script because oxenstored and xenstored do not handle the same set of command line options. Thats not my fault.
I suggest to consider this for staging and staging-4.5.
Olaf
Olaf Hering (2):
tools/hotplug: introduce XENSTORED_ARGS= in sysconfig file. tools/hotplug: remove usage of XENSTORED_TRACE boolean
tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 8 +++++--- tools/hotplug/Linux/init.d/xencommons.in | 1 - 2 files changed, 5 insertions(+), 4 deletions(-)
PATCH 1/2 tools/hotplug: introduce XENSTORED_ARGS= in sysconfig file.
It is already used in the runlevel script and the service file. It is supposed to replace XENSTORED_TRACE= boolean, which cant be easily supported in the xenstored.service file.
--- tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 8 ++++++++ 1 file changed, 8 insertions(+)
tools/hotplug/Linux/init.d/sysconfig.xencommons.in +8 -0
@@ -21,6 +21,14 @@ #XENSTORED=@XENSTORED@ ## Type: string +## Default: "" +# +# Additional commandline arguments to start xenstored, +# like "--trace-file /var/log/xen/xenstored-trace.log" +# See "@sbindir@/xenstored --help" for possible options. +XENSTORED_ARGS= + +## Type: string ## Default: Not defined, tracing off # # Log xenstored messages
PATCH 2/2 tools/hotplug: remove usage of XENSTORED_TRACE boolean
In reply to Olaf HeringThe existing XENSTORED_TRACE= boolean cant be easily implemented in the xenstored.service file. All additional options should be added to the XENSTORED_ARGS= variable.
--- tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 6 ------ tools/hotplug/Linux/init.d/xencommons.in | 1 - 2 files changed, 7 deletions(-)
tools/hotplug/Linux/init.d/sysconfig.xencommons.in +0 -6
@@ -29,12 +29,6 @@ XENSTORED_ARGS= ## Type: string -## Default: Not defined, tracing off -# -# Log xenstored messages -#XENSTORED_TRACE=[yes|on|1] - -## Type: string ## Default: "@XEN_LIB_STORED@" # # Running xenstored on XENSTORED_ROOTDIR
tools/hotplug/Linux/init.d/xencommons.in +0 -1
@@ -66,7 +66,6 @@ do_start () { then test -z "$XENSTORED_ROOTDIR" && XENSTORED_ROOTDIR="@XEN_LIB_STORED@" rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null - test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T /var/log/xen/xenstored-trace.log" if [ -n "$XENSTORED" ] ; then echo -n Starting $XENSTORED...
Re: [PATCH 1/2] tools/hotplug: introduce XENSTORED_ARGS= in sysconfig file.
In reply to Olaf HeringQuoted 18 lines · Olaf Hering
It is already used in the runlevel script and the service file. It is supposed to replace XENSTORED_TRACE= boolean, which cant be easily supported in the xenstored.service file.
Signed-off-by Olaf Hering <[email protected]>Cc Ian Jackson <[email protected]>Cc Stefano Stabellini <[email protected]>Cc Ian Campbell <[email protected]>Cc Wei Liu <[email protected]>--- tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 8 ++++++++ 1 file changed, 8 insertions(+)tools/hotplug/Linux/init.d/sysconfig.xencommons.in +0
-0
tools/hotplug/Linux/init.d/sysconfig.xencommons.in line 28
Quoted 8 lines
tools/hotplug/Linux/init.d/sysconfig.xencommons.in +5
-0@@ -21,6 +21,14 @@ #XENSTORED=@XENSTORED@ ## Type: string +## Default: "" +# +# Additional commandline arguments to start xenstored, +# like "--trace-file /var/log/xen/xenstored-trace.log" +# See "@sbindir@/xenstored --help" for possible options.
I think you want $XENSTORED here (back reference to the above) to cope with the possible use of oxenstored.
Alternatively @XENSTORED@ would cause this to refer to the default xenstored implementation, but I don't think that's quite right.
(TBH, saying "see foo --help for options" almost doesn't need saying)
Quoted 11 lines
tools/hotplug/Linux/init.d/sysconfig.xencommons.in +3
-0+XENSTORED_ARGS= + +## Type: string ## Default: Not defined, tracing off # # Log xenstored messages_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH 1/2] tools/hotplug: introduce XENSTORED_ARGS= in sysconfig file.
In reply to Olaf HeringOlaf Hering writes ("[PATCH 1/2] tools/hotplug: introduce XENSTORED_ARGS= in sysconfig file."):
Quoted 3 lines
It is already used in the runlevel script and the service file. It is supposed to replace XENSTORED_TRACE= boolean, which cant be easily supported in the xenstored.service file.
I don't think it is right to desupport XENSTORED_TRACE= which has been supported in sysconfig.xencommons since at least Xen 4.1.
Certainly removing this feature this late in the 4.5 release cycle is not appropriate.
Sorry,
Ian.
Re: [PATCH 1/2] tools/hotplug: introduce XENSTORED_ARGS= in sysconfig file.
Quoted 2 lines · Ian Jackson
Certainly removing this feature this late in the 4.5 release cycle is not appropriate.
I agree that faffing around with the initscripts/systemd units at the eleventh hour seem liable to leave us with a release where xenstored doesn't start or something.
Ian.
Re: [PATCH 1/2] tools/hotplug: introduce XENSTORED_ARGS= in sysconfig file.
Quoted 7 lines · Ian Campbell
Quoted 2 lines · Ian Jackson
Certainly removing this feature this late in the 4.5 release cycle is not appropriate.
I agree that faffing around with the initscripts/systemd units at the eleventh hour seem liable to leave us with a release where xenstored doesn't start or something.
What about staging, is that how it is supposed to look like in 4.6?
Or should I rather work on the wrapper script so that XENSTORED_TRACE has to be used?
I would like to see patch #1 in 4.5 as the proper way to pass additional options to xenstored.
Olaf
Re: [PATCH 1/2] tools/hotplug: introduce XENSTORED_ARGS= in sysconfig file.
Quoted 10 lines · Olaf Hering
Quoted 7 lines · Ian Campbell
Quoted 2 lines · Ian Jackson
Certainly removing this feature this late in the 4.5 release cycle is not appropriate.
I agree that faffing around with the initscripts/systemd units at the eleventh hour seem liable to leave us with a release where xenstored doesn't start or something.
Quoted 7 lines
What about staging, is that how it is supposed to look like in 4.6?
Or should I rather work on the wrapper script so that
XENSTORED_TRACEhas to be used?I would like to see patch #1 in 4.5 as the proper way to pass additional options to xenstored.
Too late. Yesterday was the commit cutoff :-(
Quoted 2 lines
Olaf