Sync from SUSE:SLFO:Main sbd revision ccb6d46548219b0f998728928fd376ba

This commit is contained in:
Adrian Schröter 2024-10-01 08:53:21 +02:00
commit 9fba523e66
10 changed files with 1216 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

17
_service Normal file
View File

@ -0,0 +1,17 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="url">https://github.com/ClusterLabs/sbd.git</param>
<param name="revision">main</param>
<param name="versionformat">1.5.2+%cd.%h</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">sbd*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

6
_servicedata Normal file
View File

@ -0,0 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/ClusterLabs/sbd.git</param>
<param name="changesrevision">0e4534ebdfe8d7a37beb0028e604e560a5674891</param>
</service>
</servicedata>

View File

@ -0,0 +1,118 @@
Index: sbd-1.4.1+20200807.7c21899/src/sbd-cluster.c
===================================================================
--- sbd-1.4.1+20200807.7c21899.orig/src/sbd-cluster.c
+++ sbd-1.4.1+20200807.7c21899/src/sbd-cluster.c
@@ -35,6 +35,18 @@
#if CHECK_TWO_NODE || CHECK_QDEVICE_SYNC_TIMEOUT
#include <glib-unix.h>
+// available since glib 2.58
+#ifndef G_SOURCE_FUNC
+#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
+#endif
+// available since glib 2.32
+#ifndef G_SOURCE_REMOVE
+#define G_SOURCE_REMOVE FALSE
+#endif
+// available since glib 2.32
+#ifndef G_SOURCE_CONTINUE
+#define G_SOURCE_CONTINUE TRUE
+#endif
#endif
#include "sbd.h"
@@ -55,6 +67,7 @@ static int reconnect_msec = 1000;
static GMainLoop *mainloop = NULL;
static guint notify_timer = 0;
static crm_cluster_t cluster;
+static void clean_up(int rc);
static gboolean sbd_remote_check(gpointer user_data);
static long unsigned int find_pacemaker_remote(void);
static void sbd_membership_destroy(gpointer user_data);
@@ -292,10 +305,19 @@ static void sbd_cmap_notify_fn(
}
static gboolean
-cmap_dispatch_callback (gpointer user_data)
-{
+cmap_dispatch_callback (gint cmap_fd,
+ GIOCondition condition,
+ gpointer user_data)
+{
+ /* CMAP connection lost */
+ if (condition & G_IO_HUP) {
+ cl_log(LOG_WARNING, "CMAP service connection lost\n");
+ clean_up(EXIT_CLUSTER_DISCONNECT);
+ /* remove the source from the main loop */
+ return G_SOURCE_REMOVE; /* never reached */
+ }
cmap_dispatch(cmap_handle, CS_DISPATCH_ALL);
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
static void
@@ -370,7 +392,7 @@ verify_against_cmap_config(void)
cl_log(LOG_WARNING, "Couldn't create source for cmap\n");
goto out;
}
- g_source_set_callback(cmap_source, cmap_dispatch_callback, NULL, NULL);
+ g_source_set_callback(cmap_source, G_SOURCE_FUNC(cmap_dispatch_callback), NULL, NULL);
g_source_attach(cmap_source, NULL);
}
@@ -733,6 +755,15 @@ clean_up(int rc)
* just to be back where we started
*/
#endif
+
+#if SUPPORT_COROSYNC && CHECK_TWO_NODE
+ cmap_destroy();
+#endif
+
+ if (rc >= 0) {
+ exit(rc);
+ }
+
return;
}
Index: sbd-1.4.1+20200807.7c21899/src/sbd-inquisitor.c
===================================================================
--- sbd-1.4.1+20200807.7c21899.orig/src/sbd-inquisitor.c
+++ sbd-1.4.1+20200807.7c21899/src/sbd-inquisitor.c
@@ -532,6 +532,20 @@ void inquisitor_child(void)
break;
}
}
+ } else if (sbd_is_cluster(s)) {
+ if (WIFEXITED(status)) {
+ switch(WEXITSTATUS(status)) {
+ case EXIT_CLUSTER_DISCONNECT:
+ cl_log(LOG_WARNING, "Cluster-Servant has exited (connection lost)");
+ s->restarts = 0;
+ s->restart_blocked = 0;
+ s->outdated = 1;
+ s->t_last.tv_sec = 0;
+ break;
+ default:
+ break;
+ }
+ }
}
cleanup_servant_by_pid(pid);
}
Index: sbd-1.4.1+20200807.7c21899/src/sbd.h
===================================================================
--- sbd-1.4.1+20200807.7c21899.orig/src/sbd.h
+++ sbd-1.4.1+20200807.7c21899/src/sbd.h
@@ -62,6 +62,9 @@
/* exit status for pcmk-servant */
#define EXIT_PCMK_SERVANT_GRACEFUL_SHUTDOWN 30
+/* exit status for cluster-servant */
+#define EXIT_CLUSTER_DISCONNECT 40
+
#define HOG_CHAR 0xff
#define SECTOR_NAME_MAX 63

View File

