[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Fri Oct 16 14:37:03 UTC 2015


The branch, master has been updated
       via  2bad085 build: Build *_wrapper without -DNDEBUG for in-tree use
       via  8bb44c5 ntlm auth: spelling fixes
       via  7163e08 samba-tool --help: possessive pronoun "its" has no apostrophe
       via  6456b06 ctdb-scripts: Lock debugging should print kernel stack for process in D state
       via  dfc84fd ctdb-daemon: Change handling of default capabilities
      from  5aab31a ctdb-recovery: Update vnnmap before database recovery

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


- Log -----------------------------------------------------------------
commit 2bad085305f8ddad5e46a567c63a244362699187
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Aug 10 12:40:13 2015 +1200

    build: Build *_wrapper without -DNDEBUG for in-tree use
    
    These binaires are not installed, so are only used in make test,
    and there we need debug output.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Fri Oct 16 16:36:22 CEST 2015 on sn-devel-104

commit 8bb44c53b49b1131c5d3ff3b3eb0f5c635519fb5
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 1 17:24:02 2015 +1300

    ntlm auth: spelling fixes
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 7163e08caa154b2680eba850c9e6766d1929fb91
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Aug 20 10:00:11 2015 +1200

    samba-tool --help: possessive pronoun "its" has no apostrophe
    
    "it's" is reserved for the contraction of "it is".
    
    This *is* somewhat illogical, which is how you know its proper
    English.
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 6456b062948e1e3058c7900ff039016db3421df5
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Oct 14 15:06:56 2015 +1100

    ctdb-scripts: Lock debugging should print kernel stack for process in D state
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit dfc84fdd45a9bd763289b4965bc2d0a3e7071ff0
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Oct 8 20:25:20 2015 +1100

    ctdb-daemon: Change handling of default capabilities
    
    Centrally define all the default capabilities to make the defaults
    crystal clear.  Capability-related command-line options now have a
    direct correspondence rather than a reverse correspondence.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Michael Adam <obnox at samba.org>

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

Summary of changes:
 ctdb/config/debug_locks.sh    | 21 ++++++++++++++++++---
 ctdb/include/ctdb_protocol.h  |  5 ++++-
 ctdb/server/ctdbd.c           |  8 ++++----
 lib/nss_wrapper/wscript       |  1 -
 lib/resolv_wrapper/wscript    |  1 -
 lib/socket_wrapper/wscript    |  1 -
 lib/uid_wrapper/wscript       |  1 -
 python/samba/netcmd/domain.py |  2 +-
 source4/auth/ntlm/auth_unix.c |  6 +++---
 9 files changed, 30 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/config/debug_locks.sh b/ctdb/config/debug_locks.sh
index 3b66b6a..8e33751 100755
--- a/ctdb/config/debug_locks.sh
+++ b/ctdb/config/debug_locks.sh
@@ -2,7 +2,7 @@
 
 # This script parses /proc/locks and finds the processes that are holding
 # locks on CTDB databases.  For all those processes the script dumps a
-# stack trace using gstack.
+# stack trace.
 #
 # This script can be used only if Samba is configured to use fcntl locks
 # rather than mutex locks.
@@ -56,8 +56,23 @@ loadconfig ctdb
 	# For each process waiting, log stack trace
 	for pid in $pids ; do
 	    echo "----- Stack trace for PID=$pid -----"
-	    gstack $pid
-	    # gcore -o /var/log/core-deadlock-ctdb $pid
+	    read x x state x </proc/$pid/stat
+	    if [ "$state" = "D" ] ; then
+		# Don't run gstack on a process in D state since
+		# gstack will hang until the process exits D state.
+		# Although it is possible for a process to transition
+		# to D state after this check, it is unlikely because
+		# if a process is stuck in D state then it is probably
+		# the reason why this script was called.  Note that a
+		# kernel stack almost certainly won't help diagnose a
+		# deadlock... but it will probably give us someone to
+		# blame!
+		echo "----- Process in D state, printing kernel stack only"
+		cat /proc/$pid/stack
+	    else
+		gstack $pid
+		# gcore -o /var/log/core-deadlock-ctdb $pid
+	    fi
 	done
     fi
 
diff --git a/ctdb/include/ctdb_protocol.h b/ctdb/include/ctdb_protocol.h
index 80c6860..bb0056e 100644
--- a/ctdb/include/ctdb_protocol.h
+++ b/ctdb/include/ctdb_protocol.h
@@ -594,8 +594,11 @@ struct ctdb_node_map {
  */
 #define CTDB_CAP_PARALLEL_RECOVERY	0x00010000
 
-#define CTDB_CAP_DEFAULT		(CTDB_CAP_PARALLEL_RECOVERY)
+#define CTDB_CAP_FEATURES		(CTDB_CAP_PARALLEL_RECOVERY)
 
+#define CTDB_CAP_DEFAULT		(CTDB_CAP_RECMASTER | \
+					 CTDB_CAP_LMASTER   | \
+					 CTDB_CAP_FEATURES)
 
 struct ctdb_public_ip {
 	uint32_t pnn;
diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c
index ff9ad6a..ac289c6 100644
--- a/ctdb/server/ctdbd.c
+++ b/ctdb/server/ctdbd.c
@@ -219,11 +219,11 @@ int main(int argc, const char *argv[])
 
 	/* set ctdbd capabilities */
 	ctdb->capabilities = CTDB_CAP_DEFAULT;
-	if (options.no_lmaster == 0) {
-		ctdb->capabilities |= CTDB_CAP_LMASTER;
+	if (options.no_lmaster != 0) {
+		ctdb->capabilities &= ~CTDB_CAP_LMASTER;
 	}
-	if (options.no_recmaster == 0) {
-		ctdb->capabilities |= CTDB_CAP_RECMASTER;
+	if (options.no_recmaster != 0) {
+		ctdb->capabilities &= ~CTDB_CAP_RECMASTER;
 	}
 	if (options.lvs != 0) {
 		ctdb->capabilities |= CTDB_CAP_LVS;
diff --git a/lib/nss_wrapper/wscript b/lib/nss_wrapper/wscript
index b25b83d..0796bdb 100644
--- a/lib/nss_wrapper/wscript
+++ b/lib/nss_wrapper/wscript
@@ -102,7 +102,6 @@ def build(bld):
         # breaks preloading!
         bld.SAMBA_LIBRARY('nss_wrapper',
                           source='nss_wrapper.c',
-                          cflags='-DNDEBUG',
                           deps='dl',
                           install=False,
                           realname='libnss-wrapper.so')
diff --git a/lib/resolv_wrapper/wscript b/lib/resolv_wrapper/wscript
index 4a00d1f..34c00d2 100644
--- a/lib/resolv_wrapper/wscript
+++ b/lib/resolv_wrapper/wscript
@@ -92,7 +92,6 @@ def build(bld):
         # breaks preloading!
         bld.SAMBA_LIBRARY('resolv_wrapper',
                           source='resolv_wrapper.c',
-                          cflags='-DNDEBUG',
                           deps='dl resolv',
                           install=False,
                           realname='libresolv-wrapper.so')
diff --git a/lib/socket_wrapper/wscript b/lib/socket_wrapper/wscript
index 8c9e87e..9d9bf01 100644
--- a/lib/socket_wrapper/wscript
+++ b/lib/socket_wrapper/wscript
@@ -107,7 +107,6 @@ def build(bld):
         # breaks preloading!
         bld.SAMBA_LIBRARY('socket_wrapper',
                           source='socket_wrapper.c',
-                          cflags='-DNDEBUG',
                           deps='dl',
                           install=False,
                           realname='libsocket-wrapper.so')
diff --git a/lib/uid_wrapper/wscript b/lib/uid_wrapper/wscript
index 8e3950f..9cdc069 100644
--- a/lib/uid_wrapper/wscript
+++ b/lib/uid_wrapper/wscript
@@ -125,7 +125,6 @@ def build(bld):
         # breaks preloading!
         bld.SAMBA_LIBRARY('uid_wrapper',
                           source='uid_wrapper.c',
-                          cflags='-DNDEBUG',
                           deps='dl',
                           install=False,
                           realname='libuid-wrapper.so')
diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index f0710f2..250fdf9 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -194,7 +194,7 @@ class cmd_domain_provision(Command):
          Option("--dnspass", type="string", metavar="PASSWORD",
                 help="choose dns password (otherwise random)"),
          Option("--ldapadminpass", type="string", metavar="PASSWORD",
-                help="choose password to set between Samba and it's LDAP backend (otherwise random)"),
+                help="choose password to set between Samba and its LDAP backend (otherwise random)"),
          Option("--root", type="string", metavar="USERNAME",
                 help="choose 'root' unix username"),
          Option("--nobody", type="string", metavar="USERNAME",
diff --git a/source4/auth/ntlm/auth_unix.c b/source4/auth/ntlm/auth_unix.c
index 526b655..2b0512a 100644
--- a/source4/auth/ntlm/auth_unix.c
+++ b/source4/auth/ntlm/auth_unix.c
@@ -263,7 +263,7 @@ static NTSTATUS smb_pam_start(pam_handle_t **pamh, const char *account_name, con
 
 		pam_error = pam_end(*pamh, 0);
 		if (pam_error != PAM_SUCCESS) {
-			/* no vaild pamh here, can we reliably call pam_strerror ? */
+			/* no valid pamh here, can we reliably call pam_strerror ? */
 			DEBUG(4,("smb_pam_start: clean up failed, pam_end gave error %d.\n",
 				 pam_error));
 			return pam_to_nt_status(pam_error);
@@ -283,7 +283,7 @@ static NTSTATUS smb_pam_start(pam_handle_t **pamh, const char *account_name, con
 
 		pam_error = pam_end(*pamh, 0);
 		if (pam_error != PAM_SUCCESS) {
-			/* no vaild pamh here, can we reliably call pam_strerror ? */
+			/* no valid pamh here, can we reliably call pam_strerror ? */
 			DEBUG(4,("smb_pam_start: clean up failed, pam_end gave error %d.\n",
 				 pam_error));
 			return pam_to_nt_status(pam_error);
@@ -303,7 +303,7 @@ static NTSTATUS smb_pam_end(pam_handle_t *pamh)
 	if (pamh != NULL) {
 		pam_error = pam_end(pamh, 0);
 		if (pam_error != PAM_SUCCESS) {
-			/* no vaild pamh here, can we reliably call pam_strerror ? */
+			/* no valid pamh here, can we reliably call pam_strerror ? */
 			DEBUG(4,("smb_pam_end: clean up failed, pam_end gave error %d.\n",
 				 pam_error));
 			return pam_to_nt_status(pam_error);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list