Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package sbd for openSUSE:Factory checked in 
at 2021-03-10 08:57:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sbd (Old)
 and      /work/SRC/openSUSE:Factory/.sbd.new.2378 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sbd"

Wed Mar 10 08:57:35 2021 rev:40 rq:878115 version:1.4.2+20210305.926b554

Changes:
--------
--- /work/SRC/openSUSE:Factory/sbd/sbd.changes  2021-02-01 13:31:09.214360914 
+0100
+++ /work/SRC/openSUSE:Factory/.sbd.new.2378/sbd.changes        2021-03-10 
08:58:47.218983843 +0100
@@ -1,0 +2,21 @@
+Tue Mar 09 11:48:15 UTC 2021 - Yan Gao <[email protected]>
+
+- Update to version 1.4.2+20210305.926b554:
+- sbd-inquisitor: take the defaults for the options set in sysconfig with 
empty strings (bsc#1183259)
+
+-------------------------------------------------------------------
+Tue Mar 09 11:45:02 UTC 2021 - Yan Gao <[email protected]>
+
+- Update to version 1.4.2+20210305.57b84b5:
+- sbd-inquisitor: prevent segfault if no command is supplied (bsc#1183237)
+
+-------------------------------------------------------------------
+Thu Mar 04 07:01:54 UTC 2021 - Yan Gao <[email protected]>
+
+- Update to version 1.4.2+20210304.488a5b9:
+- sbd-inquisitor,sbd-md: make watchdog warning messages more understandable 
(bsc#1182648)
+- sbd-inquisitor: calculate the default timeout for watchdog warning based on 
the watchdog timeout consistently (bsc#1182648)
+- sbd-inquisitor: ensure the timeout for watchdog warning specified with `-5` 
option is respected (bsc#1182648)
+- sbd-common: ensure the default timeout for watchdog warning is about 3/5 of 
the default watchdog timeout (bsc#1182648)
+
+-------------------------------------------------------------------

Old:
----
  sbd-1.4.2+20210129.5e2100f.tar.xz

New:
----
  sbd-1.4.2+20210305.926b554.tar.xz

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

Other differences:
------------------
++++++ sbd.spec ++++++
--- /var/tmp/diff_new_pack.w5PxwF/_old  2021-03-10 08:58:47.690984330 +0100
+++ /var/tmp/diff_new_pack.w5PxwF/_new  2021-03-10 08:58:47.694984334 +0100
@@ -33,7 +33,7 @@
 %global sync_resource_startup_sysconfig no
 
 Name:           sbd
-Version:        1.4.2+20210129.5e2100f
+Version:        1.4.2+20210305.926b554
 Release:        0
 Summary:        Storage-based death
 License:        GPL-2.0-or-later

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.w5PxwF/_old  2021-03-10 08:58:47.730984371 +0100
+++ /var/tmp/diff_new_pack.w5PxwF/_new  2021-03-10 08:58:47.734984375 +0100
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">https://github.com/ClusterLabs/sbd.git</param>
-    <param 
name="changesrevision">542bf70c701083df032eb22cf59f4027ee88e60f</param>
+    <param 
name="changesrevision">8b823d13220cc9942bd72a6a83f3b96db39ecb62</param>
   </service>
 </servicedata>
\ No newline at end of file

++++++ sbd-1.4.2+20210129.5e2100f.tar.xz -> sbd-1.4.2+20210305.926b554.tar.xz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.2+20210129.5e2100f/man/sbd.8.pod.in 
new/sbd-1.4.2+20210305.926b554/man/sbd.8.pod.in
--- old/sbd-1.4.2+20210129.5e2100f/man/sbd.8.pod.in     2021-01-29 
10:32:07.000000000 +0100
+++ new/sbd-1.4.2+20210305.926b554/man/sbd.8.pod.in     2021-03-05 
18:01:54.000000000 +0100
@@ -321,7 +321,7 @@
 an indication that the watchdog timeout is too short for the IO load of the
 system.
 
-Default is 3 seconds, set to zero to disable.
+Default is about 3/5 of watchdog timeout, set to zero to disable.
 
 =item B<-C> I<N>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.2+20210129.5e2100f/src/sbd-common.c 
new/sbd-1.4.2+20210305.926b554/src/sbd-common.c
--- old/sbd-1.4.2+20210129.5e2100f/src/sbd-common.c     2021-01-29 
10:32:07.000000000 +0100
+++ new/sbd-1.4.2+20210305.926b554/src/sbd-common.c     2021-03-05 
18:01:54.000000000 +0100
@@ -37,7 +37,8 @@
 /* Tunable defaults: */
 unsigned long  timeout_watchdog        = SBD_WATCHDOG_TIMEOUT_DEFAULT;
 int            timeout_msgwait         = 2 * SBD_WATCHDOG_TIMEOUT_DEFAULT;
-unsigned long  timeout_watchdog_warn   = 3;
+unsigned long  timeout_watchdog_warn   = 
calculate_timeout_watchdog_warn(SBD_WATCHDOG_TIMEOUT_DEFAULT);
+bool           do_calculate_timeout_watchdog_warn = true;
 int            timeout_allocate        = 2;
 int            timeout_loop            = 1;
 int            timeout_io              = 3;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.2+20210129.5e2100f/src/sbd-inquisitor.c 
new/sbd-1.4.2+20210305.926b554/src/sbd-inquisitor.c
--- old/sbd-1.4.2+20210129.5e2100f/src/sbd-inquisitor.c 2021-01-29 
10:32:07.000000000 +0100
+++ new/sbd-1.4.2+20210305.926b554/src/sbd-inquisitor.c 2021-03-05 
18:01:54.000000000 +0100
@@ -39,6 +39,28 @@
 
 int parse_device_line(const char *line);
 
+static const char *
+get_env_option(const char *option)
+{
+       const char *value = getenv(option);
+       size_t max = 0;
+       size_t lpc = 0;
+
+       if (value == NULL) {
+               return NULL;
+       }
+
+       max = strlen(value);
+
+       for (lpc = 0; lpc < max; lpc++) {
+               if (!isspace(value[lpc])) {
+                       break;
+               }
+       }
+
+       return (strlen(value + lpc) > 0 ? (value + lpc) : NULL);
+}
+
 static int
 recruit_servant(const char *devname, pid_t pid)
 {
@@ -698,7 +720,7 @@
 
                if (timeout_watchdog_warn && (latency > 
(int)timeout_watchdog_warn)) {
                        cl_log(LOG_WARNING,
-                              "Latency: No liveness for %d s exceeds threshold 
of %d s (healthy servants: %d)",
+                              "Latency: No liveness for %ds exceeds watchdog 
warning timeout of %ds (healthy servants: %d)",
                               (int)latency, (int)timeout_watchdog_warn, 
good_servants);
 
                         if (debug_mode && watchdog_use) {
@@ -894,14 +916,14 @@
 
        sbd_get_uname();
 
-        value = getenv("SBD_PACEMAKER");
+        value = get_env_option("SBD_PACEMAKER");
         if(value) {
             check_pcmk = crm_is_true(value);
             check_cluster = crm_is_true(value);
         }
         cl_log(LOG_INFO, "Enable pacemaker checks: %d (%s)", (int)check_pcmk, 
value?value:"default");
 
-        value = getenv("SBD_STARTMODE");
+        value = get_env_option("SBD_STARTMODE");
         if(value == NULL) {
         } else if(strcmp(value, "clean") == 0) {
             start_mode = 1;
@@ -910,7 +932,7 @@
         }
         cl_log(LOG_INFO, "Start mode set to: %d (%s)", (int)start_mode, 
value?value:"default");
 
-        value = getenv("SBD_WATCHDOG_DEV");
+        value = get_env_option("SBD_WATCHDOG_DEV");
         if(value) {
             free(watchdogdev);
             watchdogdev = strdup(value);
@@ -919,26 +941,23 @@
 
         /* SBD_WATCHDOG has been dropped from sbd.sysconfig example.
          * This is for backward compatibility. */
-        value = getenv("SBD_WATCHDOG");
+        value = get_env_option("SBD_WATCHDOG");
         if(value) {
             watchdog_use = crm_is_true(value);
         }
 
-        value = getenv("SBD_WATCHDOG_TIMEOUT");
+        value = get_env_option("SBD_WATCHDOG_TIMEOUT");
         if(value) {
             timeout_watchdog = crm_get_msec(value) / 1000;
-            if(timeout_watchdog > 5) {
-                timeout_watchdog_warn = (int)timeout_watchdog / 5 * 3;
-            }
         }
 
-        value = getenv("SBD_PIDFILE");
+        value = get_env_option("SBD_PIDFILE");
         if(value) {
             pidfile = strdup(value);
             cl_log(LOG_INFO, "pidfile set to %s", pidfile);
         }
 
-        value = getenv("SBD_DELAY_START");
+        value = get_env_option("SBD_DELAY_START");
         if(value) {
             delay_start = crm_is_true(value);
 
@@ -954,12 +973,12 @@
                delay_start? (delay > 0 ? value: "msgwait") : "",
                delay_start? ")" : "");
 
-        value = getenv("SBD_TIMEOUT_ACTION");
+        value = get_env_option("SBD_TIMEOUT_ACTION");
         if(value) {
             timeout_action = strdup(value);
         }
 
-        value = getenv("SBD_MOVE_TO_ROOT_CGROUP");
+        value = get_env_option("SBD_MOVE_TO_ROOT_CGROUP");
         if(value) {
             move_to_root_cgroup = crm_is_true(value);
 
@@ -1058,9 +1077,6 @@
                        break;
                case '1':
                        timeout_watchdog = atoi(optarg);
-                        if(timeout_watchdog > 5) {
-                            timeout_watchdog_warn = (int)timeout_watchdog / 5 
* 3;
-                        }
                        break;
                case '2':
                        timeout_allocate = atoi(optarg);
@@ -1073,6 +1089,7 @@
                        break;
                case '5':
                        timeout_watchdog_warn = atoi(optarg);
+                       do_calculate_timeout_watchdog_warn = false;
                        cl_log(LOG_INFO, "Setting latency warning to %d",
                                        (int)timeout_watchdog_warn);
                        break;
@@ -1108,33 +1125,12 @@
                }
        }
 
-    if (strcmp(argv[optind], "watch") == 0) {
-        value = getenv("SBD_SYNC_RESOURCE_STARTUP");
-        sync_resource_startup =
-            crm_is_true(value?value:SBD_SYNC_RESOURCE_STARTUP_DEFAULT);
-
-#if !USE_PACEMAKERD_API
-        if (sync_resource_startup) {
-            fprintf(stderr, "Failed to sync resource-startup as "
-                "SBD was built against pacemaker not supporting 
pacemakerd-API.\n");
-            exit_status = -1;
-            goto out;
-        }
-#else
-        if (!sync_resource_startup) {
-            cl_log(LOG_WARNING, "SBD built against pacemaker supporting "
-                             "pacemakerd-API. Should think about enabling "
-                             "SBD_SYNC_RESOURCE_STARTUP.");
-        }
-#endif
-    }
-
     if (disk_count == 0) {
         /* if we already have disks from commandline
            then it is probably undesirable to add those
            from environment (general rule cmdline has precedence)
          */
-        value = getenv("SBD_DEVICE");
+        value = get_env_option("SBD_DEVICE");
         if ((value) && strlen(value)) {
 #if SUPPORT_SHARED_DISK
             int devices = parse_device_line(value);
@@ -1230,6 +1226,27 @@
                }
        }
 
+    if (strcmp(argv[optind], "watch") == 0) {
+        value = get_env_option("SBD_SYNC_RESOURCE_STARTUP");
+        sync_resource_startup =
+            crm_is_true(value?value:SBD_SYNC_RESOURCE_STARTUP_DEFAULT);
+
+#if !USE_PACEMAKERD_API
+        if (sync_resource_startup) {
+            fprintf(stderr, "Failed to sync resource-startup as "
+                "SBD was built against pacemaker not supporting 
pacemakerd-API.\n");
+            exit_status = -1;
+            goto out;
+        }
+#else
+        if (!sync_resource_startup) {
+            cl_log(LOG_WARNING, "SBD built against pacemaker supporting "
+                             "pacemakerd-API. Should think about enabling "
+                             "SBD_SYNC_RESOURCE_STARTUP.");
+        }
+#endif
+    }
+
 #if SUPPORT_SHARED_DISK
        if (strcmp(argv[optind], "create") == 0) {
                exit_status = init_devices(servants_leader);
@@ -1268,6 +1285,12 @@
        }
 #endif
 
+        /* Re-calculate timeout_watchdog_warn based on any timeout_watchdog 
from:
+         * SBD_WATCHDOG_TIMEOUT, -1 option or on-disk setting read with 
open_any_device() */
+        if (do_calculate_timeout_watchdog_warn) {
+            timeout_watchdog_warn = 
calculate_timeout_watchdog_warn(timeout_watchdog);
+        }
+
         if (strcmp(argv[optind], "query-watchdog") == 0) {
             exit_status = watchdog_info();
         } else if (strcmp(argv[optind], "test-watchdog") == 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.2+20210129.5e2100f/src/sbd-md.c 
new/sbd-1.4.2+20210305.926b554/src/sbd-md.c
--- old/sbd-1.4.2+20210129.5e2100f/src/sbd-md.c 2021-01-29 10:32:07.000000000 
+0100
+++ new/sbd-1.4.2+20210305.926b554/src/sbd-md.c 2021-03-05 18:01:54.000000000 
+0100
@@ -1231,11 +1231,11 @@
                latency = t1 - t0;
                if (timeout_watchdog_warn && (latency > timeout_watchdog_warn)) 
{
                        cl_log(LOG_WARNING,
-                              "Latency: %d exceeded threshold %d on disk %s",
+                              "Latency: %ds exceeded watchdog warning timeout 
%ds on disk %s",
                               (int)latency, (int)timeout_watchdog_warn,
                               diskname);
                } else if (debug) {
-                       DBGLOG(LOG_DEBUG, "Latency: %d on disk %s", 
(int)latency,
+                       DBGLOG(LOG_DEBUG, "Latency: %ds on disk %s", 
(int)latency,
                               diskname);
                }
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.2+20210129.5e2100f/src/sbd.h 
new/sbd-1.4.2+20210305.926b554/src/sbd.h
--- old/sbd-1.4.2+20210129.5e2100f/src/sbd.h    2021-01-29 10:32:07.000000000 
+0100
+++ new/sbd-1.4.2+20210305.926b554/src/sbd.h    2021-03-05 18:01:54.000000000 
+0100
@@ -143,6 +143,7 @@
 /* Tunable defaults: */
 extern unsigned long    timeout_watchdog;
 extern unsigned long    timeout_watchdog_warn;
+extern bool             do_calculate_timeout_watchdog_warn;
 extern unsigned long    timeout_watchdog_crashdump;
 extern int      timeout_allocate;
 extern int      timeout_loop;
@@ -210,3 +211,8 @@
 bool sbd_is_disk(struct servants_list_item *servant);
 bool sbd_is_pcmk(struct servants_list_item *servant);
 bool sbd_is_cluster(struct servants_list_item *servant);
+
+#define calculate_timeout_watchdog_warn(timeout) \
+       (timeout < 5 ? 2 : \
+       (timeout < (ULONG_MAX / 3) ? \
+       (((unsigned long) timeout) * 3 / 5) : (((unsigned long) timeout) / 5 * 
3)))

Reply via email to