The branch, master has been updated
       via  c2dba1f53b2 ctdb: add tail logs option to local_daemons.sh
      from  a3fc18f679e dsdb: Rewrite comment to remove refernece to LDAP 
backends

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit c2dba1f53b28b4f71ebe62a034e2201b89d9592b
Author: Ralph Boehme <[email protected]>
Date:   Fri Feb 28 13:02:43 2020 +0100

    ctdb: add tail logs option to local_daemons.sh
    
    Signed-off-by: Ralph Boehme <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>
    
    Autobuild-User(master): Martin Schwenke <[email protected]>
    Autobuild-Date(master): Sat Feb 29 08:02:50 UTC 2020 on sn-devel-184

-----------------------------------------------------------------------

Summary of changes:
 ctdb/tests/local_daemons.sh | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)


Changeset truncated at 500 lines:

diff --git a/ctdb/tests/local_daemons.sh b/ctdb/tests/local_daemons.sh
index a67055a9337..6724cdb3b71 100755
--- a/ctdb/tests/local_daemons.sh
+++ b/ctdb/tests/local_daemons.sh
@@ -438,6 +438,22 @@ local_daemons_print_log ()
 
 }
 
+local_daemons_tail_log ()
+{
+       if [ $# -ne 1 ] || [ "$1" = "-h" ] ; then
+               local_daemons_generic_usage "tail-log"
+       fi
+
+       _nodes="$1"
+       shift
+
+       onnode_common
+
+       # shellcheck disable=SC2016
+       # $CTDB_BASE must only be expanded under onnode, not in top-level shell
+       tail -f $(onnode -q "$_nodes" 'echo ${CTDB_BASE}/log.ctdb')
+}
+
 usage ()
 {
        cat <<EOF
@@ -450,6 +466,7 @@ Commands:
   onnode         Run a command in the environment of specified daemon(s)
   print-socket   Print the Unix domain socket used by specified daemon(s)
   print-log      Print logs for specified daemon(s) to stdout
+  tail-log       Follow logs for specified daemon(s) to stdout
 
 All commands use <directory> for daemon configuration
 
@@ -475,5 +492,6 @@ stop) local_daemons_stop "$@" ;;
 onnode) local_daemons_onnode "$@" ;;
 print-socket) local_daemons_print_socket "$@" ;;
 print-log) local_daemons_print_log "$@" ;;
+tail-log) local_daemons_tail_log "$@" ;;
 *) usage ;;
 esac


-- 
Samba Shared Repository

Reply via email to