tools: remove unused sysconfig variable XENSTORED_ROOTDIR
authorOlaf Hering <olaf@aepfle.de>
Thu, 6 May 2021 15:16:31 +0000 (17:16 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 12 May 2021 15:25:44 +0000 (16:25 +0100)
The sysconfig variable XENSTORED_ROOTDIR is not used anymore.
It used to point to a directory with tdb files, which is now a tmpfs.

In case the database is not in tmpfs, like on sysv and BSD systems,
xenstored will truncate existing database files during start.

Fixes: 2ef6ace428 ("tools: don't remove tdb data base file before starting xenstored")
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
CHANGELOG.md
tools/hotplug/FreeBSD/rc.d/xencommons.in
tools/hotplug/Linux/init.d/sysconfig.xencommons.in
tools/hotplug/Linux/launch-xenstore.in
tools/hotplug/NetBSD/rc.d/xencommons.in

index 0106fccec1a3b700a8c617f85e689c08695d67b5..6896d7075777e4bbb2d4868652d35f9a4f2f36bd 100644 (file)
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
 
 ## [unstable UNRELEASED](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=staging) - TBD
 
+### Removed
+ - XENSTORED_ROOTDIR environment variable from configuartion files and
+   initscripts, due to being unused.
+
 ## [4.15.0 UNRELEASED](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.15.0) - TBD
 
 ### Added / support upgraded
index 4c61d8c94e9569327deeaa0e5cc314393e2e8349..fddcce314c32f341b05cc587a2dbeb2004d1fb8e 100644 (file)
@@ -42,11 +42,6 @@ xen_startcmd()
 
        xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${XENSTORED})
        if test -z "$xenstored_pid"; then
-               printf "Cleaning xenstore database.\n"
-               if [ -z "${XENSTORED_ROOTDIR}" ]; then
-                       XENSTORED_ROOTDIR="@XEN_LIB_STORED@"
-               fi
-               rm -f ${XENSTORED_ROOTDIR}/tdb* >/dev/null 2>&1
                printf "Starting xenservices: xenstored, xenconsoled."
                XENSTORED_ARGS=" --pid-file ${XENSTORED_PIDFILE}"
                if [ -n "${XENSTORED_TRACE}" ]; then
index b059a2910d0bf4b4e1053978ee08667c2fef9db5..00cf7f91d4a18007df21f962c1c48b04bde1a261 100644 (file)
@@ -48,13 +48,6 @@ XENSTORED_ARGS=
 # Only evaluated if XENSTORETYPE is "daemon".
 #XENSTORED_TRACE=[yes|on|1]
 
-## Type: string
-## Default: "@XEN_LIB_STORED@"
-#
-# Running xenstored on XENSTORED_ROOTDIR
-# Only evaluated if XENSTORETYPE is "daemon".
-#XENSTORED_ROOTDIR=@XEN_LIB_STORED@
-
 ## Type: string
 ## Default: @LIBEXEC@/boot/xenstore-stubdom.gz
 #
index 991dec8d259d5ca8365a56011dbdc75711b2f90e..019f9d6f4d68ce80c1439083e82843c0734be78b 100644 (file)
@@ -53,7 +53,6 @@ test -f @CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons && . @CONFIG_DIR@/@CONFIG_LEAF
 /bin/mkdir -p @XEN_RUN_DIR@
 
 [ "$XENSTORETYPE" = "daemon" ] && {
-       [ -z "$XENSTORED_ROOTDIR" ] && XENSTORED_ROOTDIR="@XEN_LIB_STORED@"
        [ -z "$XENSTORED_TRACE" ] || XENSTORED_ARGS="$XENSTORED_ARGS -T @XEN_LOG_DIR@/xenstored-trace.log"
        [ -z "$XENSTORED" ] && XENSTORED=@XENSTORED@
        [ -x "$XENSTORED" ] || {
index 80e518f5de4795dd273158e4d95193d5f70b65d3..cf2af0659673b85fca0cae68647a14950099e604 100644 (file)
@@ -38,11 +38,6 @@ xen_startcmd()
 
        xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${sbindir}/xenstored)
        if test -z "$xenstored_pid"; then
-               printf "Cleaning xenstore database.\n"
-               if [ -z "${XENSTORED_ROOTDIR}" ]; then
-                       XENSTORED_ROOTDIR="@XEN_LIB_STORED@"
-               fi
-               rm -f ${XENSTORED_ROOTDIR}/tdb* >/dev/null 2>&1
                printf "Starting xenservices: xenstored, xenconsoled."
                XENSTORED_ARGS=" --pid-file ${XENSTORED_PIDFILE}"
                if [ -n "${XENSTORED_TRACE}" ]; then