Hello community, here is the log from the commit of package sbd for openSUSE:Factory checked in at 2017-03-12 20:02:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sbd (Old) and /work/SRC/openSUSE:Factory/.sbd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sbd" Sun Mar 12 20:02:15 2017 rev:14 rq:477300 version:1.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/sbd/sbd.changes 2016-09-01 14:03:36.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.sbd.new/sbd.changes 2017-03-12 20:02:16.240439059 +0100 @@ -1,0 +2,66 @@ +Mon Mar 6 14:41:52 UTC 2017 - [email protected] + +- Clarify documentation around watchdog option (-W) +- Fix node-name handling in structs - bail out if too long + +- man: Update man page to use pcmk_delay_max over start-delay (bsc#993032) + * Drop bug-993032_sbd-man-pcmk_delay_max.patch which has been merged upstream + +- use LDADD instead of LDFLAGS to fix build failure with ld --as-needed + * Drop obsolete add-explicit-libs.patch + +- Set SBD_STARTMODE to "always" by default + +- Upstream version cs: 4ee36fa33b57a1ad95678363911cfb02a92e1edb + +------------------------------------------------------------------- +Fri Feb 24 17:35:06 UTC 2017 - [email protected] + +- Correctly find the pacemaker remote process +- Pacemaker remote must be allowed to start in parallel to sbd +- Only log 'healthy' when a servant was previously outdated +- Ensure the correct callbacks are always configured +- Streamline the initial cluster connection +- Non-disk servants start off as outdated until we hear from them +- Correctly check if the new servant is a disk +- Ensure crm_system_name is set to avoid SEGFAULT when connecting to the cluster +- Repair diskless startup (fate#321017) +- Enable the cluster check module + +- systemd: Provide sbd_remote.service file for pacemaker remote nodes (bsc#962287) + * Drop sbd_remote.service which has been merged upstream + +- Simplified check for disk vs. non-disk servants +- Implement a new mode that gives priority to the cluster servants +- Support pacemaker remote as a cluster connect type that we can monitor +- Attempt to reconnect to the cluster after a failure +- Only continue tickling the watchdog without quorum if we have non-disk elements +- Notify the parent explicitly when the cluster connection goes away +- Track the number of servants and disks differently +- Cluster servant focuses exclusively on having a live cluster connection +- Automatically scale timeout_watchdog_warn with timeout_watchdog +- Differentiate between when a node is offline and unknown +- Gracefully handle an empty CIB +- Repair startup when no disks are present (fate#321017) +- Allow the watchdog timeout to be specified via the environment + +- Self terminate when quorum is lost and the admin configured no-quorum-policy=suicide (bsc#950415) + * Drop obsolete bug-950415_sbd-pacemaker-segfault.patch + +- Prevent watchdogdev variable from being erased on fork() +- Fix the parsing of devices from the environment +- Let systemd own where the pidfile lives +- Use the pacemaker corefile directory +- Repair the SBD_STARTMODE handling and allow startup without a disk partition (fate#321017) +- Batch up the processing of cib updates but cap the maximum delay +- Simplify the systemd unit file by reading options from the environment + +- Drop dependancy on clplumbing + * Drop obsolete sbd-configure-libcoroipcc.patch + +- Pacemaker: Fix compilation when building against corosync 2.x + * Drop obsolete sbd-pacemaker.patch + +- Upstream version cs: c511b0692784a7085df4b1ae35748fb318fa79ee + +------------------------------------------------------------------- Old: ---- add-explicit-libs.patch bug-993032_sbd-man-pcmk_delay_max.patch sbd-1.2.1.git.1463482437.d6bd23a.tar.xz New: ---- sbd.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sbd.spec ++++++ --- /var/tmp/diff_new_pack.YZpYjq/_old 2017-03-12 20:02:16.908344550 +0100 +++ /var/tmp/diff_new_pack.YZpYjq/_new 2017-03-12 20:02:16.908344550 +0100 @@ -1,7 +1,7 @@ # # spec file for package sbd # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2013 Lars Marowsky-Bree # # All modifications and additions to the file contributed by third parties @@ -18,20 +18,17 @@ Name: sbd -Version: 1.2.1.git.1463482437.d6bd23a +Version: 1.2.1 Release: 0 Summary: Storage-based death License: GPL-2.0+ Group: Productivity/Clustering/HA Url: https://github.com/ClusterLabs/sbd -Source: %{name}-%{version}.tar.xz -Patch1: add-explicit-libs.patch -Patch2: bug-993032_sbd-man-pcmk_delay_max.patch +Source: %{name}.tar.bz2 BuildRequires: autoconf BuildRequires: automake BuildRequires: e2fsprogs-devel BuildRequires: libaio-devel -BuildRequires: libglue-devel BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: pkgconfig(corosync) @@ -51,7 +48,7 @@ This package contains the storage-based death functionality. %prep -%autosetup -p1 +%autosetup -n %{name} -p1 %build autoreconf -fvi @@ -66,12 +63,15 @@ ln -s service %{buildroot}%{_sbindir}/rcsbd ln -s service %{buildroot}%{_sbindir}/rcsbd_remote mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates -cp -f src/sbd.sysconfig %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.sbd +install -m 0644 src/sbd.sysconfig %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.sbd %post %service_add_post sbd.service %service_add_post sbd_remote.service -%fillup_only sbd + +if [ ! -e %{_sysconfdir}/sysconfig/sbd ]; then + %fillup_only sbd +fi %pre %service_add_pre sbd.service ++++++ _service ++++++ --- /var/tmp/diff_new_pack.YZpYjq/_old 2017-03-12 20:02:16.944339457 +0100 +++ /var/tmp/diff_new_pack.YZpYjq/_new 2017-03-12 20:02:16.944339457 +0100 @@ -2,7 +2,7 @@ <service name="tar_scm" mode="disabled"> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="url">https://github.com/krig/sbd.git</param> + <param name="url">https://github.com/ClusterLabs/sbd.git</param> <param name="revision">opensuse</param> <param name="versionformat">1.2.1.git.%ct.%h</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.YZpYjq/_old 2017-03-12 20:02:16.964336627 +0100 +++ /var/tmp/diff_new_pack.YZpYjq/_new 2017-03-12 20:02:16.964336627 +0100 @@ -1,7 +1,6 @@ <servicedata> <service name="tar_scm"> - <param name="url">https://github.com/l-mb/sbd.git</param> - <param name="changesrevision">39dee2ac89</param></service> -<service name="tar_scm"> - <param name="url">https://github.com/krig/sbd.git</param> - <param name="changesrevision">d6bd23a66e59801206fcb8bd265a5effad239478</param></service></servicedata> \ No newline at end of file + <param name="url">https://github.com/ClusterLabs/sbd.git</param> + <param name="changesrevision">4ee36fa33b57a1ad95678363911cfb02a92e1edb</param> + </service> +</servicedata> ++++++ sbd-1.2.1.git.1463482437.d6bd23a.tar.xz -> sbd.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sbd-1.2.1.git.1463482437.d6bd23a/.git_info new/sbd/.git_info --- old/sbd-1.2.1.git.1463482437.d6bd23a/.git_info 1970-01-01 01:00:00.000000000 +0100 +++ new/sbd/.git_info 2017-03-06 15:37:55.426644909 +0100 @@ -0,0 +1 @@ +v1.2.0-126-g4ee36fa diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sbd-1.2.1.git.1463482437.d6bd23a/Makefile.am new/sbd/Makefile.am --- old/sbd-1.2.1.git.1463482437.d6bd23a/Makefile.am 2016-05-17 12:59:18.000000000 +0200 +++ new/sbd/Makefile.am 2017-03-06 15:26:43.000000000 +0100 @@ -29,16 +29,19 @@ echo `date`: Rebuilt $(TARFILE); \ fi -srpm: export +#replace commit id in sbd.spce +spec: rm -f *.src.rpm sed -i 's/global\ commit.*/global\ commit\ $(TAG)/' $(PACKAGE).spec + +srpm: spec export if [ -e $(BUILD_COUNTER) ]; then \ sed -i 's/global\ buildnum.*/global\ buildnum\ $(COUNT)/' $(PACKAGE).spec; \ echo $(COUNT) > $(BUILD_COUNTER); \ fi rpmbuild $(RPM_OPTS) -bs $(PACKAGE).spec -rpm: export +rpm: spec export rpmbuild $(RPM_OPTS) -ba $(PACKAGE).spec mock: srpm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sbd-1.2.1.git.1463482437.d6bd23a/man/sbd.8.pod new/sbd/man/sbd.8.pod --- old/sbd-1.2.1.git.1463482437.d6bd23a/man/sbd.8.pod 2016-05-17 12:59:18.000000000 +0200 +++ new/sbd/man/sbd.8.pod 2017-03-06 15:26:43.000000000 +0100 @@ -229,16 +229,19 @@ =over -=item B<-w> F</dev/watchdog> +=item B<-W> + +Enable or disable use of the system watchdog to protect against the sbd +processes failing and the node being left in an undefined state. Specify +this once to enable, twice to disable. -The system watchdog is used by sbd to protect against the sbd -processes failing and the node being left in an undefined state. +Defaults to I<enabled>. + +=item B<-w> F</dev/watchdog> This can be used to override the default watchdog device used and should not usually be necessary. -Passing /dev/null as the argument disables use of the system watchdog. - =item B<-p> F</var/run/sbd.pid> This option can be used to specify a pidfile for the main sbd process. @@ -549,16 +552,16 @@ follows: primitive fencing-sbd stonith:external/sbd \ - op start start-delay="15" + params pcmk_delay_max=30 This will automatically use the same devices as configured in F</etc/sysconfig/sbd>. -While you should not configure this as a clone (as Pacemaker will start -a fencing agent in each partition automatically), the I<start-delay> -setting ensures, in a scenario where a split-brain scenario did occur in -a two node cluster, that the one that still needs to instantiate a -fencing agent is slightly disadvantaged to avoid fencing loops. +While you should not configure this as a clone (as Pacemaker will register +the fencing device on each node automatically), the I<pcmk_delay_max> +setting enables random fencing delay which ensures, in a scenario where a +split-brain scenario did occur in a two node cluster, that one of the nodes +has a better chance to survive to avoid double fencing. SBD also supports turning the reset request into a crash request, which may be helpful for debugging if you have kernel crashdumping configured; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sbd-1.2.1.git.1463482437.d6bd23a/src/Makefile.am new/sbd/src/Makefile.am --- old/sbd-1.2.1.git.1463482437.d6bd23a/src/Makefile.am 2016-05-17 12:59:18.000000000 +0200 +++ new/sbd/src/Makefile.am 2017-03-06 15:26:43.000000000 +0100 @@ -11,5 +11,5 @@ sbd_SOURCES += sbd-md.c endif -sbd_LDFLAGS = $(glib_LIBS) $(libcoroipcc_LIBS) +sbd_LDADD = $(glib_LIBS) $(libcoroipcc_LIBS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sbd-1.2.1.git.1463482437.d6bd23a/src/sbd-common.c new/sbd/src/sbd-common.c --- old/sbd-1.2.1.git.1463482437.d6bd23a/src/sbd-common.c 2016-05-17 12:59:18.000000000 +0200 +++ new/sbd/src/sbd-common.c 2017-03-06 15:26:43.000000000 +0100 @@ -69,7 +69,8 @@ "-n <node> Set local node name; defaults to uname -n (optional)\n" "\n" "-R Do NOT enable realtime priority (debugging only)\n" -"-w <dev> Specify watchdog device (optional, recommended) (watch only)\n" +"-W Use watchdog (recommended) (watch only)\n" +"-w <dev> Specify watchdog device (optional) (watch only)\n" "-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" @@ -686,7 +687,7 @@ len = vasprintf (&string, format, ap); if(len > 0) { - cl_log(level, string); + cl_log(level, "%s", string); } va_end(ap); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sbd-1.2.1.git.1463482437.d6bd23a/src/sbd-inquisitor.c new/sbd/src/sbd-inquisitor.c --- old/sbd-1.2.1.git.1463482437.d6bd23a/src/sbd-inquisitor.c 2016-05-17 12:59:18.000000000 +0200 +++ new/sbd/src/sbd-inquisitor.c 2017-03-06 15:26:43.000000000 +0100 @@ -999,12 +999,10 @@ } } - /* Accept old -W argument: An odd number of -W disables the watchdog */ - if (w % 2) { - watchdogdev = NULL; - } + if (w > 0) { + watchdog_use = w % 2; - if (watchdogdev == NULL || strcmp(watchdogdev, "/dev/null") == 0) { + } else if(watchdogdev == NULL || strcmp(watchdogdev, "/dev/null") == 0) { watchdog_use = 0; } @@ -1014,6 +1012,14 @@ cl_log(LOG_INFO, "Watchdog disabled."); } + 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); + fprintf(stderr, "If uname is longer define a name to be used by sbd.\n"); + exit_status = -1; + goto out; + } + if (disk_count > 3) { fprintf(stderr, "You can specify up to 3 devices via the -d option.\n"); exit_status = -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sbd-1.2.1.git.1463482437.d6bd23a/src/sbd-md.c new/sbd/src/sbd-md.c --- old/sbd-1.2.1.git.1463482437.d6bd23a/src/sbd-md.c 2016-05-17 12:59:18.000000000 +0200 +++ new/sbd/src/sbd-md.c 2017-03-06 15:26:43.000000000 +0100 @@ -452,7 +452,7 @@ } if (s_node->in_use != 0) { if (strncasecmp(s_node->name, name, - sizeof(s_node->name)) == 0) { + SECTOR_NAME_MAX) == 0) { DBGLOG(LOG_INFO, "%s owns slot %d", name, i); rc = i; goto out; } @@ -526,7 +526,7 @@ fprintf(stdout, "slot %d is unused - trying to own\n", i); memset(s_node, 0, sizeof(*s_node)); s_node->in_use = 1; - strncpy(s_node->name, name, sizeof(s_node->name)); + strncpy(s_node->name, name, SECTOR_NAME_MAX); if (slot_write(st, i, s_node) < 0) { rc = -1; goto out; } @@ -623,7 +623,7 @@ rc = -1; goto out; } - strncpy(s_mbox->from, local_uname, sizeof(s_mbox->from)-1); + strncpy(s_mbox->from, local_uname, SECTOR_NAME_MAX); cl_log(LOG_INFO, "Writing %s to node slot %s", cmd, name); @@ -675,7 +675,7 @@ s_mbox = sector_alloc(); s_mbox->cmd = SBD_MSG_TEST; - strncpy(s_mbox->from, local_uname, sizeof(s_mbox->from)-1); + strncpy(s_mbox->from, local_uname, SECTOR_NAME_MAX); DBGLOG(LOG_DEBUG, "Pinging node %s", name); if (mbox_write(st, mbox, s_mbox) < -1) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sbd-1.2.1.git.1463482437.d6bd23a/src/sbd.h new/sbd/src/sbd.h --- old/sbd-1.2.1.git.1463482437.d6bd23a/src/sbd.h 2016-05-17 12:59:18.000000000 +0200 +++ new/sbd/src/sbd.h 2017-03-06 15:26:43.000000000 +0100 @@ -55,6 +55,7 @@ /* FIXME: should add dynamic check of SIG_XX >= SIGRTMAX */ #define HOG_CHAR 0xff +#define SECTOR_NAME_MAX 63 /* Sector data types */ struct sector_header_s { @@ -75,13 +76,13 @@ struct sector_mbox_s { signed char cmd; - char from[64]; + char from[SECTOR_NAME_MAX+1]; }; struct sector_node_s { /* slots will be created with in_use == 0 */ char in_use; - char name[64]; + char name[SECTOR_NAME_MAX+1]; }; struct servants_list_item { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sbd-1.2.1.git.1463482437.d6bd23a/src/sbd.sh new/sbd/src/sbd.sh --- old/sbd-1.2.1.git.1463482437.d6bd23a/src/sbd.sh 2016-05-17 12:59:18.000000000 +0200 +++ new/sbd/src/sbd.sh 2017-03-06 15:26:43.000000000 +0100 @@ -48,7 +48,7 @@ fi : ${SBD_WATCHDOG:="true"} if ! ocf_is_true "$SBD_WATCHDOG" ; then - SBD_OPTS+=" -W -W" + SBD_OPTS+=" -W -W" fi if [ -n "$SBD_WATCHDOG_DEV" ]; then SBD_OPTS+=" -w $SBD_WATCHDOG_DEV"
