Hello community,

here is the log from the commit of package libdlm for openSUSE:Factory checked 
in at 2016-08-03 11:38:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libdlm (Old)
 and      /work/SRC/openSUSE:Factory/.libdlm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libdlm"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libdlm/libdlm.changes    2015-05-06 
11:17:38.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libdlm.new/libdlm.changes       2016-08-03 
11:38:17.000000000 +0200
@@ -1,0 +2,31 @@
+Mon Jul 25 06:54:31 UTC 2016 - [email protected]
+
+- Update to v4.0.6
+ * In v4.0.4, there's a stupid and severe bug so that upstream
+   released v4.0.5 soon with an urgent fix
+ * Upstream merged our fix for bsc#977201 with release v4.0.6,
+   so I still use the 2 below bugs for this updates:
+ * bsc#967332: libdlm: package update to v4.0.4
+ * bsc#977201: output of `dlm_tool ls` should distinguish causes
+   for "wait fencing" message
+
+- Drop patches
+ * bnc#875122dlm_controld-fix-long-name-in-log-entry.patch
+ * build-dlm_stonith.patch
+
+- Rename patches more readable
+ * remove: Makefile-for-diff-arch.patch, remove-sd-notify.patch,
+   bnc#874705nodes-without-quorum.patch
+ * add: 0001-makefile-for-diff-arch.patch,
+   0002-remove-sd-notify.patch,
+   0003-bnc#874705-nodes-without-quorum.patch
+
+
+-------------------------------------------------------------------
+Mon Feb 15 06:15:03 UTC 2016 - [email protected]
+
+- Update to V4.0.4
+ * Remove build-dlm_stonith.patch
+ * Reove bnc#875122dlm_controld-fix-long-name-in-log-entry.patch
+
+-------------------------------------------------------------------

Old:
----
  Makefile-for-diff-arch.patch
  bnc#874705nodes-without-quorum.patch
  bnc#875122dlm_controld-fix-long-name-in-log-entry.patch
  build-dlm_stonith.patch
  libdlm-4.0.2.tar.gz
  remove-sd-notify.patch

New:
----
  0001-makefile-for-diff-arch.patch
  0002-remove-sd-notify.patch
  0003-bnc#874705-nodes-without-quorum.patch
  libdlm-4.0.6.tar.gz

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

Other differences:
------------------
++++++ libdlm.spec ++++++
--- /var/tmp/diff_new_pack.Jgim8E/_old  2016-08-03 11:38:18.000000000 +0200
+++ /var/tmp/diff_new_pack.Jgim8E/_new  2016-08-03 11:38:18.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libdlm
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -29,15 +29,13 @@
 Summary:        Application interface to the kernel's distributed lock manager
 License:        GPL-2.0 and GPL-2.0+ and LGPL-2.1+
 Group:          Productivity/Clustering/HA
-Version:        4.0.2
+Version:        4.0.6
 Release:        0
 Url:            http://sources.redhat.com/cluster/wiki
-Source:         libdlm-4.0.2.tar.gz
-Patch1:         Makefile-for-diff-arch.patch
-Patch2:         build-dlm_stonith.patch
-Patch3:         remove-sd-notify.patch
-Patch4:         bnc#875122dlm_controld-fix-long-name-in-log-entry.patch
-Patch5:         bnc#874705nodes-without-quorum.patch
+Source:         libdlm-4.0.6.tar.gz
+Patch1:         0001-makefile-for-diff-arch.patch
+Patch2:         0002-remove-sd-notify.patch
+Patch3:         0003-bnc#874705-nodes-without-quorum.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  glib2-devel
 BuildRequires:  libcorosync-devel
@@ -79,8 +77,6 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-%patch4 -p1
-%patch5 -p1
 ###########################################################
 
 %build

++++++ 0001-makefile-for-diff-arch.patch ++++++
Index: a/dlm_controld/Makefile
===================================================================
--- a/dlm_controld/Makefile
+++ b/dlm_controld/Makefile
@@ -1,6 +1,11 @@
 DESTDIR=
 PREFIX=/usr
