Hello community,

here is the log from the commit of package sbd for openSUSE:Factory checked in 
at 2017-07-17 09:11:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sbd (Old)
 and      /work/SRC/openSUSE:Factory/.sbd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sbd"

Mon Jul 17 09:11:37 2017 rev:17 rq:510262 version:1.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/sbd/sbd.changes  2017-06-12 15:33:42.153606588 
+0200
+++ /work/SRC/openSUSE:Factory/.sbd.new/sbd.changes     2017-07-17 
09:11:38.703822774 +0200
@@ -1,0 +2,12 @@
+Tue Jul  4 18:13:16 UTC 2017 - y...@suse.com
+
+- sbd-inquisitor: Do not use watchdog if the conflicting options "-W" and "-w 
/dev/null" are both supplied (bsc#1047376)
+  * bug-1047376_sbd-not-use-watchdog-conflicting-options.patch
+
+- sbd-inquisitor: Enable pacemaker integration by default as advertised in 
sysconfig.sbd (bsc#1046421, bsc#1033600)
+  * bug-1046421_sbd-enable-pacemaker-integration-by-default.patch
+
+- sbd-inquisitor: Respect the obsolete option SBD_WATCHDOG for backward 
compatibility (bsc#1047372)
+  * bug-1047372_sbd-SBD_WATCHDOG-compatibility.patch
+
+-------------------------------------------------------------------

New:
----
  bug-1046421_sbd-enable-pacemaker-integration-by-default.patch
  bug-1047372_sbd-SBD_WATCHDOG-compatibility.patch
  bug-1047376_sbd-not-use-watchdog-conflicting-options.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sbd.spec ++++++
--- /var/tmp/diff_new_pack.0aT9rR/_old  2017-07-17 09:11:39.195753483 +0200
+++ /var/tmp/diff_new_pack.0aT9rR/_new  2017-07-17 09:11:39.195753483 +0200
@@ -28,6 +28,9 @@
 Url:            https://github.com/ClusterLabs/sbd
 Source:         %{name}-%{commit}.tar.bz2
 Patch1:         sbd-cleanup_servant_by_pid-static.patch
+Patch2:         bug-1047372_sbd-SBD_WATCHDOG-compatibility.patch
+Patch3:         bug-1046421_sbd-enable-pacemaker-integration-by-default.patch
+Patch4:         bug-1047376_sbd-not-use-watchdog-conflicting-options.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  e2fsprogs-devel

++++++ bug-1046421_sbd-enable-pacemaker-integration-by-default.patch ++++++
commit c527ba99c20b02ecbd195f74da321333a2ae534e
Author: Gao,Yan <y...@suse.com>
Date:   Tue Jul 4 16:45:33 2017 +0200

    Fix: sbd-inquisitor: Enable pacemaker integration by default as advertised 
in sysconfig.sbd
    
    "Default: yes" for SBD_PACEMAKER has always been advertised in
    the example sbd.sysconfig. This commit is to ensure that's true again.
    It can be disabled by either explicitly setting SBD_PACEMAKER=no in
    sysconfig or supplying "-P" option twice like "-P -P".

diff --git a/man/sbd.8.pod b/man/sbd.8.pod
index 5df0b4e..3948bb4 100644
--- a/man/sbd.8.pod
+++ b/man/sbd.8.pod
@@ -267,7 +267,10 @@ If set to zero, processes will be restarted indefinitely 
and immediately.
 
 =item B<-P>
 
-Check Pacemaker quorum and node health.
+Check Pacemaker quorum and node health. Specify this once to enable, twice to
+disable.
+
+Defaults to I<enabled>.
 
 =item B<-S> I<N>
 
diff --git a/src/sbd-inquisitor.c b/src/sbd-inquisitor.c
index 2ef7c4b..4c47494 100644
--- a/src/sbd-inquisitor.c
+++ b/src/sbd-inquisitor.c
@@ -23,8 +23,8 @@
 static struct servants_list_item *servants_leader = NULL;
 
 int     disk_priority = 1;
-int    check_pcmk = 0;
-int    check_cluster = 0;
+int    check_pcmk = 1;
+int    check_cluster = 1;
 int    disk_count      = 0;
 int    servant_count   = 0;
 int    servant_restart_interval = 5;
@@ -799,11 +799,19 @@ parse_device_line(const char *line)
     return found;
 }
 
+int
+arg_enabled(int arg_count)
+{
+    return arg_count % 2;
+}
+
 int main(int argc, char **argv, char **envp)
 {
        int exit_status = 0;
        int c;
-       int w = 0;
+       int W_count = 0;
+       int c_count = 0;
+       int P_count = 0;
         int qb_facility;
         const char *value = NULL;
         int start_delay = 0;
@@ -928,7 +936,7 @@ int main(int argc, char **argv, char **envp)
                        cl_log(LOG_INFO, "Setting watchdog timeout disabled; 
using defaults.");
                        break;
                case 'W':
-                       w++;
+                       W_count++;
                        break;
                case 'w':
                         cl_log(LOG_NOTICE, "Using watchdog device '%s'", 
watchdogdev);
@@ -945,10 +953,10 @@ int main(int argc, char **argv, char **envp)
 #endif
                        break;
                case 'c':
-                       check_cluster = 1;
+                       c_count++;
                        break;
                case 'P':
-                       check_pcmk = 1;
+                       P_count++;
                        break;
                case 'z':
                        disk_priority = 0;
@@ -1011,8 +1019,8 @@ int main(int argc, char **argv, char **envp)
                }
        }
 
-       if (w > 0) {
-            watchdog_use = w % 2;
+       if (W_count > 0) {
+            watchdog_use = arg_enabled(W_count);
 
        } else if(watchdogdev == NULL || strcmp(watchdogdev, "/dev/null") == 0) 
{
             watchdog_use = 0;
@@ -1024,6 +1032,14 @@ int main(int argc, char **argv, char **envp)
                cl_log(LOG_INFO, "Watchdog disabled.");
        }
 
+       if (c_count > 0) {
+               check_cluster = arg_enabled(c_count);
+       }
+
+       if (P_count > 0) {
+               check_pcmk = arg_enabled(P_count);
+       }
+
        if ((disk_count > 0) && (strlen(local_uname) > SECTOR_NAME_MAX)) {
                fprintf(stderr, "Node name mustn't be longer than %d chars.\n",
                        SECTOR_NAME_MAX);
++++++ bug-1047372_sbd-SBD_WATCHDOG-compatibility.patch ++++++
commit e216a13f71c86d3ef7721a499972beffe388ba5f
Author: Gao,Yan <y...@suse.com>
Date:   Thu Jun 29 17:52:31 2017 +0200

    Fix: sbd-inquisitor: Respect the obsolete option SBD_WATCHDOG for backward 
compatibility
    
    SBD_WATCHDOG option has been dropped from sbd.sysconfig example.
    Re-enabling the support only in the code for backward compatibility.

diff --git a/src/sbd-inquisitor.c b/src/sbd-inquisitor.c
index 3c3a5a0..2ef7c4b 100644
--- a/src/sbd-inquisitor.c
+++ b/src/sbd-inquisitor.c
@@ -862,6 +862,13 @@ int main(int argc, char **argv, char **envp)
             watchdogdev = strdup(value);
         }
 
+        /* SBD_WATCHDOG has been dropped from sbd.sysconfig example.
+         * This is for backward compatibility. */
+        value = getenv("SBD_WATCHDOG");
+        if(value) {
+            watchdog_use = crm_is_true(value);
+        }
+
         value = getenv("SBD_WATCHDOG_TIMEOUT");
         if(value) {
             timeout_watchdog = crm_get_msec(value) / 1000;
++++++ bug-1047376_sbd-not-use-watchdog-conflicting-options.patch ++++++
commit 68c73ec1678fdb8472edbb0b9a9667311bcf55e8
Author: Gao,Yan <y...@suse.com>
Date:   Tue Jul 4 20:02:48 2017 +0200

    Fix: sbd-inquisitor: Do not use watchdog if the conflicting options "-W" 
and "-w /dev/null" are both supplied

diff --git a/src/sbd-inquisitor.c b/src/sbd-inquisitor.c
index 4c47494..7b73808 100644
--- a/src/sbd-inquisitor.c
+++ b/src/sbd-inquisitor.c
@@ -1019,11 +1019,11 @@ int main(int argc, char **argv, char **envp)
                }
        }
 
-       if (W_count > 0) {
-            watchdog_use = arg_enabled(W_count);
-
-       } else if(watchdogdev == NULL || strcmp(watchdogdev, "/dev/null") == 0) 
{
+       if (watchdogdev == NULL || strcmp(watchdogdev, "/dev/null") == 0) {
             watchdog_use = 0;
+
+       } else if (W_count > 0) {
+            watchdog_use = arg_enabled(W_count);
         }
 
        if (watchdog_use) {

Reply via email to