[SCM] Samba Shared Repository - branch master updated

Amitay Isaacs amitay at samba.org
Fri Apr 12 08:20:02 UTC 2019


The branch, master has been updated
       via  289201277cd ctdb-common: Avoid race between fd and signal events
       via  38dc6d11a26 ctdb-daemon: Revert "We can not assume that just because we could complete a TCP handshake"
       via  10291d91f2a Revert "ctdb-scripts: Do not "correct" number of nfsd threads when it is 0"
      from  bfd762b53ab selftest: rename schemaupgrade_dc (+pair) to schema_dc

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


- Log -----------------------------------------------------------------
commit 289201277cd983b27cdfd5376c607eab112b4082
Author: Amitay Isaacs <amitay at samba.org>
Date:   Tue Apr 9 14:44:04 2019 +1000

    ctdb-common: Avoid race between fd and signal events
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13895
    
    In run_proc, there was an implicit assumption that when a process exits,
    fd event (pipe between parent and child) would be processed first and
    signal event (SIGCHLD for the child) would be processed later.
    
    However, that is not the case.  SIGCHLD can be received asynchronously
    any time even when the pipe data has not fully been read.  This causes
    run_proc to miss some of the output from child process in tests.
    
    When SIGCHLD is being processed, if the pipe between parent and child is
    still open, then do an explict read from the pipe to ensure we read any
    data still in the pipe before closing the pipe.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Fri Apr 12 08:19:29 UTC 2019 on sn-devel-144

commit 38dc6d11a26c2e9a2cae7927321f2216ceb1c5ec
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Apr 5 16:17:35 2019 +1100

    ctdb-daemon: Revert "We can not assume that just because we could complete a TCP handshake"
    
    We also can not assume that nodes can be marked as connected via only
    the keepalive mechanism.  Keepalives are not sent to disconnected
    nodes so, in the absence of other packets (e.g. broadcasts), 2 nodes
    may never become marked as connected to each other.
    
    Revert to marking nodes as connected in the TCP transport code.  If a
    connection is to a non(-operational) ctdbd then it will revert to
    disconnected after a short while and may actually flap.  This should
    be rare.
    
    This reverts commit 66919db3d7ab1e091223faf515b183af8bfddc83.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13888
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 10291d91f2a087ff959676f2e2a04b41ae5afd68
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Apr 4 18:21:49 2019 +1100

    Revert "ctdb-scripts: Do not "correct" number of nfsd threads when it is 0"
    
    I thought this was being triggered during automated testing.
    However, it appears that a poor choice of fixed ports for NFS RPC
    services was the real problem.  Revert, since the original behaviour
    may be useful.
    
    This reverts commit f1a1c300e192d43f5c9faf9450ffbf16341a2661.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

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

Summary of changes:
 ctdb/common/run_proc.c               | 7 +++++++
 ctdb/config/nfs-linux-kernel-callout | 6 ++----
 ctdb/tcp/tcp_connect.c               | 3 +++
 3 files changed, 12 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/common/run_proc.c b/ctdb/common/run_proc.c
index 97895b383b9..037b6d9651d 100644
--- a/ctdb/common/run_proc.c
+++ b/ctdb/common/run_proc.c
@@ -295,6 +295,13 @@ again:
 		proc->result.sig = WTERMSIG(status);
 	}
 
+	/* Confirm that all data has been read from the pipe */
+	if (proc->fd != -1) {
+		proc_read_handler(ev, proc->fde, 0, proc);
+		TALLOC_FREE(proc->fde);
+		proc->fd = -1;
+	}
+
 	/* Active run_proc request */
 	if (proc->req != NULL) {
 		run_proc_done(proc->req);
diff --git a/ctdb/config/nfs-linux-kernel-callout b/ctdb/config/nfs-linux-kernel-callout
index 868f3279cf2..def69a04649 100755
--- a/ctdb/config/nfs-linux-kernel-callout
+++ b/ctdb/config/nfs-linux-kernel-callout
@@ -313,10 +313,8 @@ nfs_check_thread_count ()
 
     # Intentionally not arithmetic comparison - avoids extra errors
     # when above read fails in an unexpected way...
-    if [ "$_running_threads" != "0" ] && \
-	       [ "$_running_threads" != "$_configured_threads" ] ; then
-	printf 'Attempting to correct number of nfsd threads from %s to %s\n' \
-	       "$_running_threads" "$_configured_threads"
+    if [ "$_running_threads" != "$_configured_threads" ] ; then
+	echo "Attempting to correct number of nfsd threads from ${_running_threads} to ${_configured_threads}"
 	echo "$_configured_threads" >"$_threads_file"
     fi
 }
diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c
index 13452a5e83b..385547e0e78 100644
--- a/ctdb/tcp/tcp_connect.c
+++ b/ctdb/tcp/tcp_connect.c
@@ -122,6 +122,9 @@ static void ctdb_node_connect_write(struct tevent_context *ev,
 
 	/* the queue subsystem now owns this fd */
 	tnode->fd = -1;
+
+	/* tell the ctdb layer we are connected */
+	node->ctdb->upcalls->node_connected(node);
 }
 
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list