-LIBNUM=/lib64
+cpu_bit=$(shell getconf LONG_BIT)
+ifeq ($(cpu_bit),64)
+       LIBNUM=/lib64
+else
+       LIBNUM=/lib
+endif
 BINDIR=$(PREFIX)/sbin
 LIBDIR=$(PREFIX)/$(LIBNUM)
 HDRDIR=$(PREFIX)/include 
Index: libdlm-4.0.2/libdlm/Makefile
===================================================================
--- libdlm-4.0.2.orig/libdlm/Makefile
+++ libdlm-4.0.2/libdlm/Makefile
@@ -1,6 +1,11 @@
 DESTDIR=
 PREFIX=/usr
-LIBNUM=/lib64
+cpu_bit=$(shell getconf LONG_BIT)
+ifeq ($(cpu_bit),64)
+       LIBNUM=/lib64
+else
+       LIBNUM=/lib
+endif
 LIBDIR=$(PREFIX)/$(LIBNUM)
 HDRDIR=$(PREFIX)/include 
 MANDIR=$(PREFIX)/share/man
++++++ 0002-remove-sd-notify.patch ++++++
Index: a/dlm_controld/Makefile
===================================================================
--- a/dlm_controld/Makefile
+++ b/dlm_controld/Makefile
@@ -6,7 +6,7 @@ LIBDIR=$(PREFIX)/$(LIBNUM)
 HDRDIR=$(PREFIX)/include 
 MANDIR=$(PREFIX)/share/man
 
-USE_SD_NOTIFY=yes
+USE_SD_NOTIFY=no
 
 BIN_TARGET = dlm_controld
 
++++++ 0003-bnc#874705-nodes-without-quorum.patch ++++++
Index: libdlm-4.0.2/dlm_controld/cpg.c
===================================================================
--- libdlm-4.0.2.orig/dlm_controld/cpg.c
+++ libdlm-4.0.2/dlm_controld/cpg.c
@@ -1261,6 +1261,19 @@ void process_lockspace_changes(void)
        poll_fs = 0;
 
        list_for_each_entry_safe(ls, safe, &lockspaces, list) {
+               if (ls->leaving && !(opt(enable_quorum_lockspace_ind) 
+                                       && !cluster_quorate)) {
+                   log_group(ls, "confchg for our leave");
+                   stop_kernel(ls, 0);
+                   set_configfs_members(ls, ls->name, 0, NULL, 0, NULL);
+                   set_sysfs_event_done(ls->name, 0);
+                   cpg_finalize(ls->cpg_handle);
+                   client_dead(ls->cpg_client);
+                   purge_plocks(ls, our_nodeid, 1);
+                   list_del(&ls->list);
+                   free_ls(ls);
+                   return;
+               }
                if (!list_empty(&ls->changes))
                        apply_changes(ls);
        }
@@ -1414,7 +1427,10 @@ static void confchg_cb(cpg_handle_t hand
                return;
        }
 
