The branch, master has been updated via 466aa8b6f5a ctdb-scripts: Ignore ShellCheck SC3013 for test -nt via fc0da6b0f87 ctdb-tests: Force stub version of service in eventscript tests via 23b2fab2c88 ctdb-common: Drop unused include of mkdir_p.h via e40d452722d ctdb-daemon: Close server socket when switching to client from 62875044ec4 WHATSNEW: Document changes of trusted domains scanning and enterpise principals
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 466aa8b6f5a61d523d708ceb3d5ab1c409bccc1b Author: Martin Schwenke <mar...@meltin.net> Date: Mon Jun 21 20:30:21 2021 +1000 ctdb-scripts: Ignore ShellCheck SC3013 for test -nt In ShellCheck 0.7.2, POSIX compatibility warnings got their own SC3xxx error codes, so now both the old and new codes need to be ignored. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> Autobuild-User(master): Amitay Isaacs <ami...@samba.org> Autobuild-Date(master): Fri Jun 25 10:06:48 UTC 2021 on sn-devel-184 commit fc0da6b0f878d70ff19a568cbb2e47972b45c0b1 Author: Martin Schwenke <mar...@meltin.net> Date: Mon Jun 21 15:26:38 2021 +1000 ctdb-tests: Force stub version of service in eventscript tests Fedora 34 now has a shell function for the which command, which causes these uses of which to return the enclosing function definition rather than the executable file as expected. The event script unit tests always expect the stub service command to be used, so the conditional in these functions is unnecessary. $CTDB_HELPER_BINDIR already conveniently points to the stub directory, so use it here. Signed-off-by: Martin Schwenke <mar...@meltin.net> Signed-off-by: Amitay Isaacs <ami...@gmail.com> commit 23b2fab2c886a5cdc72a87aa0d2e14c9e6b96b1c Author: Martin Schwenke <mar...@meltin.net> Date: Tue Sep 15 13:54:30 2020 +1000 ctdb-common: Drop unused include of mkdir_p.h Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> commit e40d452722d04d21e1c8cee2af2d175540634070 Author: Martin Schwenke <mar...@meltin.net> Date: Tue May 19 17:57:35 2020 +1000 ctdb-daemon: Close server socket when switching to client The socket is set close-on-exec but that doesn't help for processes that do not exec(). This should be done for all child processes. This has been seen in testing where "ctdb shutdown" waits for the socket to close before succeeding. It appears that lingering vacuuming processes have not closed the socket when becoming clients so they cause "ctdb shutdown" to hang even though the main daemon process has exited. The cause of the lingering vacuuming processes has been previously examined but still isn't understood. Signed-off-by: Martin Schwenke <mar...@meltin.net> Reviewed-by: Amitay Isaacs <ami...@gmail.com> ----------------------------------------------------------------------- Summary of changes: ctdb/common/system.c | 2 -- ctdb/config/nfs-linux-kernel-callout | 2 +- ctdb/server/ctdb_daemon.c | 5 +++++ ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local | 16 +++------------- 4 files changed, 9 insertions(+), 16 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/system.c b/ctdb/common/system.c index ab1941124d7..650b62bab16 100644 --- a/ctdb/common/system.c +++ b/ctdb/common/system.c @@ -41,8 +41,6 @@ #include <procinfo.h> #endif -#include "lib/util/mkdir_p.h" - /* if possible, make this task real time */ diff --git a/ctdb/config/nfs-linux-kernel-callout b/ctdb/config/nfs-linux-kernel-callout index 6a372d4b4fd..9c2d0418e55 100755 --- a/ctdb/config/nfs-linux-kernel-callout +++ b/ctdb/config/nfs-linux-kernel-callout @@ -329,7 +329,7 @@ nfs_monitor_list_shares () { _cache_file="${CTDB_NFS_CALLOUT_STATE_DIR}/list_shares_cache" # -nt operator is well supported in Linux: dash, bash, ksh, ... - # shellcheck disable=SC2039 + # shellcheck disable=SC2039,SC3013 if [ ! -r "$nfs_exports_file" ] || [ ! -r "$_cache_file" ] || \ [ "$nfs_exports_file" -nt "$_cache_file" ] ; then mkdir -p "$CTDB_NFS_CALLOUT_STATE_DIR" diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index 9035f5b4748..57f80235e7c 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -2179,6 +2179,11 @@ int switch_from_server_to_client(struct ctdb_context *ctdb) { int ret; + if (ctdb->daemon.sd != -1) { + close(ctdb->daemon.sd); + ctdb->daemon.sd = -1; + } + /* get a new event context */ ctdb->ev = tevent_context_init(ctdb); if (ctdb->ev == NULL) { diff --git a/ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local b/ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local index e9a7f99829a..2f506e907a2 100755 --- a/ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local +++ b/ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local @@ -1,24 +1,14 @@ # Hey Emacs, this is a -*- shell-script -*- !!! :-) -# Use a "service" command in $PATH if one exists. +# Always use stub version of service command service () { - if _t=$(which "service" 2>/dev/null) ; then - "$_t" "$@" - else - _nice="" - _service "$@" - fi + "${CTDB_HELPER_BINDIR}/service" "$@" } nice_service () { - if _t=$(which "service" 2>/dev/null) ; then - nice "$_t" "$@" - else - _nice="nice" - _service "$@" - fi + nice "${CTDB_HELPER_BINDIR}/service" "$@" } # Always succeeds -- Samba Shared Repository