Hello community,

here is the log from the commit of package sbd for openSUSE:Factory checked in 
at 2019-10-30 14:44:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sbd (Old)
 and      /work/SRC/openSUSE:Factory/.sbd.new.2990 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sbd"

Wed Oct 30 14:44:27 2019 rev:31 rq:743778 version:1.4.0+20190919.2758632

Changes:
--------
--- /work/SRC/openSUSE:Factory/sbd/sbd.changes  2019-08-05 10:41:44.775296318 
+0200
+++ /work/SRC/openSUSE:Factory/.sbd.new.2990/sbd.changes        2019-10-30 
14:44:28.845969360 +0100
@@ -1,0 +2,11 @@
+Mon Oct 28 11:01:45 UTC 2019 - Yan Gao <[email protected]>
+
+- Update to version 1.4.0+20190919.2758632:
+- sbd.8.pod and -h help text add -vvv description
+- sbd-md: add a warning log if failed to open/read device on startup 
(bsc#1150429)
+- agent: log detailed errors for monitor failures (bsc#1148236)
+- sbd-md: list/dump failures go to stderr (bsc#1148236)
+- avoid deprecated names for g_main-loop-functions
+- sbd-pacemaker: check for shutdown attribute on every cib-diff
+
+-------------------------------------------------------------------

Old:
----
  sbd-1.4.0+20190612.398628b.tar.xz

New:
----
  sbd-1.4.0+20190919.2758632.tar.xz

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

Other differences:
------------------
++++++ sbd.spec ++++++
--- /var/tmp/diff_new_pack.K572NM/_old  2019-10-30 14:44:29.581970143 +0100
+++ /var/tmp/diff_new_pack.K572NM/_new  2019-10-30 14:44:29.581970143 +0100
@@ -23,7 +23,7 @@
 %endif
 
 Name:           sbd
-Version:        1.4.0+20190612.398628b
+Version:        1.4.0+20190919.2758632
 Release:        0
 Summary:        Storage-based death
 License:        GPL-2.0-or-later

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.K572NM/_old  2019-10-30 14:44:29.621970185 +0100
+++ /var/tmp/diff_new_pack.K572NM/_new  2019-10-30 14:44:29.625970189 +0100
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">https://github.com/ClusterLabs/sbd.git</param>
-    <param 
name="changesrevision">398628bbcc896be4da21d273392f2fe6391319e2</param>
+    <param 
name="changesrevision">275863252c88b89ed6181c6bf44640b95458448b</param>
   </service>
 </servicedata>
\ No newline at end of file

++++++ sbd-1.4.0+20190612.398628b.tar.xz -> sbd-1.4.0+20190919.2758632.tar.xz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/.travis.yml 
new/sbd-1.4.0+20190919.2758632/.travis.yml
--- old/sbd-1.4.0+20190612.398628b/.travis.yml  2019-06-12 18:36:24.000000000 
+0200
+++ new/sbd-1.4.0+20190919.2758632/.travis.yml  2019-09-19 17:40:55.000000000 
+0200
@@ -21,11 +21,13 @@
         - os:  linux
           env: OS_ARCH=x86_64 OS_TYPE=centos OS_MOCK=epel OS_DIST=centos 
OS_VERSION=6
         - os:  linux
-          env: OS_ARCH=x86_64 OS_TYPE=fedora OS_MOCK=fedora OS_DIST= 
OS_VERSION=28
-        - os:  linux
           env: OS_ARCH=x86_64 OS_TYPE=fedora OS_MOCK=fedora OS_DIST= 
OS_VERSION=29
+        - os:  linux
+          env: OS_ARCH=x86_64 OS_TYPE=fedora OS_MOCK=fedora OS_DIST= 
OS_VERSION=30
+        - os:  linux
+          env: OS_ARCH=x86_64 OS_TYPE=fedora OS_MOCK=fedora OS_DIST= 
OS_VERSION=rawhide
         - os:  linux-ppc64le
-          env: OS_ARCH=ppc64le OS_TYPE=fedora OS_MOCK=fedora OS_DIST= 
OS_VERSION=29
+          env: OS_ARCH=ppc64le OS_TYPE=fedora OS_MOCK=fedora OS_DIST= 
OS_VERSION=30
 
 services:
   - docker
@@ -33,10 +35,15 @@
 install: true
 
 script:
-  - make -f Makefile.am spec export PACKAGE=${PACKAGE}
+  - make -f Makefile.am srpm PACKAGE=${PACKAGE}
   - docker pull ${BUILD_OS_TYPE}:${BUILD_OS_DIST}${BUILD_OS_VERSION}
-  - docker run --privileged -v ${PWD}:/rpms 
${BUILD_OS_TYPE}:${BUILD_OS_DIST}${BUILD_OS_VERSION} /bin/bash -c "dnf install 
-y mock dnf-utils && mock -r ${OS_MOCK}-${OS_VERSION}-${OS_ARCH} 
--resultdir=/rpms --no-bootstrap-chroot --old-chroot --disable-plugin=yum_cache 
--disable-plugin=selinux --buildsrpm --spec /rpms/${PACKAGE}.spec --sources 
/rpms && mock --no-clean -r ${OS_MOCK}-${OS_VERSION}-${OS_ARCH} 
--resultdir=/rpms --disable-plugin=yum_cache --disable-plugin=selinux 
--no-bootstrap-chroot --old-chroot /rpms/sbd*.src.rpm"
+  - docker run --privileged -v ${PWD}:/rpms 
${BUILD_OS_TYPE}:${BUILD_OS_DIST}${BUILD_OS_VERSION} /bin/bash -c "dnf install 
-y mock dnf-utils && if test $OS_VERSION = rawhide; then sed -i 
/etc/mock/${OS_MOCK}-${OS_VERSION}-${OS_ARCH}.cfg -e s/gpgcheck.*/gpgcheck=0/g; 
fi && mock --no-clean -r ${OS_MOCK}-${OS_VERSION}-${OS_ARCH} --resultdir=/rpms 
--disable-plugin=yum_cache --disable-plugin=selinux --no-bootstrap-chroot 
--old-chroot /rpms/sbd*.src.rpm"
   - ls ${PWD}/${PACKAGE}*.${OS_ARCH}.rpm
   - docker pull ${OS_TYPE}:${OS_DIST}${OS_VERSION}
-  - docker run --privileged -v ${PWD}:/rpms -v ${PWD}/tests:/tests 
${OS_TYPE}:${OS_DIST}${OS_VERSION} /bin/bash -c "yum install -y device-mapper 
/rpms/${PACKAGE}*.${OS_ARCH}.rpm && /tests/regressions.sh && touch 
/rpms/regressions.sh.SUCCESS"
+  - docker run --privileged -v ${PWD}:/rpms -v ${PWD}/tests:/tests 
${OS_TYPE}:${OS_DIST}${OS_VERSION} /bin/bash -c "if test $OS_VERSION = rawhide; 
then yum update -y --nogpgcheck; fi && yum install -y device-mapper 
/rpms/${PACKAGE}*.${OS_ARCH}.rpm && /tests/regressions.sh && touch 
/rpms/regressions.sh.SUCCESS"
   - ls ${PWD}/regressions.sh.SUCCESS
+
+addons:
+  apt:
+    packages:
+        - rpm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/Makefile.am 
new/sbd-1.4.0+20190919.2758632/Makefile.am
--- old/sbd-1.4.0+20190612.398628b/Makefile.am  2019-06-12 18:36:24.000000000 
+0200
+++ new/sbd-1.4.0+20190919.2758632/Makefile.am  2019-09-19 17:40:55.000000000 
+0200
@@ -1,16 +1,23 @@
 SUBDIRS = src agent man
 
 # .gz because github doesn't support .xz yet :-(
-
-TAG            ?= $(shell git log --pretty="format:%H" -n 1)
+# this is modified
+#
+TAG            ?= $(shell git log --pretty="format:%H" -n 1 || sed -n -e 
"s/%global commit //p" sbd.spec)$(shell test -n "$$(git status -s)" && echo -n 
"-mod")
 distdir                 = $(PACKAGE)-$(TAG)
 TARFILE                 = $(distdir).tar.gz
 DIST_ARCHIVES   = $(TARFILE)
+KEEP_EXISTING_TAR = no
+INJECT_GIT_COMMIT = yes
+DISTCLEANFILES   = sbd-* sbd-*/
+CLEANFILES       = *.rpm *.tar.* sbd-*
 
 RPM_ROOT       = $(shell pwd)
 RPM_OPTS       = --define "_sourcedir $(RPM_ROOT)"     \
                  --define "_specdir   $(RPM_ROOT)"     \
-                 --define "_srcrpmdir $(RPM_ROOT)"
+                 --define "_srcrpmdir $(RPM_ROOT)"     \
+                 --define "_builddir  $(RPM_ROOT)"     \
+                 --define "_rpmdir    $(RPM_ROOT)"
 
 MOCK_TARGET     ?= rhel-7.1-candidate-x86_64
 MOCK_OPTIONS   ?= --resultdir=$(RPM_ROOT)/mock --no-cleanup-after
@@ -19,30 +26,51 @@
 LAST_COUNT      = $(shell test ! -e $(BUILD_COUNTER) && echo 0; test -e 
$(BUILD_COUNTER) && cat $(BUILD_COUNTER))
 COUNT           = $(shell expr 1 + $(LAST_COUNT))
 
+TESTS           = tests/regressions.sh
+export SBD_BINARY := src/sbd
+EXTRA_DIST      = sbd.spec tests/regressions.sh
+
 export:
        rm -f $(PACKAGE)-HEAD.tar.*
+       if test "$(KEEP_EXISTING_TAR)" != "yes"; then \
+           rm -f $(TARFILE); \
+       fi;
+       ! (git status -s | grep "??" && echo "untracked files present in 
git-repo" )
        if [ -f $(TARFILE) ]; then                                              
\
            echo `date`: Using existing tarball: $(TARFILE);                    
\
        else                                                                    
\
-           rm -f $(PACKAGE).tar.*;                                             
\
-           git archive --prefix=$(distdir)/ $(TAG) | gzip > $(TARFILE);        
\
+           rm -f $(PACKAGE).tar.*;                                             
\
+           (git archive --prefix=$(distdir)/ $(shell echo $(TAG)|cut -f1 -d-) 
|| tar -c --transform="s,^,$(distdir)/," --exclude="*.tar.*" 
--exclude="$(distdir)" --exclude="*.o" --exclude="*.8" --exclude="config.*" 
--exclude="Makefile" --exclude="Makefile.in" --exclude="stamp-*" 
--exclude="*.service" --exclude="sbd" --exclude="*.m4" --exclude="*.cache" 
--exclude="configure" --exclude="*.list" --exclude="depcomp" 
--exclude="install-sh" --exclude="missing" --exclude="compile" 
--exclude="sbd.sh" --exclude="~" --exclude="*.swp" --exclude="*.patch" 
--exclude="*.diff" --exclude="*.orig" --exclude="*.rej" --exclude="*.rpm" 
--exclude=".deps" --exclude="test-driver" *) | gzip > $(TARFILE);      \
+           if test -n "$$(git status -s)" || test "$(INJECT_GIT_COMMIT)" = 
"yes"; then \
+               if test -n "$$(git status -s)"; then git diff HEAD 
--name-only|grep -v "^\."|xargs -n1 git diff HEAD > uncommitted.diff; fi; \
+               rm -rf $(distdir); tar -xzf $(TARFILE); rm $(TARFILE); \
+               cd $(distdir); \
+               if test -n "$$(git status -s)"; then patch -p1 -i 
../uncommitted.diff; fi; \
+               cd ..; \
+               sed -i 's/global\ commit.*/global\ commit\ $(TAG)/' 
$(distdir)/$(PACKAGE).spec; \
+               tar -czf $(TARFILE) $(distdir); rm -rf $(distdir); \
+               rm -f uncommitted.diff; \
+           fi; \
            echo `date`: Rebuilt $(TARFILE);                                    
\
        fi
 
-#replace commit id in sbd.spce
+#replace commit id in sbd.spec
 spec:
        rm -f *.src.rpm
-       sed -i 's/global\ commit.*/global\ commit\ $(TAG)/' $(PACKAGE).spec
+       rm -rf $(distdir)
+       mkdir $(distdir)
+       cp $(PACKAGE).spec $(distdir)
+       sed -i 's/global\ commit.*/global\ commit\ $(TAG)/' 
$(distdir)/$(PACKAGE).spec
 
-srpm:  spec export
+srpm:  export spec
        if [ -e $(BUILD_COUNTER) ]; then                                        
                \
-               sed -i 's/global\ buildnum.*/global\ buildnum\ $(COUNT)/' 
$(PACKAGE).spec;      \
+               sed -i 's/global\ buildnum.*/global\ buildnum\ $(COUNT)/' 
$(distdir)/$(PACKAGE).spec;   \
                echo $(COUNT) > $(BUILD_COUNTER);                               
        \
        fi
-       rpmbuild $(RPM_OPTS) -bs $(PACKAGE).spec
+       rpmbuild $(RPM_OPTS) -bs $(distdir)/$(PACKAGE).spec
 
-rpm:   spec export
-       rpmbuild $(RPM_OPTS) -ba $(PACKAGE).spec
+rpm:   export spec
+       rpmbuild $(RPM_OPTS) -ba $(distdir)/$(PACKAGE).spec
 
 mock:   srpm
        -rm -rf $(RPM_ROOT)/mock
@@ -53,3 +81,4 @@
        cluster-helper -- 'rm -f sbd-*.x86_64.rpm'
        cluster-helper --copy $(RPM_ROOT)/mock/sbd-*.x86_64.rpm {}: 
        cluster-helper -- yum install -y sbd-*.x86_64.rpm
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/agent/sbd.in 
new/sbd-1.4.0+20190919.2758632/agent/sbd.in
--- old/sbd-1.4.0+20190612.398628b/agent/sbd.in 2019-06-12 18:36:24.000000000 
+0200
+++ new/sbd-1.4.0+20190919.2758632/agent/sbd.in 2019-09-19 17:40:55.000000000 
+0200
@@ -82,8 +82,10 @@
 status)
     sbd_check_device
     sbd_validate_timeout
-    if ! sbd -d $sbd_device list >/dev/null 2>&1 ; then
-       ha_log.sh err "sbd could not list nodes from $sbd_device"
+    error_output=$(sbd -d $sbd_device list 2>&1 >/dev/null)
+    if [ $? -ne 0 ]; then
+       error_message=$(echo "$error_output" | grep -v "please check the logs")
+       ha_log.sh err "sbd list failed: $error_message"
        exit 1
     fi
     exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/autogen.sh 
new/sbd-1.4.0+20190919.2758632/autogen.sh
--- old/sbd-1.4.0+20190612.398628b/autogen.sh   1970-01-01 01:00:00.000000000 
+0100
+++ new/sbd-1.4.0+20190919.2758632/autogen.sh   2019-09-19 17:40:55.000000000 
+0200
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Run this to generate all the initial makefiles, etc.
+autoreconf -i -v && echo Now run ./configure and make
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/configure.ac 
new/sbd-1.4.0+20190919.2758632/configure.ac
--- old/sbd-1.4.0+20190612.398628b/configure.ac 2019-06-12 18:36:24.000000000 
+0200
+++ new/sbd-1.4.0+20190919.2758632/configure.ac 2019-09-19 17:40:55.000000000 
+0200
@@ -51,16 +51,19 @@
         AC_MSG_NOTICE(No library 'cmap' found)
     else
         CPPFLAGS="$CPPFLAGS $cmap_CFLAGS"
+        LIBS="$LIBS $cmap_LIBS"
     fi
     if test $HAVE_votequorum = 0; then
         AC_MSG_NOTICE(No library 'votequorum' found)
     else
         CPPFLAGS="$CPPFLAGS $votequorum_CFLAGS"
+        LIBS="$LIBS $votequorum_LIBS"
     fi
 fi
 
 PKG_CHECK_MODULES(libxml, [libxml-2.0])
-CPPFLAGS="$CPPFLAGS $libxml_CFLAGS $libqb_CFLAGS"
+CPPFLAGS="$CPPFLAGS $libxml_CFLAGS $libqb_CFLAGS $pacemaker_CFLAGS 
$pcmk_CFLAGS"
+LIBS="$LIBS $libxml_LIBS $libqb_LIBS $pacemaker_LIBS $pcmk_LIBS"
 
 dnl     checks for libraries
 AC_CHECK_LIB(aio, io_setup, , missing="yes")
@@ -75,7 +78,7 @@
 AC_CHECK_LIB(votequorum, votequorum_getinfo, , HAVE_votequorum=0)
 
 dnl pacemaker >= 1.1.8
-AC_CHECK_HEADERS(pacemaker/crm/cluster.h)
+AC_CHECK_HEADERS(crm/cluster.h)
 AC_CHECK_LIB(crmcommon, pcmk_strerror, , missing="yes")
 AC_CHECK_LIB(cib, cib_apply_patch_event, , missing="yes")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/man/Makefile.am 
new/sbd-1.4.0+20190919.2758632/man/Makefile.am
--- old/sbd-1.4.0+20190612.398628b/man/Makefile.am      2019-06-12 
18:36:24.000000000 +0200
+++ new/sbd-1.4.0+20190919.2758632/man/Makefile.am      2019-09-19 
17:40:55.000000000 +0200
@@ -1,6 +1,6 @@
-man_MANS       = sbd.8
+dist_man_MANS  = sbd.8
 
-EXTRA_DIST     = $(man_MANS)
+EXTRA_DIST     = sbd.8.pod
 
 sbd.8: sbd.8.pod
        @POD2MAN@ -s 8 -c "STONITH Block Device" -r "SBD" -n "SBD" $< $@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/man/sbd.8.pod 
new/sbd-1.4.0+20190919.2758632/man/sbd.8.pod
--- old/sbd-1.4.0+20190612.398628b/man/sbd.8.pod        2019-06-12 
18:36:24.000000000 +0200
+++ new/sbd-1.4.0+20190919.2758632/man/sbd.8.pod        2019-09-19 
17:40:55.000000000 +0200
@@ -54,9 +54,9 @@
 stable device name (e.g.,
 F</dev/disk/by-id/dm-uuid-part1-mpath-3600508b400105b5a0001500000250000>).
 
-=item B<-v>
+=item B<-v|-vv|-vvv>
 
-Enable some verbose debug logging.
+Enable verbose|debug|debug-library logging (optional)
 
 =item B<-h>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/sbd.spec 
new/sbd-1.4.0+20190919.2758632/sbd.spec
--- old/sbd-1.4.0+20190612.398628b/sbd.spec     2019-06-12 18:36:24.000000000 
+0200
+++ new/sbd-1.4.0+20190919.2758632/sbd.spec     2019-09-19 17:40:55.000000000 
+0200
@@ -15,8 +15,9 @@
 
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
-%global commit 2d595fdde4f62278b96db1b7fb79aae5e990bb0b
-%global shortcommit %(c=%{commit}; echo ${c:0:7})
+%global commit 5705703da3db01bb4c34fd73ae33f24b43a16b78-mod
+%global shortcommit %(echo %{commit}|cut -c1-8)
+%global modified %(echo %{commit}-|cut -f2 -d-)
 %global github_owner beekhof
 %global buildnum 1
 
@@ -25,7 +26,7 @@
 License:        GPLv2+
 Group:          System Environment/Daemons
 Version:        1.4.0
-Release:        0.%{buildnum}.%{shortcommit}.git%{?dist}
+Release:        99.%{buildnum}.%{shortcommit}.%{modified}git%{?dist}
 Url:            https://github.com/%{github_owner}/%{name}
 Source0:        
https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -35,12 +36,17 @@
 BuildRequires:  glib2-devel
 BuildRequires:  libaio-devel
 BuildRequires:  corosynclib-devel
+%if 0%{?suse_version}
+BuildRequires:  libpacemaker-devel
+%else
 BuildRequires:  pacemaker-libs-devel
+%endif
 BuildRequires:  libtool
 BuildRequires:  libuuid-devel
 BuildRequires:  libxml2-devel
 BuildRequires:  pkgconfig
 BuildRequires:  make
+Conflicts:      fence-agents-sbd < 4.5.0
 
 %if 0%{?rhel} > 0
 ExclusiveArch: i686 x86_64 s390x aarch64 ppc64le
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/src/Makefile.am 
new/sbd-1.4.0+20190919.2758632/src/Makefile.am
--- old/sbd-1.4.0+20190612.398628b/src/Makefile.am      2019-06-12 
18:36:24.000000000 +0200
+++ new/sbd-1.4.0+20190919.2758632/src/Makefile.am      2019-09-19 
17:40:55.000000000 +0200
@@ -5,7 +5,7 @@
 
 sbin_PROGRAMS = sbd
 
-sbd_SOURCES = sbd-common.c sbd-inquisitor.c sbd-pacemaker.c sbd-cluster.c 
setproctitle.c
+sbd_SOURCES = sbd-common.c sbd-inquisitor.c sbd-pacemaker.c sbd-cluster.c 
setproctitle.c sbd.h sbd.sysconfig
 
 if SUPPORT_SHARED_DISK
 sbd_SOURCES += sbd-md.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/src/sbd-cluster.c 
new/sbd-1.4.0+20190919.2758632/src/sbd-cluster.c
--- old/sbd-1.4.0+20190612.398628b/src/sbd-cluster.c    2019-06-12 
18:36:24.000000000 +0200
+++ new/sbd-1.4.0+20190919.2758632/src/sbd-cluster.c    2019-09-19 
17:40:55.000000000 +0200
@@ -588,14 +588,14 @@
     /* stonith_our_uname = cluster.uname; */
     /* stonith_our_uuid = cluster.uuid; */
 
-    mainloop = g_main_new(FALSE);
+    mainloop = g_main_loop_new(NULL, FALSE);
     notify_timer = g_timeout_add(timeout_loop * 1000, notify_timer_cb, NULL);
 
     mainloop_add_signal(SIGTERM, cluster_shutdown);
     mainloop_add_signal(SIGINT, cluster_shutdown);
     
-    g_main_run(mainloop);
-    g_main_destroy(mainloop);
+    g_main_loop_run(mainloop);
+    g_main_loop_unref(mainloop);
     
     clean_up(0);
     return 0;                   /* never reached */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/src/sbd-common.c 
new/sbd-1.4.0+20190919.2758632/src/sbd-common.c
--- old/sbd-1.4.0+20190612.398628b/src/sbd-common.c     2019-06-12 
18:36:24.000000000 +0200
+++ new/sbd-1.4.0+20190919.2758632/src/sbd-common.c     2019-09-19 
17:40:55.000000000 +0200
@@ -81,7 +81,7 @@
 "-T            Do NOT initialize the watchdog timeout (watch only)\n"
 "-S <0|1>      Set start mode if the node was previously fenced (watch only)\n"
 "-p <path>     Write pidfile to the specified path (watch only)\n"
-"-v            Enable some verbose debug logging (optional)\n"
+"-v|-vv|-vvv   Enable verbose|debug|debug-library logging (optional)\n"
 "\n"
 "-1 <N>                Set watchdog timeout to N seconds (optional, create 
only)\n"
 "-2 <N>                Set slot allocation timeout to N seconds (optional, 
create only)\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/src/sbd-inquisitor.c 
new/sbd-1.4.0+20190919.2758632/src/sbd-inquisitor.c
--- old/sbd-1.4.0+20190612.398628b/src/sbd-inquisitor.c 2019-06-12 
18:36:24.000000000 +0200
+++ new/sbd-1.4.0+20190919.2758632/src/sbd-inquisitor.c 2019-09-19 
17:40:55.000000000 +0200
@@ -16,7 +16,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include <pacemaker/crm/common/util.h>
+#include <crm/common/util.h>
 #include "sbd.h"
 #define        LOCKSTRLEN      11
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/src/sbd-md.c 
new/sbd-1.4.0+20190919.2758632/src/sbd-md.c
--- old/sbd-1.4.0+20190612.398628b/src/sbd-md.c 2019-06-12 18:36:24.000000000 
+0200
+++ new/sbd-1.4.0+20190919.2758632/src/sbd-md.c 2019-09-19 17:40:55.000000000 
+0200
@@ -790,14 +790,14 @@
                st = open_device(s->devname, LOG_WARNING);
                if (!st) {
                        rc = -1;
-                       fprintf(stdout, "== disk %s unreadable!\n", s->devname);
+                       fprintf(stderr, "== disk %s unreadable!\n", s->devname);
                        continue;
                }
                rv = slot_list(st);
                close_device(st);
                if (rv == -1) {
                        rc = -1;
-                       fprintf(stdout, "== Slots on disk %s NOT dumped\n", 
s->devname);
+                       fprintf(stderr, "== Slots on disk %s NOT dumped\n", 
s->devname);
                }
        }
        return rc;