-       if (ls->leaving && we_left(left_list, left_list_entries)) {
+       /*check currently if we have quorum in order to keep the 
+         same behavior with other nodes*/
+       if (ls->leaving && we_left(left_list, left_list_entries)
+                       && !(opt(enable_quorum_lockspace_ind) && 
!cluster_quorate)) {
                /* we called cpg_leave(), and this should be the final
                   cpg callback we receive */
                log_group(ls, "confchg for our leave");
++++++ libdlm-4.0.2.tar.gz -> libdlm-4.0.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/Makefile new/libdlm-4.0.6/Makefile
--- old/libdlm-4.0.2/Makefile   2013-07-31 17:50:26.000000000 +0200
+++ new/libdlm-4.0.6/Makefile   2016-06-10 18:36:25.000000000 +0200
@@ -1,15 +1,2 @@
-all:
-       make -C libdlm $@
-       make -C dlm_controld $@
-       make -C dlm_tool $@
-
-install:
-       make -C libdlm $@
-       make -C dlm_controld $@
-       make -C dlm_tool $@
-
-clean:
-       make -C libdlm $@
-       make -C dlm_controld $@
-       make -C dlm_tool $@
-
+all install clean: %:
+       for d in libdlm dlm_controld dlm_tool fence; do $(MAKE) -C $$d $@; done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/dlm_controld/cpg.c 
new/libdlm-4.0.6/dlm_controld/cpg.c
--- old/libdlm-4.0.2/dlm_controld/cpg.c 2013-07-31 17:50:26.000000000 +0200
+++ new/libdlm-4.0.6/dlm_controld/cpg.c 2016-06-10 18:36:25.000000000 +0200
@@ -1664,7 +1664,7 @@
        }
 
        error = cpg_dispatch(ls->cpg_handle, CS_DISPATCH_ALL);
-       if (error != CS_OK) {
+       if (error != CS_OK && error != CS_ERR_BAD_HANDLE) {
                log_error("cpg_dispatch error %d", error);
                return;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/dlm_controld/daemon_cpg.c 
new/libdlm-4.0.6/dlm_controld/daemon_cpg.c
--- old/libdlm-4.0.2/dlm_controld/daemon_cpg.c  2013-07-31 17:50:26.000000000 
+0200
+++ new/libdlm-4.0.6/dlm_controld/daemon_cpg.c  2016-06-10 18:36:25.000000000 
+0200
@@ -118,6 +118,7 @@
 
 static int fence_result_pid;
 static unsigned int fence_result_try;
+static int stateful_merge_wait; /* cluster is stuck in waiting for manual 
intervention */
 
 static void send_fence_result(int nodeid, int result, uint32_t flags, uint64_t 
walltime);
 static void send_fence_clear(int nodeid, int result, uint32_t flags, uint64_t 
walltime);
@@ -847,10 +848,14 @@
 
                if ((clean_count >= merge_count) && !part_count && (low == 
our_nodeid))
                        kick_stateful_merge_members();
+               if ((clean_count < merge_count) && !part_count)
+                       stateful_merge_wait = 1;
 
                retry = 1;
                goto out;
        }
+       if (stateful_merge_wait)
+               stateful_merge_wait = 0;
 
        /*
         * startup fencing
@@ -1871,7 +1876,7 @@
                         */
 
                        error = cpg_dispatch(cpg_handle_daemon, 
CS_DISPATCH_ONE);
-                       if (error != CS_OK)
+                       if (error != CS_OK && error != CS_ERR_BAD_HANDLE)
                                log_error("daemon cpg_dispatch one error %d", 
error);
                }
                if (pollfd.revents & (POLLERR | POLLHUP | POLLNVAL)) {
@@ -2181,7 +2186,7 @@
        cs_error_t error;
 
        error = cpg_dispatch(cpg_handle_daemon, CS_DISPATCH_ALL);
-       if (error != CS_OK)
+       if (error != CS_OK && error != CS_ERR_BAD_HANDLE)
                log_error("daemon cpg_dispatch error %d", error);
 }
 
@@ -2382,7 +2387,8 @@
                 "fence_pid=%d "
                 "fence_in_progress_unknown=%d "
                 "zombie_count=%d "
-                "monotime=%llu ",
+                "monotime=%llu "
+                "stateful_merge_wait=%d ",
                 daemon_member_count,
                 daemon_joined_count,
                 daemon_remove_count,
@@ -2392,7 +2398,8 @@
                 daemon_fence_pid,
                 fence_in_progress_unknown,
                 zombie_count,
-                (unsigned long long)monotime());
+                (unsigned long long)monotime(),
+                stateful_merge_wait);
 
        return strlen(str) + 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/dlm_controld/dlm.conf.5 
