Hello community,

here is the log from the commit of package sbd for openSUSE:Factory checked in 
at 2018-05-16 18:43:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sbd (Old)
 and      /work/SRC/openSUSE:Factory/.sbd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sbd"

Wed May 16 18:43:47 2018 rev:24 rq:609120 version:1.3.1+20180507.e102d9e

Changes:
--------
--- /work/SRC/openSUSE:Factory/sbd/sbd.changes  2018-03-19 23:38:25.881238333 
+0100
+++ /work/SRC/openSUSE:Factory/.sbd.new/sbd.changes     2018-05-16 
18:44:58.723953949 +0200
@@ -1,0 +2,15 @@
+Tue May  8 10:15:09 UTC 2018 - y...@suse.com
+
+- Update to version 1.3.1+20180507.e102d9e:
+- sbd-md: return error if faied to list any devices (bsc#1086650)
+- sbd-cluster: let scan do the job of proc-parsing
+- sbd-cluster: search for pacemaker-remoted
+
+-------------------------------------------------------------------
+Wed May  2 19:22:18 UTC 2018 - y...@suse.com
+
+- Update to version 1.3.1+20180502.970d913:
+- Log: upgrade important messages and downgrade unimportant ones (bsc#1091839)
+- Log: change sbd's default logging level to LOG_NOTICE (bsc#1091839)
+
+-------------------------------------------------------------------

Old:
----
  sbd-1.3.1+20180316.8873890.tar.xz

New:
----
  sbd-1.3.1+20180507.e102d9e.tar.xz

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

Other differences:
------------------
++++++ sbd.spec ++++++
--- /var/tmp/diff_new_pack.b0Bi49/_old  2018-05-16 18:44:59.403929376 +0200
+++ /var/tmp/diff_new_pack.b0Bi49/_new  2018-05-16 18:44:59.403929376 +0200
@@ -23,7 +23,7 @@
 %endif
 
 Name:           sbd
-Version:        1.3.1+20180316.8873890
+Version:        1.3.1+20180507.e102d9e
 Release:        0
 Summary:        Storage-based death
 License:        GPL-2.0+

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.b0Bi49/_old  2018-05-16 18:44:59.447927785 +0200
+++ /var/tmp/diff_new_pack.b0Bi49/_new  2018-05-16 18:44:59.447927785 +0200
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">https://github.com/ClusterLabs/sbd.git</param>
-    <param 
name="changesrevision">fa6b9ea42c8c4680d0bc44583c6bfd801f5f179b</param>
+    <param 
name="changesrevision">7b822890b38b11601eac867cd55a3d3de314a54c</param>
   </service>
 </servicedata>
\ No newline at end of file

++++++ sbd-1.3.1+20180316.8873890.tar.xz -> sbd-1.3.1+20180507.e102d9e.tar.xz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.3.1+20180316.8873890/src/sbd-cluster.c 
new/sbd-1.3.1+20180507.e102d9e/src/sbd-cluster.c
--- old/sbd-1.3.1+20180316.8873890/src/sbd-cluster.c    2018-03-16 
21:46:08.000000000 +0100
+++ new/sbd-1.3.1+20180507.e102d9e/src/sbd-cluster.c    2018-05-07 
16:30:45.000000000 +0200
@@ -42,6 +42,13 @@
 //undef SUPPORT_PLUGIN
 //define SUPPORT_PLUGIN 1
 
+/* binary for pacemaker-remote has changed with pacemaker 2 */
+#ifdef CRM_SCORE_INFINITY
+#define PACEMAKER_REMOTE_BINARY "pacemaker-remoted"
+#else
+#define PACEMAKER_REMOTE_BINARY "pacemaker_remoted"
+#endif
+
 static bool remote_node = false;
 static pid_t remoted_pid = 0;
 static int reconnect_msec = 1000;
@@ -201,10 +208,11 @@
     }
 
     if (cmap_get_uint8(cmap_handle, "quorum.two_node", &two_node_u8) == CS_OK) 
{
-        cl_log(LOG_NOTICE, "Corosync is%s in 2Node-mode", two_node_u8?"":" 
not");
+        cl_log(two_node_u8? LOG_NOTICE : LOG_INFO,
+               "Corosync is%s in 2Node-mode", two_node_u8?"":" not");
         two_node = two_node_u8;
     } else {
-        cl_log(LOG_NOTICE, "quorum.two_node present in cmap\n");
+        cl_log(LOG_INFO, "quorum.two_node not present in cmap\n");
     }
     return TRUE;
 
@@ -264,7 +272,7 @@
 {
     bool connected = false;
 
-    cl_log(LOG_NOTICE, "Attempting cluster connection");
+    cl_log(LOG_INFO, "Attempting cluster connection");
 
     cluster.destroy = sbd_membership_destroy;
 
@@ -308,7 +316,7 @@
         }
     }
 
-    set_servant_health(pcmk_health_transient, LOG_NOTICE, "Connected, waiting 
for initial membership");
+    set_servant_health(pcmk_health_transient, LOG_INFO, "Connected, waiting 
for initial membership");
     notify_parent();
 
     notify_timer_cb(NULL);
@@ -331,7 +339,7 @@
  * \brief Get process ID and name associated with a /proc directory entry
  *
  * \param[in]  entry    Directory entry (must be result of readdir() on /proc)
- * \param[out] name     If not NULL, a char[64] to hold the process name
+ * \param[out] name     If not NULL, a char[16] to hold the process name
  * \param[out] pid      If not NULL, will be set to process ID of entry
  *
  * \return 0 on success, -1 if entry is not for a process or info not found
@@ -346,7 +354,7 @@
     int fd, local_pid;
     FILE *file;
     struct stat statbuf;
-    char key[16] = { 0 }, procpath[128] = { 0 };
+    char procpath[128] = { 0 };
 
     /* We're only interested in entries whose name is a PID,
      * so skip anything non-numeric or that is too long.
@@ -389,8 +397,7 @@
         if (!file) {
             return -1;
         }
-        if ((fscanf(file, "%15s%63s", key, name) != 2)
-            || safe_str_neq(key, "Name:")) {
+        if (fscanf(file, "Name:\t%15[a-zA-Z0-9 _-]", name) != 1) {
             fclose(file);
             return -1;
         }
@@ -435,7 +442,7 @@
 
     } else {
         int rc = 0;
-        char proc_path[PATH_MAX], exe_path[PATH_MAX], expected_path[PATH_MAX];
+        char proc_path[PATH_MAX], exe_path[PATH_MAX];
 
         /* check to make sure pid hasn't been reused by another process */
         snprintf(proc_path, sizeof(proc_path), "/proc/%lu/exe", (long unsigned 
int)remoted_pid);
@@ -447,10 +454,7 @@
         }
         exe_path[rc] = 0;
 
-        rc = snprintf(expected_path, sizeof(proc_path), 
"%s/pacemaker_remoted", SBINDIR);
-        expected_path[rc] = 0;
-
-        if (strcmp(exe_path, expected_path) == 0) {
+        if (strcmp(exe_path, SBINDIR "/" PACEMAKER_REMOTE_BINARY) == 0) {
             cl_log(LOG_DEBUG, "Process %s (%ld) is active",
                    exe_path, (long)remoted_pid);
             running = 1;
@@ -480,7 +484,7 @@
 find_pacemaker_remote(void)
 {
     DIR *dp;
-    char entry_name[64];
+    char entry_name[16];
     struct dirent *entry;
 
     dp = opendir("/proc");
@@ -499,7 +503,7 @@
 
         /* entry_name is truncated to 16 characters including the nul 
terminator */
         cl_log(LOG_DEBUG, "Found %s at %u", entry_name, pid);
-        if (strcmp(entry_name, "pacemaker_remot") == 0) {
+        if (strncmp(entry_name, PACEMAKER_REMOTE_BINARY, 15) == 0) {
             cl_log(LOG_NOTICE, "Found Pacemaker Remote at PID %u", pid);
             remoted_pid = pid;
             remote_node = true;
@@ -530,7 +534,7 @@
     enum cluster_type_e cluster_stack = get_cluster_type();
 
     crm_system_name = strdup("sbd:cluster");
-    cl_log(LOG_INFO, "Monitoring %s cluster health", 
name_for_cluster_type(cluster_stack));
+    cl_log(LOG_NOTICE, "Monitoring %s cluster health", 
name_for_cluster_type(cluster_stack));
     set_proc_title("sbd: watcher: Cluster");
 
     sbd_membership_connect();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.3.1+20180316.8873890/src/sbd-common.c 
new/sbd-1.3.1+20180507.e102d9e/src/sbd-common.c
--- old/sbd-1.3.1+20180316.8873890/src/sbd-common.c     2018-03-16 
21:46:08.000000000 +0100
+++ new/sbd-1.3.1+20180507.e102d9e/src/sbd-common.c     2018-05-07 
16:30:45.000000000 +0200
@@ -893,7 +893,7 @@
         case pcmk_health_pending:
         case pcmk_health_shutdown:
         case pcmk_health_transient:
-            DBGLOG(LOG_INFO, "Not notifying parent: state transient (%d)", 
servant_health);
+            DBGLOG(LOG_DEBUG, "Not notifying parent: state transient (%d)", 
servant_health);
             break;
 
         case pcmk_health_unknown:
@@ -904,7 +904,7 @@
             break;
 
         case pcmk_health_online:
-            DBGLOG(LOG_INFO, "Notifying parent: healthy");
+            DBGLOG(LOG_DEBUG, "Notifying parent: healthy");
             sigqueue(ppid, SIG_LIVENESS, signal_value);
             break;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.3.1+20180316.8873890/src/sbd-inquisitor.c 
new/sbd-1.3.1+20180507.e102d9e/src/sbd-inquisitor.c
--- old/sbd-1.3.1+20180316.8873890/src/sbd-inquisitor.c 2018-03-16 
21:46:08.000000000 +0100
+++ new/sbd-1.3.1+20180507.e102d9e/src/sbd-inquisitor.c 2018-05-07 
16:30:45.000000000 +0200
@@ -64,7 +64,7 @@
 
        servant_count++;
         if(sbd_is_disk(newbie)) {
-            cl_log(LOG_NOTICE, "Monitoring %s", devname);
+            cl_log(LOG_INFO, "Monitoring %s", devname);
             disk_count++;
         } else {
             newbie->outdated = 1;
@@ -565,7 +565,7 @@
                     if(cluster_alive(true)) {
                         /* We LIVE! */
                         if(cluster_appeared == false) {
-                            cl_log(LOG_NOTICE, "Active cluster detected");
+                            cl_log(LOG_INFO, "Active cluster detected");
                         }
                         tickle = 1;
                         can_detach = 1;
@@ -574,7 +574,7 @@
                     } else if(cluster_alive(false)) {
                         if(!decoupled) {
                             /* On the way up, detach and arm the watchdog */
-                            cl_log(LOG_NOTICE, "Partial cluster detected, 
detaching");
+                            cl_log(LOG_INFO, "Partial cluster detected, 
detaching");
                         }
 
                         can_detach = 1;
@@ -803,6 +803,19 @@
     return found;
 }
 
+#define SBD_SOURCE_FILES 
"sbd-cluster.c,sbd-common.c,sbd-inquisitor.c,sbd-md.c,sbd-pacemaker.c,setproctitle.c"
+
+static void
+sbd_log_filter_ctl(const char *files, uint8_t priority)
+{
+       if (files == NULL) {
+               files = SBD_SOURCE_FILES;
+       }
+
+       qb_log_filter_ctl(QB_LOG_SYSLOG, QB_LOG_FILTER_ADD, QB_LOG_FILTER_FILE, 
files, priority);
+       qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_ADD, QB_LOG_FILTER_FILE, 
files, priority);
+}
+
 int
 arg_enabled(int arg_count)
 {
@@ -834,6 +847,7 @@
 
         qb_log_ctl(QB_LOG_SYSLOG, QB_LOG_CONF_ENABLED, QB_TRUE);
         qb_log_ctl(QB_LOG_STDERR, QB_LOG_CONF_ENABLED, QB_FALSE);
+        sbd_log_filter_ctl(NULL, LOG_NOTICE);
 
        sbd_get_uname();
 
@@ -926,15 +940,17 @@
                case 'v':
                     debug++;
                     if(debug == 1) {
-                        qb_log_filter_ctl(QB_LOG_SYSLOG, QB_LOG_FILTER_ADD, 
QB_LOG_FILTER_FILE, "sbd-common.c,sbd-inquisitor.c,sbd-md.c,sbd-pacemaker.c", 
LOG_DEBUG);
-                        qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_ADD, 
QB_LOG_FILTER_FILE, "sbd-common.c,sbd-inquisitor.c,sbd-md.c,sbd-pacemaker.c", 
LOG_DEBUG);
-                       cl_log(LOG_INFO, "Verbose mode enabled.");
+                        sbd_log_filter_ctl(NULL, LOG_INFO);
+                        cl_log(LOG_INFO, "Verbose mode enabled.");
 
                     } else if(debug == 2) {
+                        sbd_log_filter_ctl(NULL, LOG_DEBUG);
+                        cl_log(LOG_INFO, "Debug mode enabled.");
+
+                    } else if(debug == 3) {
                         /* Go nuts, turn on pacemaker's logging too */
-                        qb_log_filter_ctl(QB_LOG_SYSLOG, QB_LOG_FILTER_ADD, 
QB_LOG_FILTER_FILE, "*", LOG_DEBUG);
-                        qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_ADD, 
QB_LOG_FILTER_FILE, "*", LOG_DEBUG);
-                       cl_log(LOG_INFO, "Verbose library mode enabled.");
+                        sbd_log_filter_ctl("*", LOG_DEBUG);
+                        cl_log(LOG_INFO, "Debug library mode enabled.");
                     }
                     break;
                case 'T':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.3.1+20180316.8873890/src/sbd-md.c 
new/sbd-1.3.1+20180507.e102d9e/src/sbd-md.c
--- old/sbd-1.3.1+20180316.8873890/src/sbd-md.c 2018-03-16 21:46:08.000000000 
+0100
+++ new/sbd-1.3.1+20180507.e102d9e/src/sbd-md.c 2018-05-07 16:30:45.000000000 
+0200
@@ -790,18 +790,22 @@
        struct sbd_context *st;
 
        for (s = servants; s; s = s->next) {
+               int rv  = 0;
+
                st = open_device(s->devname, LOG_WARNING);
                if (!st) {
+                       rc = -1;
                        fprintf(stdout, "== disk %s unreadable!\n", s->devname);
                        continue;
                }
-               rc = slot_list(st);
+               rv = slot_list(st);
                close_device(st);
-               if (rc == -1) {
+               if (rv == -1) {
+                       rc = -1;
                        fprintf(stdout, "== Slots on disk %s NOT dumped\n", 
s->devname);
                }
        }
-       return 0;
+       return rc;
 }
 
 int ping_via_slots(const char *name, struct servants_list_item *servants)
@@ -1097,7 +1101,7 @@
                exit(EXIT_MD_IO_FAIL);
        }
 
-       DBGLOG(LOG_INFO, "Monitoring slot %d on disk %s", mbox, diskname);
+       cl_log(LOG_NOTICE, "Monitoring slot %d on disk %s", mbox, diskname);
        if (s_header->minor_version == 0) {
                set_proc_title("sbd: watcher: %s - slot: %d", diskname, mbox);
        } else {
@@ -1180,7 +1184,7 @@
                }
 
                if (s_mbox->cmd > 0) {
-                       cl_log(LOG_INFO,
+                       cl_log(LOG_NOTICE,
                               "Received command %s from %s on disk %s",
                               char2cmd(s_mbox->cmd), s_mbox->from, diskname);
 
@@ -1222,7 +1226,7 @@
                               (int)latency, (int)timeout_watchdog_warn,
                               diskname);
                } else if (debug) {
-                       DBGLOG(LOG_INFO, "Latency: %d on disk %s", (int)latency,
+                       DBGLOG(LOG_DEBUG, "Latency: %d on disk %s", 
(int)latency,
                               diskname);
                }
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.3.1+20180316.8873890/src/sbd-pacemaker.c 
new/sbd-1.3.1+20180507.e102d9e/src/sbd-pacemaker.c
--- old/sbd-1.3.1+20180316.8873890/src/sbd-pacemaker.c  2018-03-16 
21:46:08.000000000 +0100
+++ new/sbd-1.3.1+20180507.e102d9e/src/sbd-pacemaker.c  2018-05-07 
16:30:45.000000000 +0200
@@ -416,7 +416,7 @@
        int exit_code = 0;
 
         crm_system_name = strdup("sbd:pcmk");
-       cl_log(LOG_INFO, "Monitoring Pacemaker health");
+       cl_log(LOG_NOTICE, "Monitoring Pacemaker health");
        set_proc_title("sbd: watcher: Pacemaker");
         setenv("PCMK_watchdog", "true", 1);
 


Reply via email to