From 7eb680a95fcdacfd47d7ddab3a4df5b9ed0c837d Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Thu, 3 Oct 2013 15:19:05 +1000 Subject: build: Move the default CTDB socket from /tmp to /var/run/ctdb Use /var/run/ctdb/ctdbd.socket because there might be other daemons that need sockets in the future. The local daemons test code to create a link for the default convenience socket has to be removed because the link can't be created as a regular user in the new location. This should be OK since all calls to the ctdb tool in the test code should be wrapped in onnode. When debugging tests, a developer will have to set CTDB_SOCKET by hand. Signed-off-by: Amitay Isaacs Pair-programmed-with: Martin Schwenke (This used to be ctdb commit dc67a4e24af9d07aead2a1710eeaf5d6cc409201) --- ctdb/config/ctdb.sysconfig | 4 ++-- ctdb/configure.ac | 4 ++-- ctdb/include/ctdb_protocol.h | 2 +- ctdb/tests/scripts/integration.bash | 4 ---- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ctdb/config/ctdb.sysconfig b/ctdb/config/ctdb.sysconfig index 8233f27a96..35bf5f8323 100644 --- a/ctdb/config/ctdb.sysconfig +++ b/ctdb/config/ctdb.sysconfig @@ -108,8 +108,8 @@ CTDB_RECOVERY_LOCK="/some/place/on/shared/storage" # CTDB_EVENT_SCRIPT_DIR=/etc/ctdb/events.d # the location of the local ctdb socket -# defaults to /tmp/ctdb.socket -# CTDB_SOCKET=/tmp/ctdb.socket +# defaults to /var/run/ctdb/ctdbd.socket +# CTDB_SOCKET=/var/run/ctdb/ctdbd.socket # what transport to use. Only tcp is currently supported # defaults to tcp diff --git a/ctdb/configure.ac b/ctdb/configure.ac index f3d2033aa9..9621f42a65 100644 --- a/ctdb/configure.ac +++ b/ctdb/configure.ac @@ -72,9 +72,9 @@ if test ! -z "$LOGDIR"; then fi AC_SUBST(LOGDIR) -SOCKPATH='/tmp/ctdb.socket' +SOCKPATH='${localstatedir}/run/ctdb/ctdbd.socket' AC_ARG_WITH([socketpath], - [ --with-socketpath=FILE path to CTDB daemon socket [[/tmp/ctdb.socket]]], + [ --with-socketpath=FILE path to CTDB daemon socket [[LOCALSTATEDIR/run/ctdb/ctdbd.socket]]], SOCKPATH=$withval) if test ! -z "$SOCKPATH"; then if test "$SOCKPATH" = "yes" -o "$SOCKPATH" = "no"; then diff --git a/ctdb/include/ctdb_protocol.h b/ctdb/include/ctdb_protocol.h index 9c0d981c84..15c87be687 100644 --- a/ctdb/include/ctdb_protocol.h +++ b/ctdb/include/ctdb_protocol.h @@ -24,7 +24,7 @@ #ifdef SOCKPATH #define CTDB_PATH SOCKPATH #else -#define CTDB_PATH "/tmp/ctdb.socket" +#define CTDB_PATH "/var/run/ctdb/ctdbd.socket" #endif /* default ctdb port number */ diff --git a/ctdb/tests/scripts/integration.bash b/ctdb/tests/scripts/integration.bash index 59f37c919e..040a36048d 100644 --- a/ctdb/tests/scripts/integration.bash +++ b/ctdb/tests/scripts/integration.bash @@ -608,10 +608,6 @@ daemons_start () for i in $(seq 0 $(($TEST_LOCAL_DAEMONS - 1))) ; do daemons_start_1 $i "$@" done - - if [ -L /tmp/ctdb.socket -o ! -S /tmp/ctdb.socket ] ; then - ln -sf "${TEST_VAR_DIR}/sock.0" /tmp/ctdb.socket || return 1 - fi } ####################################### -- cgit