new/libdlm-4.0.6/dlm_controld/dlm.conf.5
--- old/libdlm-4.0.2/dlm_controld/dlm.conf.5    2013-07-31 17:50:26.000000000 
+0200
+++ new/libdlm-4.0.6/dlm_controld/dlm.conf.5    2016-06-10 18:36:25.000000000 
+0200
@@ -3,6 +3,9 @@
 .SH NAME
 dlm.conf \- dlm_controld configuration file
 
+.SH SYNOPSIS
+.B /etc/dlm/dlm.conf
+
 .SH DESCRIPTION
 The configuration options in dlm.conf mirror the dlm_controld
 command line options.  The config file additionally allows
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/dlm_controld/lib.c 
new/libdlm-4.0.6/dlm_controld/lib.c
--- old/libdlm-4.0.2/dlm_controld/lib.c 2013-07-31 17:50:26.000000000 +0200
+++ new/libdlm-4.0.6/dlm_controld/lib.c 2016-06-10 18:36:25.000000000 +0200
@@ -337,12 +337,19 @@
        struct dlmc_state *st;
        char maxstr[DLMC_STATE_MAXSTR];
        char maxbin[DLMC_STATE_MAXBIN];
-       char *str, *bin;
-       int all_count, node_count, fence_count;
-       int all_ids[MAX_SORT], node_ids[MAX_SORT], fence_ids[MAX_SORT];
-       char *node_lines[MAX_SORT], *fence_lines[MAX_SORT];
-       char *node_line, *fence_line;
-       int fd, rv, off;
+       char *str;
+       char *bin;
+       int all_count, node_count, fence_count, startup_count;
+       int all_ids[MAX_SORT];
+       int node_ids[MAX_SORT];
+       int fence_ids[MAX_SORT];
+       int startup_ids[MAX_SORT];
+       char *node_lines[MAX_SORT];
+       char *fence_lines[MAX_SORT];
+       char *node_line;
+       char *fence_line;
+       int found_node;
+       int fd, rv;
        int i, j;
 
        init_header(&h, DLMC_CMD_DUMP_STATUS, NULL, 0);
@@ -363,14 +370,15 @@
        st = &state;
        str = maxstr;
        bin = maxbin;
-       off = 0;
 
        all_count = 0;
        node_count = 0;
        fence_count = 0;
+       startup_count = 0;
        memset(&all_ids, 0, sizeof(all_ids));
        memset(&node_ids, 0, sizeof(node_ids));
        memset(&fence_ids, 0, sizeof(fence_ids));
+       memset(&startup_ids, 0, sizeof(startup_ids));
        memset(node_lines, 0, sizeof(node_lines));
        memset(fence_lines, 0, sizeof(fence_lines));
 
@@ -402,9 +410,11 @@
                        print_daemon(st, str, bin, flags);
                        break;
 
-               case DLMC_STATE_DAEMON_NODE:
                case DLMC_STATE_STARTUP_NODE:
+                       startup_ids[startup_count++] = st->nodeid;
+                       break;
 