@ -0,0 +1,23 @@
From debebb2dcdd7af99b16c34f9bab2d91c42ae6cdd Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Fri, 29 Jan 2021 14:14:44 +0100
Subject: [PATCH] Log: sbd-inquisitor: downgrade the warning about
SBD_SYNC_RESOURCE_STARTUP to notice
---
src/sbd-inquisitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: sbd-1.5.1+20221128.8ec8e01/src/sbd-inquisitor.c
===================================================================
--- sbd-1.5.1+20221128.8ec8e01.orig/src/sbd-inquisitor.c
+++ sbd-1.5.1+20221128.8ec8e01/src/sbd-inquisitor.c
@@ -1304,7 +1304,7 @@ int main(int argc, char **argv, char **e
}
#else
if (check_pcmk && !sync_resource_startup) {
- cl_log(LOG_WARNING, "SBD built against pacemaker supporting "
+ cl_log(LOG_NOTICE, "SBD built against pacemaker supporting "
"pacemakerd-API. Should think about enabling "
"SBD_SYNC_RESOURCE_STARTUP.");

19
harden_sbd.service.patch Normal file
View File

@ -0,0 +1,19 @@
Index: sbd-1.5.1+20211116.6bb085f/src/sbd.service.in
===================================================================
--- sbd-1.5.1+20211116.6bb085f.orig/src/sbd.service.in
+++ sbd-1.5.1+20211116.6bb085f/src/sbd.service.in
@@ -9,6 +9,14 @@ RefuseManualStop=true
RefuseManualStart=true
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+ProtectHostname=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+# end of automatic additions
Type=forking
PIDFile=@runstatedir@/sbd.pid
EnvironmentFile=-@CONFIGDIR@/sbd

View File

@ -0,0 +1,19 @@
Index: sbd-1.5.1+20211116.6bb085f/src/sbd_remote.service.in
===================================================================
--- sbd-1.5.1+20211116.6bb085f.orig/src/sbd_remote.service.in
+++ sbd-1.5.1+20211116.6bb085f/src/sbd_remote.service.in
@@ -7,6 +7,14 @@ RefuseManualStop=true
RefuseManualStart=true
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+ProtectHostname=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+# end of automatic additions
Type=forking
PIDFile=@runstatedir@/sbd.pid
EnvironmentFile=-@CONFIGDIR@/sbd

BIN
sbd-1.5.2+20230316.5ec38cf.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

820
sbd.changes Normal file
View File

@ -0,0 +1,820 @@
-------------------------------------------------------------------
Tue Jun 20 04:16:55 UTC 2023 - Yan Gao <ygao@suse.com>
- Update to version 1.5.2+20230316.5ec38cf:
- query-watchdog: avoid issues on heap allocation failing (gh#ClusterLabs/sbd#147)
-------------------------------------------------------------------
Tue Jun 20 04:14:49 UTC 2023 - Yan Gao <ygao@suse.com>
- Update to version 1.5.2+20230109.cf5c220 (v1.5.2):
-------------------------------------------------------------------
Fri Dec 02 08:12:43 UTC 2022 - Yan Gao <ygao@suse.com>
- Update to version 1.5.1+20221128.8ec8e01:
- sbd-inquisitor: fail startup if pacemaker integration is disabled while SBD_SYNC_RESOURCE_STARTUP is conflicting (bsc#1204319)
- sbd-inquisitor: do not warn about startup syncing if pacemaker integration is even intentionally disabled (bsc#1204319)
- sbd-inquisitor: log a warning if SBD_PACEMAKER is overridden by -P or -PP option (bsc#1204319)
- sbd-inquisitor: ensure a log info only tells the fact about how SBD_PACEMAKER is set (bsc#1204319)
- Rebase:
* bsc#1180966-0001-Log-sbd-inquisitor-downgrade-the-warning-about-SBD_S.patch
-------------------------------------------------------------------
Fri Sep 09 07:39:28 UTC 2022 - Yan Gao <ygao@suse.com>
- Update to version 1.5.1+20220716.c43276f:
- Be a bit more descriptive on issues opening watchdog-devices
- test: a few tweaks regarding setup of test-environment
-------------------------------------------------------------------
Mon Dec 13 14:47:20 UTC 2021 - Yan Gao <ygao@suse.com>
- Update to version 1.5.1+20211210.92ff8d8:
- configure: have --with-runstatedir overrule --runstatedir (bsc#1185182)
-------------------------------------------------------------------
Mon Dec 6 15:35:16 UTC 2021 - Yan Gao <ygao@suse.com>
- services: enable systemd sandboxing settings for releases >= 15.4
-------------------------------------------------------------------
Thu Nov 25 09:03:29 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
- Added hardening to systemd service(s) (bsc#1181400). Added patch(es):
* harden_sbd.service.patch
* harden_sbd_remote.service.patch
-------------------------------------------------------------------
Tue Nov 16 06:50:12 UTC 2021 - Yan Gao <ygao@suse.com>
- Update to version 1.5.1+20211116.6bb085f (v1.5.1):
- configure: validate configure options for paths (bsc#1185182)
- man: refer to the modern run state directory `/run` if appropriate (bsc#1185182)
- configure: add --with-runstatedir option (bsc#1185182)
-------------------------------------------------------------------
Tue Oct 19 13:23:13 UTC 2021 - Yan Gao <ygao@suse.com>
- Update to version 1.5.0+20211005.5ed9fd2:
- sbd-md: properly destroy io-context
- sbd-md: properly free one-time-allocations of sector-buffers
- avoid using deprecated valloc & frequent aligned alloc
-------------------------------------------------------------------
Thu Aug 12 15:48:03 UTC 2021 - Yan Gao <ygao@suse.com>
- Update to version 1.5.0+20210720.f4ca41f:
- sbd-inquisitor: Implement default delay start for diskless sbd (bsc#1189398)
- sbd-inquisitor: Sanitize numeric arguments
-------------------------------------------------------------------
Thu Aug 12 15:28:38 UTC 2021 - Yan Gao <ygao@suse.com>
- Update to version 1.5.0+20210629.1c72cf2:
- sbd-inquisitor: tolerate and strip any leading spaces of command line option values (bsc#1187547)
- sbd-inquisitor: tell the actual watchdog device specified with `-w` (bsc#1187547)
-------------------------------------------------------------------
Thu Aug 12 13:47:25 UTC 2021 - Yan Gao <ygao@suse.com>
- Update to version 1.5.0+20210614.d7f447d (v1.5.0):
- spec, configure.ac: default to resource-syncing with pacemaker
-------------------------------------------------------------------
Mon May 3 11:45:21 UTC 2021 - Peter Varkoly <varkoly@suse.com>
- Deprecated path "/var/run/" used in systemd-services (bsc#1185182)
-------------------------------------------------------------------
Tue Mar 09 11:48:15 UTC 2021 - Yan Gao <ygao@suse.com>
- 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 <ygao@suse.com>
- 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 <ygao@suse.com>
- 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)
-------------------------------------------------------------------
Fri Jan 29 13:19:29 UTC 2021 - Yan Gao <ygao@suse.com>
- sbd-inquisitor: downgrade the warning about SBD_SYNC_RESOURCE_STARTUP to notice (bsc#1180966)
* bsc#1180966-0001-Log-sbd-inquisitor-downgrade-the-warning-about-SBD_S.patch
-------------------------------------------------------------------
Fri Jan 29 10:57:17 UTC 2021 - Yan Gao <ygao@suse.com>
- Update to version 1.4.2+20210129.5e2100f:
- Doc: adapt description of startup/shutdown sync with pacemaker
-------------------------------------------------------------------
Thu Jan 21 12:30:37 UTC 2021 - Yan Gao <ygao@suse.com>
- Update to version 1.4.2+20201214.01c18c7:
- sbd-inquisitor: check SBD_SYNC_RESOURCE_STARTUP only in watch mode (bsc#1180966)
-------------------------------------------------------------------
Fri Dec 04 10:43:43 UTC 2020 - Yan Gao <ygao@suse.com>
- Update to version 1.4.2+20201202.0446439 (v1.4.2):
- ship sbd.pc with basic sbd build information for downstream packages to use
-------------------------------------------------------------------
Tue Nov 10 17:01:53 UTC 2020 - Yan Gao <ygao@suse.com>
- Update to version 1.4.1+20201105.507bd5f:
- sbd: inform the user to restart the sbd service (bsc#1179655)
-------------------------------------------------------------------
Fri Oct 30 16:02:05 UTC 2020 - Franck Bui <fbui@suse.com>
- Update the uses of the systemd rpm macros
* use '%service_del_postun_without_restart' instead of '%service_del_postun -n'
* drop use of '%service_del_preun -n' as '-n' is unsafe and is deprecated
This part still needs to be reworked as leaving services running why their
package has been removed is unsafe.
-------------------------------------------------------------------
Thu Aug 27 16:11:49 UTC 2020 - Yan Gao <ygao@suse.com>
- Update to version 1.4.1+20200819.4a02ef2:
- sbd-pacemaker: stay with basic string handling
- build: use configure for watchdog-default-timeout & others
-------------------------------------------------------------------
Thu Aug 27 15:56:10 UTC 2020 - Yan Gao <ygao@suse.com>
- Update to version 1.4.1+20200807.7c21899:
- sbd-inquisitor: refuse to start if any of the configured device names is invalid (bsc#1174915)
-------------------------------------------------------------------
Thu Aug 27 15:52:34 UTC 2020 - Yan Gao <ygao@suse.com>
- Update to version 1.4.1+20200727.1117c6b:
- make syncing of pacemaker resource startup configurable
- sbd-pacemaker: sync with pacemakerd for robustness
-------------------------------------------------------------------
Thu Aug 27 15:50:38 UTC 2020 - Yan Gao <ygao@suse.com>
- Update to version 1.4.1+20200727.971affb:
- sbd-cluster: match qdevice-sync_timeout against wd-timeout
- Rebase:
* bsc#1140065-Fix-sbd-cluster-exit-if-cmap-is-disconnected.patch
-------------------------------------------------------------------
Thu Aug 27 15:49:06 UTC 2020 - Yan Gao <ygao@suse.com>
- Update to version 1.4.1+20200624.cee826a:
- sbd-pacemaker: handle new no_quorum_demote (rh#1850078)
-------------------------------------------------------------------
Mon Aug 03 16:46:25 UTC 2020 - Yan Gao <ygao@suse.com>
- Update to version 1.4.1+20200306.9571749:
- scheduling: overhaul the whole thing (bsc#1143064)
-------------------------------------------------------------------
Mon Aug 03 16:05:11 UTC 2020 - Yan Gao <ygao@suse.com>
- Update to version 1.4.1+20200130.7e958a9:
- Doc: add environment section to man-page
-------------------------------------------------------------------
Mon Jan 13 15:30:49 UTC 2020 - Yan Gao <ygao@suse.com>
- Update to version 1.4.1+20200113.4b617a1:
- agent: correctly compare string values when calculating timeout (bsc#1148236)
-------------------------------------------------------------------
Mon Jan 13 15:11:24 UTC 2020 - Yan Gao <ygao@suse.com>
- Update to version sbd-1.4.1+20191119.25fce8a (v1.4.1):
- regressions.sh: relaxed timeouts for tests under load
-------------------------------------------------------------------
Wed Oct 30 16:16:31 UTC 2019 - Yan Gao <ygao@suse.com>
- Update to version 1.4.0+20191029.695f9ca:
- tests: add regression-tests using preload-library
- tests: added preload-library for reboot interception
-------------------------------------------------------------------
Wed Oct 30 16:14:40 UTC 2019 - Yan Gao <ygao@suse.com>
- Update to version 1.4.0+20191028.3f01a1d:
- spec: add devel package
-------------------------------------------------------------------
Wed Oct 30 14:30:59 UTC 2019 - Yan Gao <ygao@suse.com>
- Update to version 1.4.0+20191028.d937f9d:
- sbd-inquisitor: use crashdump timeout
- Build: switch back to serial test-harness
- Doc: mention crashdump message in usage note
- defaults: make 15s timeout default for s390 consistently
- cmdline: just use SBD_DEVICE if no devs from cmdline
-------------------------------------------------------------------
Mon Oct 28 11:01:45 UTC 2019 - Yan Gao <ygao@suse.com>
- 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
-------------------------------------------------------------------
Tue Jul 02 15:26:03 UTC 2019 - Yan Gao <ygao@suse.com>
- Update to version 1.4.0+20190612.398628b:
- sbd-cluster: periodically check corosync-daemon liveness
- sbd-pacemaker: assume graceful exit if leftovers are unmanged
- sbd-common: query rt-budget > 0 otherwise try moving to root-slice (bsc#1143064)
- Rebase:
* bsc#1140065-Fix-sbd-cluster-exit-if-cmap-is-disconnected.patch
-------------------------------------------------------------------
Tue Jul 2 14:38:08 UTC 2019 - jtomasiak@suse.com
- sbd-cluster: Fix 100% CPU usage when CMAP connection is lost (bsc#1140065, SOC-8774)
* bsc#1140065-Fix-sbd-cluster-exit-if-cmap-is-disconnected.patch
-------------------------------------------------------------------
Tue May 14 12:09:07 UTC 2019 - Yan Gao <ygao@suse.com>
- Update to version 1.4.0+20190514.e9be8d9:
- sbd-inquisitor: Avoid flooding logs with messages that hint the default/configured timeout action (bsc#1134496)
-------------------------------------------------------------------
Tue Apr 30 09:57:01 UTC 2019 - Yan Gao <ygao@suse.com>
- Update to version 1.4.0+20190416.5e3283c:
- sbd-inquisitor: overhaul device-list-parser
- sbd-inquisitor: free timeout action on bail out
- sbd-md: prevent unrealistic overflow on sector io calc
-------------------------------------------------------------------
Tue Apr 2 10:24:42 UTC 2019 - Yan Gao <ygao@suse.com>
- Update to version 1.4.0+20190326.c38c5e6:
- sbd-pacemaker: bail out of status earlier
- sbd-pacemaker: make handling of cib-connection loss more robust
-------------------------------------------------------------------
Mon Mar 11 16:43:07 UTC 2019 - Yan Gao <ygao@suse.com>
- Update to version 1.4.0+20190311.0159a3c:
- sbd-cluster: finalize cmap connection if disconnected from cluster (bsc#1128059)
-------------------------------------------------------------------
Tue Feb 12 14:05:52 UTC 2019 - ygao@suse.com
- Update to version 1.4.0+20190201.f949aa8:
- fail earlier on invalid servants
-------------------------------------------------------------------
Thu Jan 24 13:14:37 UTC 2019 - ygao@suse.com
- Update to version 1.4.0+20190123.1829c40:
- sbd.sysconfig: watchdog timeout set in the on-disk metadata takes precedence
- sbd.8.pod: use the generic term "cluster services" instead of the specific "openais" (bsc#1112918)
-------------------------------------------------------------------
Thu Jan 17 14:36:27 UTC 2019 - ygao@suse.com
- Update to version 1.4.0+20190114.7f33d1a (v1.4.0)
-------------------------------------------------------------------
Wed Jan 9 16:27:08 UTC 2019 - ygao@suse.com
- Update to version 1.3.1+20181218.dbae8ab:
- make timeout-action executed by sbd configurable
- use pacemaker's new pe api with constructors/destructors
-------------------------------------------------------------------
Thu Oct 4 08:53:37 UTC 2018 - ygao@suse.com
- Update to version 1.3.1+20180920.bf16663:
- sbd-common: avoid statting potential links
- sbd-inquisitor: SBD_DELAY_START can be configured with a delay value (bsc#1107321)
- sbd-common: don't follow symlinks outside /dev for watchdog
-------------------------------------------------------------------
Fri Jul 27 10:57:42 UTC 2018 - ygao@suse.com
- Update to version 1.3.1+20180703.f95b98e (bsc#1102930)
-------------------------------------------------------------------
Tue May 8 10:15:09 UTC 2018 - ygao@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 - ygao@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)
-------------------------------------------------------------------
Sat Mar 17 08:44:16 UTC 2018 - ygao@suse.com
- Update to version 1.3.1+20180316.8873890:
- Fix: add Documentation value to systemd services
-------------------------------------------------------------------
Tue Mar 13 19:12:53 UTC 2018 - ygao@suse.com
- Update to version 1.3.1+20180313.fe5fe1d:
- Build: sbd-pacemaker: Query CIB directly with the API instead of get_cib_copy() (bsc#1084689)
-------------------------------------------------------------------
Mon Feb 5 20:29:02 UTC 2018 - jengelh@inai.de
- Combine %service_* calls to reduce amount of generated code.
- Use %make_install, and make sure directories are owned.
-------------------------------------------------------------------
Mon Feb 5 09:55:36 UTC 2018 - ygao@suse.com
- Update to version 1.3.1+20180202.cc3e4cb:
- Doc: sbd.8.pod: add sections for query-watchdog & test-watchdog
- sbd-md: dump_headers returns 0 even open_device failed (bsc#1079316)
-------------------------------------------------------------------
Sat Dec 23 10:43:18 UTC 2017 - ygao@suse.com
- Update to version 1.3.1+20171220.1e93740:
- Fix: systemd: make pacemaker & dlm wait for sbd-start to complete (bsc#1108393)
- Doc: sbd.sysconfig: mention timeout caveat with SBD_DELAY_START (bsc#1074038)
-------------------------------------------------------------------
Fri Dec 01 12:11:02 UTC 2017 - ygao@suse.com
- Update to version 1.3.1+20171130.ecbdf9c:
- Build: cluster-servant: Compile with pacemaker-2.0
-------------------------------------------------------------------
Wed Nov 29 16:13:41 UTC 2017 - ygao@suse.com
- Fix: build error with glibc 2.25
- Fix: gcc format string error
- Upstream version cs: a7a7d792b9922f19bbace276c8a154e157a4f99c
-------------------------------------------------------------------
Thu Nov 23 13:48:57 UTC 2017 - rbrown@suse.com
- Replace references to /var/adm/fillup-templates with new
%_fillupdir macro (boo#1069468)
-------------------------------------------------------------------
Fri Nov 3 17:30:25 UTC 2017 - ygao@suse.com
- Bump to 1.3.1
- Add commands to test/query watchdogs
- Upstream version cs: a74b4d25a3eb93fe1abbe6e3ebfd2b16cf48873f (v1.3.1)
-------------------------------------------------------------------
Fri Nov 3 17:22:22 UTC 2017 - ygao@suse.com
- man: Call "-P" option "Pacemaker integration" in the description (bsc#1033600)
- sbd-inquisitor: Do not use watchdog if the conflicting options "-W" and "-w /dev/null" are both supplied (bsc#1047376)
* Drop bug-1047376_sbd-not-use-watchdog-conflicting-options.patch which has been merged upstream
- sbd-inquisitor: Enable pacemaker integration by default as advertised in sysconfig.sbd (bsc#1046421, bsc#1033600)
* Drop bug-1046421_sbd-enable-pacemaker-integration-by-default.patch which has been merged upstream
- sbd-inquisitor: Respect the obsolete option SBD_WATCHDOG for backward compatibility (bsc#1047372)
* Drop bug-1047372_sbd-SBD_WATCHDOG-compatibility.patch which has been merged upstream
- Upstream version cs: 681ce1acbda12754eb97fb91f9a7306ff368452f
-------------------------------------------------------------------
Fri Nov 3 17:17:22 UTC 2017 - ygao@suse.com
- cluster-servant: check for corosync 2Node mode
- disk-servant: signal reset request via exit-code
- improve reboot after sysrq_trigger
- Upstream version cs: 8a0800cc906d7bb8f8ac0d5664bdf691b2ca7690
-------------------------------------------------------------------
Fri Jul 21 09:06:51 UTC 2017 - ygao@suse.com
- Fix node name parameter in manpage (bsc#963674)
- Don't reboot if off is requested
- sbd-inquisitor: cleanup_servant_by_pid() should be static
* Drop sbd-cleanup_servant_by_pid-static.patch which has been merged upstream
- sbd.sh: Use a more obvious variable on parsing devices (bsc#1033934)
- sbd-inquisitor: Do not create duplicate servants (bsc#1033934, bsc#1065748)
- sbd-inquisitor: Correctly look up servant by device name (bsc#1033934, bsc#1065748)
- Upstream version cs: 11262fbc80364f2993a9876a2be82f4170c41e4e
-------------------------------------------------------------------
Tue Jul 4 18:13:16 UTC 2017 - ygao@suse.com
- sbd-inquisitor: Do not use watchdog if the conflicting options "-W" and "-w /dev/null" are both supplied (bsc#1047376)
* bug-1047376_sbd-not-use-watchdog-conflicting-options.patch
- sbd-inquisitor: Enable pacemaker integration by default as advertised in sysconfig.sbd (bsc#1046421, bsc#1033600)
* bug-1046421_sbd-enable-pacemaker-integration-by-default.patch
- sbd-inquisitor: Respect the obsolete option SBD_WATCHDOG for backward compatibility (bsc#1047372)
* bug-1047372_sbd-SBD_WATCHDOG-compatibility.patch
-------------------------------------------------------------------
Fri Jun 2 09:37:38 UTC 2017 - ygao@suse.com
- sbd-inquisitor: cleanup_servant_by_pid() should be static
* sbd-cleanup_servant_by_pid-static.patch
- sbd.sh: Correctly handle SBD_DELAY_START for multiple SBD devices (bsc#1033934)
- sbd.sh: consistent use of SBD_BIN (bsc#1033934)
- Upstream version cs: a0bc43b17fcb997fe4c09731db2126ab350cfb50
-------------------------------------------------------------------
Wed May 31 12:17:20 UTC 2017 - ygao@suse.com
- Update to v1.3.0
- spec: Do not automatically try to restart sbd.service on update (bsc#1033934)
- Upstream version cs: 4968e9c8602fbb990bed63cc96ca18f62e2181db (v1.3.0)
-------------------------------------------------------------------
Mon Mar 6 14:41:52 UTC 2017 - ygao@suse.com
- 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 - ygao@suse.com
- 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
-------------------------------------------------------------------
Wed Aug 31 15:56:53 UTC 2016 - ygao@suse.com
- man: Update man page to use pcmk_delay_max over start-delay (bsc#993032)
* bug-993032_sbd-man-pcmk_delay_max.patch
-------------------------------------------------------------------
Wed Jul 20 16:25:24 UTC 2016 - ygao@suse.com
- spec: Update the Url of the project
-------------------------------------------------------------------
Thu Jun 30 09:25:47 UTC 2016 - tchvatal@suse.com
- Cleanup a bit with spec-cleaner
- Use pgkconfig dependencies (and only those that are really needed)
- Remove systemd conditions as the only distro versions we build
against have systemd
- Disable the werror cflags addition, we always build without it
distro wide
-------------------------------------------------------------------
Tue May 17 10:59:18 UTC 2016 - kgronlund@suse.com
- Update to version 1.2.1.git.1463482437.d6bd23a:
* Add support for diskless sbd mode
- Remove outdated patches:
* Remove sbd-pacemaker.patch
* Remove sbd-configure-libcoroipcc.patch
* Remove bug-950415_sbd-pacemaker-segfault.patch
-------------------------------------------------------------------
Tue Jan 19 16:56:56 UTC 2016 - ygao@suse.com
- systemd: Provide sbd_remote.service file for pacemaker remote nodes (bsc#962287)
-------------------------------------------------------------------
Thu Oct 15 14:34:21 UTC 2015 - ygao@suse.com
- pacemaker: Prevent potential segfault caused by use-of-NULL on checking node state (bsc#950415)
* bug-950415_sbd-pacemaker-segfault.patch
-------------------------------------------------------------------
Wed Jun 24 12:03:54 UTC 2015 - lmb@suse.com
- Trigger rebuild of sbd against more recent pacemaker packages (no code
change) (bnc#934919)
-------------------------------------------------------------------
Fri Sep 5 08:17:05 UTC 2014 - lmb@suse.com
- Update to version 1.2.1.git.1409904429.39dee2a:
+ Medium: adjust timeout for s390(x) to be compatible with vmwatchdog (bnc#895103)
-------------------------------------------------------------------
Fri Aug 15 14:16:49 UTC 2014 - lmb@suse.com
- Update to version 1.2.1.git.1408100832.f0a4a63:
+ systemd: Start sbd before corosync instead of pacemaker (bnc#892078)
+ systemd: allow delaying start of post-sbd units (bnc#888935)
- Update _service file.
-------------------------------------------------------------------
Thu Jun 12 14:09:10 UTC 2014 - lmb@suse.com
- Add _service to pull from latest git.
-------------------------------------------------------------------
Thu Jun 5 15:06:08 UTC 2014 - lmb@suse.com
- pacemaker: improve XML performance and avoid crash with pacemaker >=
1.1.12 (bnc#881231)
- man: correct syntax in example for the CIB configuration
- cs: 6f717f5
-------------------------------------------------------------------
Fri May 23 09:24:06 UTC 2014 - jsegitz@novell.com
- added necessary macros for systemd files
-------------------------------------------------------------------
Thu Mar 27 14:12:30 UTC 2014 - lmb@suse.com
- sbd: Allow the watchdog to be explicitly disabled (bnc#865365)
- rpm: use the short git hash in the changelog from now on.
- cs: b96ac28
-------------------------------------------------------------------
Thu Mar 27 08:10:46 UTC 2014 - lmb@suse.com
- systemd: ensure that sbd is activated after systemd module loading and
the iSCSI initator (bnc#869612)
- Start-up: make sbd wait a configurable amount of time for devices to
appear on boot (bnc#869612)
- Downgrade the logging during the initial wait to a debug log to avoid
log flooding.
- cs: 512b71dc209744e505bf62d7ccddb70854fe7407
-------------------------------------------------------------------
Thu Oct 10 09:12:41 UTC 2013 - lmb@suse.com
- systemd support
- /etc/sysconfig/sbd template added
- sbd: Add -p option to specify a pidfile
- sbd-pacemaker: detect whether to run the AIS plugin quorum check at
runtime
- cs: d7df351e09f903be79495dbe312cf670f1747ef2
-------------------------------------------------------------------
Tue Oct 1 08:26:51 UTC 2013 - lmb@suse.com
- License update in source files and spec file
- agent: detect if the stonith-timeout is too low (bnc#841010)
- agent: auto-correct pacemaker configuration if a too short timeout is
detected. This can be disabled using the timeout_bypass option.
(bnc#841010)
- man: explain why stonith-timeout needs to be larger than msgwait
- Drop fix-check-lib-lib-order.patch: merged upstream
- cs: 3757c4f6bc80146077cb2e019537c44d288f414d
-------------------------------------------------------------------
Fri Sep 13 09:04:57 UTC 2013 - lmb@suse.com
- Add copyright comment to spec file.
-------------------------------------------------------------------
Tue Jul 30 12:27:15 UTC 2013 - ygao@suse.com
- Added sbd-pacemaker.patch: Remove use of ais_fd_sync which only exists
in corosync-1.x-based pacemaker plugin
- Added sbd-configure-libcoroipcc.patch: No longer check libcoroipcc
when configuring
- Added add-explicit-libs.patch: add explicit libraries to build
process.
-------------------------------------------------------------------
Thu Jul 4 10:28:24 UTC 2013 - lmb@suse.com
- sbd-pacemaker: Improve performance
- sbd-pacemaker: handle transient failures of the CIB update processing
- sbd-pacemaker: Log two more cases where pacemaker state could become
unhealthy
- Bump version number to 1.2.0
- cs: ffca2d93872b81f8b10ef1164c024005576afd4b
-------------------------------------------------------------------
Fri Jun 28 10:42:14 UTC 2013 - lmb@suse.com
- sbd-pacemaker: update to support build with pacemaker-1.1.10
-------------------------------------------------------------------
Wed May 22 04:33:24 UTC 2013 - tserong@suse.com
- Fix library link order, add required libraries explicitly
+ fix-check-lib-lib-order.patch
+ add-explicit-libs.patch
-------------------------------------------------------------------
Mon Mar 25 13:04:43 UTC 2013 - lmb@suse.com
- Introduce -S option to prevent automatic start if the node was
previously fenced (bnc#812195)
- Reduce number of scenarios where usage help is printed (bnc#812191)
- cs: 1837fd8cc64a
-------------------------------------------------------------------
Wed Feb 27 10:28:24 UTC 2013 - lmb@suse.com
- Introduce minor header version and add a UUID (bnc#804991)
- Add debug mode level 3 to allow logs to flush, but do actually
reboot.
- cs: 9641481ebc9b
-------------------------------------------------------------------
Thu Nov 22 15:37:44 UTC 2012 - lmb@novell.com
- Failure to set watchdog interval is now fatal (bnc#790894)
- cs: d262617db1eb
-------------------------------------------------------------------
Thu Nov 15 16:37:23 UTC 2012 - lmb@novell.com
- Upstream merge of compatibility changes for pacemaker 1.1.8
- cs: 52ddf89aa96b
-------------------------------------------------------------------
Mon Oct 22 18:46:51 UTC 2012 - ygao@suse.com
- Changes for being compatible with pacemaker >= 1.1.8
-------------------------------------------------------------------
Fri Sep 28 10:00:48 UTC 2012 - lmb@novell.com
- Increase sbd's scheduling priority to the maximum (bnc#779259)
- Print proper defaults for -t/-F in sbd help (manpage was already
correct)
- cs: 6689be9d3aec
-------------------------------------------------------------------
Mon Jun 18 11:31:44 UTC 2012 - lmb@novell.com
- Remove explicit conflict with cluster-glue.
-------------------------------------------------------------------
Mon Jun 18 10:10:11 UTC 2012 - lmb@novell.com
- Include a man page for the sbd command.
- Conflict with older versions of ClusterTools2 due to a file
conflict.
- cs: 3a371cd0f200
-------------------------------------------------------------------
Tue Jun 12 10:07:05 UTC 2012 - lmb@novell.com
- cs: 68e33d323c6e
- Include more detail on the result of failed async IO in log
- Fix access to unallocated memory in servant
-------------------------------------------------------------------
Wed May 30 13:23:47 UTC 2012 - lmb@novell.com
- cs: 7d7e0803def7
- Log once if pacemaker state prevented self-fence due to lost device
majority
- Build using autoconf/autotool
-------------------------------------------------------------------
Tue May 29 13:14:43 UTC 2012 - lmb@novell.com
- cs: d7c676111472
- Make write IO asynchronous as well.
- Ensure that each mbox will only be zeroed once.
- Initialize sysrq and enable reboot/poweroff flags.
- Unify async IO read/write paths.
-------------------------------------------------------------------
Fri May 25 11:46:29 UTC 2012 - lmb@novell.com
- Make the code compile on SP1 too, though AIS integration is not
available there.
-------------------------------------------------------------------
Fri May 25 10:29:39 UTC 2012 - lmb@novell.com
- cs: dcf1f404b6b7
- Refresh pacemaker state once per second instead of only on CIB update
- Pacemaker state will only be accepted if it is fresh enough
- Refetch the full CIB periodically to notice stalls on notifications
- Request quorum state also from corosync/AIS, not just the CIB
-------------------------------------------------------------------
Thu May 24 15:29:48 UTC 2012 - lmb@novell.com
- cs: 1cd63d9a962d
- Servants should only be considered live if reporting within
timeout_io, not timeout_watchdog
- Successful delivery should not be logged at ERROR severity
-------------------------------------------------------------------
Thu May 24 07:54:43 UTC 2012 - lmb@novell.com
- cs: 01b157f5cfee
- Ensure that sbd latency does not turn negative and thus would cause an
unnecessary self-fence.
- Drop conflict with older version of cluster-glue; file level conflict
is sufficient.
-------------------------------------------------------------------
Tue May 22 20:08:10 UTC 2012 - lmb@novell.com
- cs: 7379080b64ea
- Take pacemaker quorum and node state into account for
fencing decision (FATE#310625, bnc#767293)
- Adjust sbd servant restart intervals
- Allow setting a different watchdog timeout before crashdump
(bnc#762300)
- Handle loss of connection to the CIB process properly
- Split sbd off cluster-glue
- Limit number of no restart messages printed (bnc#753559)
- Actually don't restart servants if restart limit reached
- Add debug mode via -Z commandline switch (bnc#753559)
- Fix allocation in the face of failures (bnc#753559)
- handle stuck IO better by explicitly informing our parent
738295)
- Make servant restart logic more robust and verbose (bnc#738295)
- Make sure the restart limit set to zero works (bnc#738295)
- Use async io for reads (bnc#738295)
- Skip missing/broken devices during list/dump (bnc#761797)
- Add strategic log messages for debuggability

168
sbd.spec Normal file
View File

@ -0,0 +1,168 @@
#
# spec file for package sbd
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2013 Lars Marowsky-Bree
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif
%ifarch s390x s390
# minimum timeout on LPAR diag288 watchdog is 15s
%global watchdog_timeout_default 15
%else
%global watchdog_timeout_default 5
%endif
# Be careful with sync_resource_startup_default
# being enabled. This configuration has
# to be in sync with configuration in pacemaker
# where it is called sbd_sync - assure by e.g.
# mutual rpm dependencies.
%bcond_without sync_resource_startup_default
# Syncing enabled per default will lead to
# syncing enabled on upgrade without adaption
# of the config.
# Setting can still be overruled via sysconfig.
# The setting in the config-template packaged
# will follow the default if below is is left
# empty. But it is possible to have the setting
# in the config-template deviate from the default
# by setting below to an explicit 'yes' or 'no'.
%global sync_resource_startup_sysconfig ""
Name: sbd
Version: 1.5.2+20230316.5ec38cf
Release: 0
Summary: Storage-based death
License: GPL-2.0-or-later
Group: Productivity/Clustering/HA
URL: https://github.com/ClusterLabs/sbd
Source: %{name}-%{version}.tar.xz
Patch1: bsc#1140065-Fix-sbd-cluster-exit-if-cmap-is-disconnected.patch
Patch2: bsc#1180966-0001-Log-sbd-inquisitor-downgrade-the-warning-about-SBD_S.patch
Patch3: harden_sbd.service.patch
Patch4: harden_sbd_remote.service.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: e2fsprogs-devel
BuildRequires: libaio-devel
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(corosync)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libqb)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(pacemaker)
BuildRequires: pkgconfig(pacemaker-cib)
BuildRequires: pkgconfig(uuid)
Requires(post): %fillup_prereq
Conflicts: ClusterTools2 < 2.3.2
Conflicts: libpacemaker3 < 2.1.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
%description
This package contains the storage-based death functionality.
%package devel
Summary: Storage-based death environment for regression tests
Group: Productivity/Clustering/HA
Requires: %{name} = %{version}-%{release}
%description devel
This package provides an environment + testscripts for
regression-testing sbd.
%prep
%autosetup -n %{name}-%{version} -p1
%build
./autogen.sh
%configure --with-watchdog-timeout-default=%{watchdog_timeout_default} \
--with-sync-resource-startup-default=%{?with_sync_resource_startup_default:yes}%{!?with_sync_resource_startup_default:no} \
--with-sync-resource-startup-sysconfig=%{sync_resource_startup_sysconfig} \
--with-runstatedir=%{_rundir}
make %{?_smp_mflags}
# Avoid "Unknown key name 'XXX' in section 'Service', ignoring." warnings from systemd on older releases
%if 0%{?sle_version} < 150400
sed -r -i '/^(Protect(Home|Hostname|KernelLogs|KernelModules|System))=/d' \
src/sbd.service src/sbd_remote.service
%endif
%install
%make_install LIBDIR=%{_libdir}
install -D -m 0755 src/sbd.sh %{buildroot}%{_datadir}/sbd/sbd.sh
install -D -m 0755 tests/regressions.sh %{buildroot}%{_datadir}/sbd/regressions.sh
install -D -m 0644 src/sbd.service %{buildroot}/%{_unitdir}/sbd.service
install -D -m 0644 src/sbd_remote.service %{buildroot}/%{_unitdir}/sbd_remote.service
ln -s service %{buildroot}%{_sbindir}/rcsbd
ln -s service %{buildroot}%{_sbindir}/rcsbd_remote
mkdir -p %{buildroot}%{_fillupdir}
install -m 0644 src/sbd.sysconfig %{buildroot}%{_fillupdir}/sysconfig.sbd
# Don't package static libs
find %{buildroot} -type f -name "*.a" -delete -print
find %{buildroot} -type f -name "*.la" -delete -print
%post
%service_add_post sbd.service sbd_remote.service
if [ ! -e %{_sysconfdir}/sysconfig/sbd ]; then
%fillup_only sbd
fi
%pre
%service_add_pre sbd.service sbd_remote.service
%preun
if [ $1 -eq 0 ]; then
systemctl disable sbd.service sbd_remote.service
fi
%postun
%service_del_postun_without_restart sbd.service sbd_remote.service
%post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_libdir}/stonith/
%{_sbindir}/sbd
%{_sbindir}/rcsbd
%{_sbindir}/rcsbd_remote
%{_datadir}/sbd
%{_datadir}/pkgconfig/sbd.pc
%exclude %{_datadir}/sbd/regressions.sh
%{_mandir}/man8/sbd*
%{_unitdir}/sbd.service
%{_unitdir}/sbd_remote.service
%{_fillupdir}/sysconfig.sbd
%license COPYING
%files devel
%defattr(-,root,root)
%dir %{_datadir}/sbd
%{_datadir}/sbd/regressions.sh
%{_libdir}/libsbdtestbed*
%license COPYING
%changelog