@@ -938,13 +938,13 @@
                        rv = header_dump(st);
                        close_device(st);
                } else {
-                       fprintf(stdout, "== disk %s unreadable!\n", s->devname);
+                       fprintf(stderr, "== disk %s unreadable!\n", s->devname);
                        rv = -1;
                }
 
                if (rv == -1) {
                        rc = -1;
-                       fprintf(stdout, "==Header on disk %s NOT dumped\n", 
s->devname);
+                       fprintf(stderr, "==Header on disk %s NOT dumped\n", 
s->devname);
                } else {
                        fprintf(stdout, "==Header on disk %s is dumped\n", 
s->devname);
                }
@@ -957,6 +957,7 @@
        struct sector_header_s *hdr_cur = NULL;
        struct timespec t_0;
        int t_wait = 0;
+       bool logged_once = false;
 
        clock_gettime(CLOCK_MONOTONIC, &t_0);
 
@@ -966,12 +967,29 @@
 
                for (s = servants; s; s = s->next) {
                        struct sbd_context *st = open_device(s->devname, 
LOG_DEBUG);
-                       if (!st)
+                       if (!st) {
+                               if (logged_once == false) {
+                                       cl_log(LOG_WARNING, "Failed to open %s. 
"
+                                                       "Trying any other 
configured devices, "
+                                                       "otherwise retrying 
every %ds within %ds",
+                                                       s->devname, 
timeout_loop, timeout_startup);
+                                       logged_once = true;
+                               }
                                continue;
+                       }
                        hdr_cur = header_get(st);
                        close_device(st);
-                       if (hdr_cur)
+                       if (hdr_cur) {
                                break;
+                       } else {
+                               if (logged_once == false) {
+                                       cl_log(LOG_WARNING, "Failed to read 
header from %s. "
+                                                       "Trying any other 
configured devices, "
+                                                       "otherwise retrying 
every %ds within %ds",
+                                                       s->devname, 
timeout_loop, timeout_startup);
+                                       logged_once = true;
+                               }
+                       }
                }
                clock_gettime(CLOCK_MONOTONIC, &t_now);
                t_wait = t_now.tv_sec - t_0.tv_sec;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/src/sbd-pacemaker.c 
