ctdb-scripts: Update CTDB_SCRIPT_DEBUGLEVEL to be symbolic
authorMartin Schwenke <martin@meltin.net>
Wed, 23 Nov 2016 10:36:36 +0000 (21:36 +1100)
committerMartin Schwenke <martins@samba.org>
Mon, 5 Dec 2016 07:09:22 +0000 (08:09 +0100)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/functions
ctdb/doc/ctdbd.conf.5.xml
ctdb/tests/eventscripts/50.samba.monitor.107.sh

index ac9aa917ae1f6b8fc24d52c73ba50b1adf4bbc5c..727bd8661b8f392fa5a21d823b367ee9fc180547 100755 (executable)
@@ -101,7 +101,7 @@ loadconfig () {
 # configuration file.
 debug ()
 {
-    if [ "${CTDB_SCRIPT_DEBUGLEVEL:-2}" -ge 4 ] ; then
+    if [ "${CTDB_SCRIPT_DEBUGLEVEL:-NOTICE}" = "DEBUG" ] ; then
        # If there are arguments then echo them.  Otherwise expect to
        # use stdin, which allows us to pass lots of debug using a
        # here document.
index 0a653146495059c5d40467fcfc9a60230175f31c..bbc02c63e86cd482e22581c23d20e7c289ce1344 100644 (file)
@@ -1697,15 +1697,15 @@ CTDB_SET_MonitorInterval=20
       </varlistentry>
 
       <varlistentry>
-       <term>CTDB_SCRIPT_DEBUGLEVEL=<parameter>NUM</parameter></term>
+       <term>CTDB_SCRIPT_DEBUGLEVEL=<parameter>DEBUGLEVEL</parameter></term>
        <listitem>
          <para>
-           NUM is the level debugging messages printed by CTDB
-           scripts.  Setting this to a higher number (e.g. 4) will
+           DEBUGLEVEL is the level debugging messages printed by CTDB
+           scripts.  Setting this to a higher level (e.g. DEBUG) will
            cause some scripts to log more messages.
          </para>
          <para>
-           Default is 2.
+           Default is NOTICE.
          </para>
        </listitem>
       </varlistentry>
index 573ff80e4fc0119035a46ada7f8c5a9879bc32a8..19c948a144801cf15a1efc0c21291f4b2453cb0e 100755 (executable)
@@ -4,7 +4,7 @@
 
 define_test "port 139 down, default tcp checker, debug"
 
-export CTDB_SCRIPT_DEBUGLEVEL=4
+export CTDB_SCRIPT_DEBUGLEVEL=DEBUG
 
 setup_samba
 tcp_port_down 139