[SCM] Samba Shared Repository - branch master updated

Martin Schwenke martins at samba.org
Wed Sep 17 01:56:04 MDT 2014


The branch, master has been updated
       via  22257dd ctdb-scripts: Do not export variables if they are not set
       via  8509bff ctdb-scripts: Fix a typo
       via  d1ea95e ctdb-build: Check for libpcap
       via  e4b9beb ctdb-build: Check for ETIME in errno.h
       via  a0a21af ctdb-build: Add some missing configure checks
       via  d692be0 ctdb-build: Improve platform check
       via  fb9c49f ctdb-util: Log an error if there is no way to set scheduler
      from  6ce6262 lib: Make nt_err_code_struct private

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


- Log -----------------------------------------------------------------
commit 22257dd4b6d226ee956ede5a847ce0bcb99333be
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Sep 16 12:33:26 2014 +1000

    ctdb-scripts: Do not export variables if they are not set
    
    Variables that are not set but exported, may return an empty string
    for getenv().  Tested on freebsd.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    Autobuild-User(master): Martin Schwenke <martins at samba.org>
    Autobuild-Date(master): Wed Sep 17 09:55:47 CEST 2014 on sn-devel-104

commit 8509bffdebb7884b765904f8112ff83056511a30
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Sep 16 12:00:10 2014 +1000

    ctdb-scripts: Fix a typo
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

commit d1ea95e3c30d4217964c66e135db6e49bac753d5
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Sep 15 16:10:16 2014 +1000

    ctdb-build: Check for libpcap
    
    AIX and FreeBSD do not support raw sockets.  So use libpcap interface
    to watch for specific TCP messages.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

commit e4b9beb2d8872d2f46316ac8499d73fe5e8c521f
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Sep 15 15:52:38 2014 +1000

    ctdb-build: Check for ETIME in errno.h
    
    ETIME is not defined on freebsd.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

commit a0a21af91834d8f75bd32218e30e419e70b0a002
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 15 11:01:21 2014 +1000

    ctdb-build: Add some missing configure checks
    
    Fail configure if thread_setsched() is unavailable on AIX or if
    sched_setscheduler() is unavailable on other platforms.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit d692be0363abac5e684199f0079116a5694b7389
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Sep 15 15:55:27 2014 +1000

    ctdb-build: Improve platform check
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>

commit fb9c49f2ce0838baa5f94f4ca03d1c92cb58b306
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 15 11:48:33 2014 +1000

    ctdb-util: Log an error if there is no way to set scheduler
    
    Although configure should catch this, logging a run-time error is
    better than being mystified when ctdbd silently exits.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

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

Summary of changes:
 ctdb/common/system_util.c |    1 +
 ctdb/config/ctdbd_wrapper |    8 +++++---
 ctdb/wscript              |   31 +++++++++++++++++++++++++++----
 3 files changed, 33 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/common/system_util.c b/ctdb/common/system_util.c
index 8e8f4ac..6ff82f7 100644
--- a/ctdb/common/system_util.c
+++ b/ctdb/common/system_util.c
@@ -77,6 +77,7 @@ bool set_scheduler(void)
 	}
 #endif
 #endif
+	DEBUG(DEBUG_CRIT,("No way to set real-time priority.\n"));
 	return false;
 }
 
diff --git a/ctdb/config/ctdbd_wrapper b/ctdb/config/ctdbd_wrapper
index f0b032d..cbde6ba 100755
--- a/ctdb/config/ctdbd_wrapper
+++ b/ctdb/config/ctdbd_wrapper
@@ -20,7 +20,7 @@ action="$2"
 . "${CTDB_BASE}/functions"
 loadconfig "ctdb"
 
-export CTDB_SOCKET
+[ -n "$CTDB_SOCKET" ] && export CTDB_SOCKET
 
 ctdbd="${CTDBD:-/usr/sbin/ctdbd}"
 