+               case DLMC_STATE_DAEMON_NODE:
                        if (flags & DLMC_STATUS_VERBOSE) {
                                printf("nodeid %d\n", st->nodeid);
                                print_str(str, st->str_len);
@@ -426,7 +436,7 @@
                                all_ids[all_count++] = st->nodeid;
 
                                node_ids[node_count] = st->nodeid;
-                               node_lines[node_count++] = node_line;
+                               node_lines[node_count] = node_line;
                                node_count++;
 
                                if (!fence_line[0]) {
@@ -450,13 +460,39 @@
        if (all_count)
                qsort(all_ids, all_count, sizeof(int), nodeid_compare);
 
+       /* don't free any node_lines in this startup loop because we are just
+          borrowing them; they are needed in the real node loop below. */
+
+       if (startup_count) {
+               for (i = 0; i < startup_count; i++) {
+                       found_node = 0;
+                       for (j = 0; j < node_count; j++) {
+                               if (startup_ids[i] != node_ids[j])
+                                       continue;
+                               found_node = 1;
+                               if (!node_lines[j])
+                                       printf("startup node %d\n", st->nodeid);
+                               else
+                                       printf("startup %s", node_lines[j]);
+                               break;
+                       }
+                       if (!found_node)
+                               printf("startup node %d\n", st->nodeid);
+               }
+       }
+
        if (all_count && fence_count) {
                for (i = 0; i < all_count; i++) {
                        for (j = 0; j < fence_count; j++) {
                                if (all_ids[i] != fence_ids[j])
                                        continue;
-                               printf("%s", fence_lines[j]);
-                               free(fence_lines[j]);
+                               if (!fence_lines[j]) {
+                                       printf("fence %d no data\n", 
fence_ids[j]);
+                               } else {
+                                       printf("%s", fence_lines[j]);
+                                       free(fence_lines[j]);
+                                       fence_lines[j] = NULL;
+                               }
                                break;
                        }
                }
@@ -467,8 +503,13 @@
                        for (j = 0; j < node_count; j++) {
                                if (all_ids[i] != node_ids[j])
                                        continue;
-                               printf("%s", node_lines[j]);
-                               free(node_lines[j]);
+                               if (!node_lines[j]) {
+                                       printf("node %d no data\n", 
node_ids[j]);
+                               } else {
+                                       printf("%s", node_lines[j]);
+                                       free(node_lines[j]);
+                                       node_lines[j] = NULL;
+                               }
                                break;
                        }
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/dlm_controld/logging.c 
new/libdlm-4.0.6/dlm_controld/logging.c
--- old/libdlm-4.0.2/dlm_controld/logging.c     2013-07-31 17:50:26.000000000 
+0200
+++ new/libdlm-4.0.6/dlm_controld/logging.c     2016-06-10 18:36:25.000000000 
+0200
@@ -122,17 +122,23 @@
 void log_level(char *name_in, uint32_t level_in, const char *fmt, ...)
 {
        va_list ap;
-       char name[NAME_ID_SIZE + 1];
+       char name[NAME_ID_SIZE + 2];
        uint32_t level = level_in & 0x0000FFFF;
        uint32_t extra = level_in & 0xFFFF0000;
        int ret, pos = 0;
        int len = LOG_STR_LEN - 2;
+       int namelen = 0;
        int plock = extra & LOG_PLOCK;
 
        memset(name, 0, sizeof(name));
 
-       if (name_in)
-               snprintf(name, NAME_ID_SIZE, "%s ", name_in);
+       if (name_in) {
+               namelen = snprintf(name, NAME_ID_SIZE + 1, "%s", name_in);
+               if (namelen > NAME_ID_SIZE)
+                       namelen = NAME_ID_SIZE;
+               name[namelen] = ' ';
+               name[namelen+1] = '\0';
+       }
 
        ret = snprintf(log_str + pos, len - pos, "%llu %s",
                       (unsigned long long)monotime(), name);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/dlm_controld/main.c 
new/libdlm-4.0.6/dlm_controld/main.c
--- old/libdlm-4.0.2/dlm_controld/main.c        2013-07-31 17:50:26.000000000 
+0200
+++ new/libdlm-4.0.6/dlm_controld/main.c        2016-06-10 18:36:25.000000000 
+0200
@@ -925,7 +925,7 @@
        cluster_down = 1;
 }
 
-static void loop(void)
+static int loop(void)
 {
        struct lockspace *ls;
        int poll_timeout = -1;
@@ -1028,8 +1028,10 @@
        for (;;) {
                rv = poll(pollfd, client_maxi + 1, poll_timeout);
                if (rv == -1 && errno == EINTR) {
-                       if (daemon_quit && list_empty(&lockspaces))
+                       if (daemon_quit && list_empty(&lockspaces)) {
+                               rv = 0;
                                goto out;
+                       }
                        if (daemon_quit) {
                                log_error("shutdown ignored, active 
lockspaces");
                                daemon_quit = 0;
@@ -1101,6 +1103,7 @@
 
        list_for_each_entry(ls, &lockspaces, list)
                log_error("abandoned lockspace %s", ls->name);
+       return rv;
 }
 
 static int lockfile(const char *dir, const char *name)
@@ -1594,7 +1597,7 @@
 
        fd = lockfile(RUNDIR, RUN_FILE_NAME);
        if (fd < 0)
-               return fd;
+               return 1;
 
        log_level(NULL, LOG_INFO, "dlm_controld %s started", RELEASE_VERSION);
 
@@ -1602,29 +1605,30 @@
        act.sa_handler = sigterm_handler;
        rv = sigaction(SIGTERM, &act, NULL);
        if (rv < 0)
-               return -rv;
+               goto out;
        rv = sigaction(SIGINT, &act, NULL);
        if (rv < 0)
-               return -rv;
+               goto out;
 
        memset(&act, 0, sizeof(act));
        act.sa_handler = SIG_IGN;
        rv = sigaction(SIGHUP, &act, NULL);
        if (rv < 0)
-               return -rv;
+               goto out;
 
        memset(&act, 0, sizeof(act));
        act.sa_handler = sigchld_handler;
        act.sa_flags = SA_NOCLDSTOP;
        rv = sigaction(SIGCHLD, &act, NULL);
        if (rv < 0)
-               return -rv;
+               goto out;
 
        /* set_scheduler(); */
 
-       loop();
+       rv = loop();
 
+ out:
        unlink_lockfile(fd, RUNDIR, RUN_FILE_NAME);
-       return 0;
+       return rv < 0 ? 1 : 0;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/dlm_controld/member.c 
new/libdlm-4.0.6/dlm_controld/member.c
--- old/libdlm-4.0.2/dlm_controld/member.c      2013-07-31 17:50:26.000000000 
+0200
+++ new/libdlm-4.0.6/dlm_controld/member.c      2016-06-10 18:36:25.000000000 
+0200
@@ -132,6 +132,7 @@
 
        quorum_node_count = 0;
        memset(&quorum_nodes, 0, sizeof(quorum_nodes));
+       memset(&addrs, 0, sizeof(addrs));
 
        for (i = 0; i < node_list_entries; i++)
                quorum_nodes[quorum_node_count++] = node_list[i];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/dlm_tool/main.c 
new/libdlm-4.0.6/dlm_tool/main.c
--- old/libdlm-4.0.2/dlm_tool/main.c    2013-07-31 17:50:26.000000000 +0200
+++ new/libdlm-4.0.6/dlm_tool/main.c    2016-06-10 18:36:25.000000000 +0200
@@ -659,10 +659,10 @@
 
        memset(buf, 0, sizeof(buf));
 
-       sprintf(buf, "time %016llu flags %08x %08x bast %d %llu",
+       sprintf(buf, "time %016llu flags %08x %08x bast %d %llu pid %d",
                (unsigned long long)lkb->timestamp,
                lkb->exflags, lkb->flags, lkb->highbast,
-               (unsigned long long)lkb->time_bast);
+               (unsigned long long)lkb->time_bast, lkb->ownpid);
 
        return buf;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/fence/Makefile 
new/libdlm-4.0.6/fence/Makefile
--- old/libdlm-4.0.2/fence/Makefile     2013-07-31 17:50:26.000000000 +0200
+++ new/libdlm-4.0.6/fence/Makefile     2016-06-10 18:36:25.000000000 +0200
@@ -1,10 +1,10 @@
 DESTDIR=
 PREFIX=/usr
 BINDIR=$(PREFIX)/sbin
-#MANDIR=$(PREFIX)/share/man
+MANDIR=$(PREFIX)/share/man
 
 BIN_TARGET = dlm_stonith
-#MAN_TARGET = dlm_stonith.8
+MAN_TARGET = dlm_stonith.8
 
 BIN_SOURCE = stonith_helper.c
 
@@ -53,5 +53,5 @@
        $(INSTALL) -d $(DESTDIR)/$(BINDIR)
        $(INSTALL) -d $(DESTDIR)/$(MANDIR)/man8
        $(INSTALL) -c -m 755 $(BIN_TARGET) $(DESTDIR)/$(BINDIR)
-#      $(INSTALL) -m 644 $(MAN_TARGET) $(DESTDIR)/$(MANDIR)/man8/
+       $(INSTALL) -m 644 $(MAN_TARGET) $(DESTDIR)/$(MANDIR)/man8/
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/fence/dlm_stonith.8 
new/libdlm-4.0.6/fence/dlm_stonith.8
--- old/libdlm-4.0.2/fence/dlm_stonith.8        1970-01-01 01:00:00.000000000 
+0100
+++ new/libdlm-4.0.6/fence/dlm_stonith.8        2016-06-10 18:36:25.000000000 
+0200
@@ -0,0 +1,36 @@
+.TH DLM_STONITH 8 2013-08-01 dlm dlm
+
+.SH NAME
+dlm_stonith \- a proxy for fencing via stonith/pacemaker
+
+.SH SYNOPSIS
+.B dlm_stonith
+
+.SH DESCRIPTION 
+
+dlm_controld can use dlm_stonith as a proxy fence agent when
+the stonith/pacemaker system performs actual fencing.
+
+dlm_stonith is run by dlm_controld, and is not meant to be
+run manually.  dlm_controld provides the options on stdin
+as key=val; command line options are for testing.
+
+If fencing was successful, this program has a zero exit code.
+If fencing failed, this program has a non-zero exit code.
+
+.SH OPTIONS
+
+.BI \-n " nodeid"
+
+The nodeid of the target node.  (stdin key is "node")
+
+.BI \-t " fail_time"
+
+The time(2) at which the target node failed.
+If this option is provided, and the last fencing time is
+later, then a new fencing request is not made.
+
+.SH SEE ALSO
+.BR dlm_controld (8),
+.BR dlm.conf (5)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/fence/stonith_helper.c 
new/libdlm-4.0.6/fence/stonith_helper.c
--- old/libdlm-4.0.2/fence/stonith_helper.c     2013-07-31 17:50:26.000000000 
+0200
+++ new/libdlm-4.0.6/fence/stonith_helper.c     2016-06-10 18:36:25.000000000 
+0200
@@ -56,11 +56,6 @@
                return -1;
        }
 
-       if (!fail_time) {
-               fprintf(stderr, "no fail_time\n");
-               return -1;
-       }
-
        return 0;
 }
 
@@ -73,9 +68,11 @@
        if (rv)
                return rv;
 
-       t = stonith_api_time_helper(nodeid, 0);
-       if (t >= fail_time)
-               return 0;
+       if (fail_time) {
+               t = stonith_api_time_helper(nodeid, 0);
+               if (t >= fail_time)
+                       return 0;
+       }
 
        rv = stonith_api_kick_helper(nodeid, 300, 0);
        if (rv) {
@@ -85,13 +82,6 @@
                return rv;
        }
 
-       while (1) {
-               t = stonith_api_time_helper(nodeid, 0);
-               if (t >= fail_time)
-                       return 0;
-               sleep(1);
-       }
-
-       return -1;
+       return 0;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/include/version.cf 
new/libdlm-4.0.6/include/version.cf
--- old/libdlm-4.0.2/include/version.cf 2013-07-31 17:50:26.000000000 +0200
+++ new/libdlm-4.0.6/include/version.cf 2016-06-10 18:36:25.000000000 +0200
@@ -1,6 +1,6 @@
 #ifndef _RELEASE_VERSION_CF_
 #define _RELEASE_VERSION_CF_
 
-#define RELEASE_VERSION "4.0.2"
+#define RELEASE_VERSION "4.0.6"
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/init/dlm.service 
new/libdlm-4.0.6/init/dlm.service
--- old/libdlm-4.0.2/init/dlm.service   2013-07-31 17:50:26.000000000 +0200
+++ new/libdlm-4.0.6/init/dlm.service   2016-06-10 18:36:25.000000000 +0200
@@ -1,6 +1,7 @@
 [Unit]
 Description=dlm control daemon
-After=syslog.target network.target corosync.service sys-kernel-config.mount
+Requires=corosync.service sys-kernel-config.mount
+After=corosync.service sys-kernel-config.mount
 
 [Service]
 OOMScoreAdjust=-1000
@@ -11,6 +12,10 @@
 ExecStart=/usr/sbin/dlm_controld --foreground $DLM_CONTROLD_OPTS
 #ExecStopPost=/sbin/modprobe -r dlm
 
+# If dlm_controld doesn't stop, there are active lockspaces.
+# Killing it will just get the node fenced.
+SendSIGKILL=no
+
 [Install]
 WantedBy=multi-user.target
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/libdlm/Makefile 
new/libdlm-4.0.6/libdlm/Makefile
--- old/libdlm-4.0.2/libdlm/Makefile    2013-07-31 17:50:26.000000000 +0200
+++ new/libdlm-4.0.6/libdlm/Makefile    2016-06-10 18:36:25.000000000 +0200
@@ -5,7 +5,7 @@
 HDRDIR=$(PREFIX)/include 
 MANDIR=$(PREFIX)/share/man
 PKGDIR=$(LIBDIR)/pkgconfig
-UDEVDIR=/lib/udev/rules.d
+UDEVDIR=/usr/lib/udev/rules.d
 
 LIB_NAME = libdlm
 LIB_MAJOR = 3
@@ -102,10 +102,10 @@
        ln -sf $(LLT_TARGET) $(LLT_SMAJOR)
 
 $(LIB_PC): $(LIB_PCIN)
-       cat $(LIB_PCIN) | sed -e 's#@PREFIX@#$(PREFIX)#g' > $@
+       cat $(LIB_PCIN) | sed -e 
's#@PREFIX@#$(PREFIX)#g;s#@LIBDIR@#$(LIBDIR)#g' > $@
 
 $(LLT_PC): $(LLT_PCIN)
-       cat $(LIB_PCIN) | sed -e 's#@PREFIX@#$(PREFIX)#g' > $@
+       cat $(LIB_PCIN) | sed -e 
's#@PREFIX@#$(PREFIX)#g;s#@LIBDIR@#$(LIBDIR)#g' > $@
 
 clean:
        rm -f *.o *.so *.so.* *.a *.pc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/libdlm/libdlm.pc.in 
new/libdlm-4.0.6/libdlm/libdlm.pc.in
--- old/libdlm-4.0.2/libdlm/libdlm.pc.in        2013-07-31 17:50:26.000000000 
+0200
+++ new/libdlm-4.0.6/libdlm/libdlm.pc.in        2016-06-10 18:36:25.000000000 
+0200
@@ -1,7 +1,7 @@
 prefix=@PREFIX@
 exec_prefix=${prefix}
 includedir=${prefix}/include
-libdir=${exec_prefix}/lib64
+libdir=@LIBDIR@
 
 Name: libdlm
 Description: The dlm library
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdlm-4.0.2/libdlm/libdlm_lt.pc.in 
new/libdlm-4.0.6/libdlm/libdlm_lt.pc.in
--- old/libdlm-4.0.2/libdlm/libdlm_lt.pc.in     2013-07-31 17:50:26.000000000 
+0200
+++ new/libdlm-4.0.6/libdlm/libdlm_lt.pc.in     2016-06-10 18:36:25.000000000 
+0200
@@ -1,7 +1,7 @@
 prefix=@PREFIX@
 exec_prefix=${prefix}
 includedir=${prefix}/include
-libdir=${exec_prefix}/lib64
+libdir=@LIBDIR@
 
 Name: libdlm_lt
 Description: The non-threaded dlm library


Reply via email to