new/sbd-1.4.0+20190919.2758632/src/sbd-pacemaker.c
--- old/sbd-1.4.0+20190612.398628b/src/sbd-pacemaker.c  2019-06-12 
18:36:24.000000000 +0200
+++ new/sbd-1.4.0+20190919.2758632/src/sbd-pacemaker.c  2019-09-19 
17:40:55.000000000 +0200
@@ -383,6 +383,24 @@
     return FALSE;
 }
 
+#define XPATH_SHUTDOWN "//" XML_CIB_TAG_STATE "[@uname='%s']/" \
+    XML_TAG_TRANSIENT_NODEATTRS "/" XML_TAG_ATTR_SETS "/" \
+    XML_CIB_TAG_NVPAIR "[@name='" XML_CIB_ATTR_SHUTDOWN "']"
+
+static gboolean
+shutdown_attr_in_cib(void)
+{
+    xmlNode *match = NULL;
+    char *xpath_string;
+
+    xpath_string = crm_strdup_printf(XPATH_SHUTDOWN, local_uname);
+    if (xpath_string) {
+        match = get_xpath_object(xpath_string, current_cib, LOG_TRACE);
+        free(xpath_string);
+    }
+    return (match != NULL);
+}
+
 static void
 crm_diff_update(const char *event, xmlNode * msg)
 {
@@ -426,8 +444,10 @@
      * - immediately if the last update was more than 1s ago
      * - every 10 updates
      * - at most 1s after the last update
+     * - shutdown attribute for our node set for the first time
      */
-    if (updates > 10 || (now - last_refresh) > (reconnect_msec / 1000)) {
+    if ((!pcmk_shutdown && shutdown_attr_in_cib()) ||
+           (updates > 10 || (now - last_refresh) > (reconnect_msec / 1000))) {
         mon_refresh_state(refresh_timer);
         updates = 0;
 
@@ -542,14 +562,14 @@
                }
        }
 
-       mainloop = g_main_new(FALSE);
+       mainloop = g_main_loop_new(NULL, FALSE);
 
        mainloop_add_signal(SIGTERM, mon_shutdown);
        mainloop_add_signal(SIGINT, mon_shutdown);
        timer_id_notify = g_timeout_add(timeout_loop * 1000, mon_timer_notify, 
NULL);
 
-       g_main_run(mainloop);
-       g_main_destroy(mainloop);
+       g_main_loop_run(mainloop);
+       g_main_loop_unref(mainloop);
 
        clean_up(0);
        return 0;                   /* never reached */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/src/sbd.h 
new/sbd-1.4.0+20190919.2758632/src/sbd.h
--- old/sbd-1.4.0+20190612.398628b/src/sbd.h    2019-06-12 18:36:24.000000000 
+0200
+++ new/sbd-1.4.0+20190919.2758632/src/sbd.h    2019-09-19 17:40:55.000000000 
+0200
@@ -42,7 +42,7 @@
 #include <unistd.h>
 #include <uuid/uuid.h>
 #include <qb/qblog.h>
-#include <pacemaker/crm_config.h>
+#include <crm_config.h>
 #include <config.h>
 
 /* signals reserved for multi-disk sbd */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sbd-1.4.0+20190612.398628b/tests/regressions.sh 
new/sbd-1.4.0+20190919.2758632/tests/regressions.sh
--- old/sbd-1.4.0+20190612.398628b/tests/regressions.sh 2019-06-12 
18:36:24.000000000 +0200
+++ new/sbd-1.4.0+20190919.2758632/tests/regressions.sh 2019-09-19 
17:40:55.000000000 +0200
@@ -27,35 +27,42 @@
 # - How to test watch mode?
 # - Can the unit/service file be tested? or at least the wrapper?
 
+: ${SBD_BINARY:="/usr/sbin/sbd"}
+
+sbd() {
+       ${SBD_BINARY} $*
+}
+
 sbd_setup() {
        trap sbd_teardown EXIT
        for N in $(seq 3) ; do
                F[$N]=$(mktemp /tmp/sbd.device.$N.XXXXXX)
+               R[$N]=$(echo ${F[$N]}|cut -f4 -d.)
                dd if=/dev/zero of=${F[$N]} count=2048
                L[$N]=$(losetup -f)
                losetup ${L[$N]} ${F[$N]}
-               D[$N]="/dev/mapper/sbd_$N"
-               dmsetup create sbd_$N --table "0 2048 linear ${L[$N]} 0"
-               dmsetup mknodes sbd_$N
+               D[$N]="/dev/mapper/sbd_${N}_${R[$N]}"
+               dmsetup create sbd_${N}_${R[$N]} --table "0 2048 linear 
${L[$N]} 0"
+               dmsetup mknodes sbd_${N}_${R[$N]}
        done
 }
 
 sbd_teardown() {
        for N in $(seq 3) ; do
-               dmsetup remove sbd_$N
+               dmsetup remove sbd_${N}_${R[$N]}
                losetup -d ${L[$N]}
                rm -f ${F[$N]}
        done
 }
 
 sbd_dev_fail() {
-       dmsetup wipe_table sbd_$1
+       dmsetup wipe_table sbd_${1}_${R[$1]}
 }
 
 sbd_dev_resume() {
-       dmsetup suspend sbd_$1
-       dmsetup load sbd_$1 --table "0 2048 linear ${L[$1]} 0"
-       dmsetup resume sbd_$1
+       dmsetup suspend sbd_${1}_${R[$1]}
+       dmsetup load sbd_${1}_${R[$1]} --table "0 2048 linear ${L[$1]} 0"
+       dmsetup resume sbd_${1}_${R[$1]}
 }
 
 _ok() {


Reply via email to