@@ -104,7 +104,7 @@ build_ctdb_options ()
     }
 
     if [ -z "$CTDB_RECOVERY_LOCK" ] ; then
-        echo "No recovery lock specified. Starting CTDB without split brain preventivon"
+        echo "No recovery lock specified. Starting CTDB without split brain prevention."
     fi
     maybe_set "--reclock"                "$CTDB_RECOVERY_LOCK"
 
@@ -136,7 +136,9 @@ build_ctdb_options ()
 
 export_debug_variables ()
 {
-    export CTDB_DEBUG_HUNG_SCRIPT CTDB_EXTERNAL_TRACE CTDB_DEBUG_LOCKS
+    [ -n "$CTDB_DEBUG_HUNG_SCRIPT" ] && export CTDB_DEBUG_HUNG_SCRIPT
+    [ -n "$CTDB_EXTERNAL_TRACE" ] && export CTDB_EXTERNAL_TRACE
+    [ -n "$CTDB_DEBUG_LOCKS" ] && export CTDB_DEBUG_LOCKS
 }
 
 kill_ctdbd ()
diff --git a/ctdb/wscript b/ctdb/wscript
index b615eb0..96782af 100755
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -80,6 +80,29 @@ def configure(conf):
     conf.RECURSE('lib/tdb')
     conf.RECURSE('lib/socket_wrapper')
 
+    conf.CHECK_HEADERS('sched.h')
+    conf.CHECK_HEADERS('procinfo.h')
+    if sys.platform.startswith('aix') and not conf.CHECK_FUNCS('thread_setsched'):
+        Logs.error('Need thread_setsched() on AIX')
+        sys.exit(1)
+    elif not conf.CHECK_FUNCS('sched_setscheduler'):
+        Logs.error('Need sched_setscheduler()')
+        sys.exit(1)
+    conf.CHECK_FUNCS('mlockall')
+
+    if not conf.CHECK_VARIABLE('ETIME', headers='errno.h'):
+        conf.DEFINE('ETIME', 'ETIMEDOUT')
+
+    if sys.platform.startswith('linux'):
+        conf.SET_TARGET_TYPE('pcap', 'EMPTY')
+    else:
+        if not conf.CHECK_HEADERS('pcap.h'):
+            Logs.error('Need libpcap')
+            sys.exit(1)
+        if not conf.CHECK_FUNCS_IN('pcap_open_live', 'pcap', headers='pcap.h'):
+            Logs.error('Need libpcap')
+            sys.exit(1)
+
     have_pmda = False
     if Options.options.ctdb_pmda:
         pmda_support = True
@@ -217,11 +240,11 @@ def build(bld):
                         includes='include include/internal',
                         deps='replace tevent tdb')
 
-    if sys.platform == 'linux2':
+    if sys.platform.startswith('linux'):
         CTDB_SYSTEM_SRC = bld.SUBDIR('common', 'system_linux.c')
-    elif sys.platform == 'aix':
+    elif sys.platform.startswith('aix'):
         CTDB_SYSTEM_SRC = bld.SUBDIR('common', 'system_aix.c')
-    elif sys.platform == 'freebsd':
+    elif sys.platform.startswith('freebsd'):
         CTDB_SYSTEM_SRC = bld.SUBDIR('common', 'system_freebsd.c')
     elif sys.platform == 'kfreebsd':
         CTDB_SYSTEM_SRC = bld.SUBDIR('common', 'system_kfreebsd.c')
@@ -233,7 +256,7 @@ def build(bld):
     bld.SAMBA_SUBSYSTEM('ctdb-system',
                         source=CTDB_SYSTEM_SRC,
                         includes='include include/internal',
-                        deps='replace talloc tevent tdb')
+                        deps='replace talloc tevent tdb pcap')
 
     bld.SAMBA_SUBSYSTEM('ctdb-client',
                         source=bld.SUBDIR('client', 'ctdb_client.c'),


-- 
Samba Shared Repository


More information about the samba-cvs mailing list