Backport the version from rhel 7.1
This commit is contained in:
parent
92127984a1
commit
536b24b699
4
.gitignore
vendored
4
.gitignore
vendored
@ -1 +1,5 @@
|
|||||||
/sbd-8f91294574f0d4b51cd73b1d12ae0f8b30418a28.tar.gz
|
/sbd-8f91294574f0d4b51cd73b1d12ae0f8b30418a28.tar.gz
|
||||||
|
/sbd-872e82f39db02eab3527ecfa392b1a930dd1964b.tar.gz
|
||||||
|
/sbd-50b123355ea46a640a8a5177443d73d7e7c8fa2c.tar.gz
|
||||||
|
/sbd-7c8871796d5e2ede32430a15558e7dff47bbece8.tar.gz
|
||||||
|
/sbd-1ee3503cbc52b73876b6aae5471d3b6f7c092bf5.tar.gz
|
||||||
|
BIN
sbd-1.2.1-0.2.8f91294.git.fc22.src.rpm
Normal file
BIN
sbd-1.2.1-0.2.8f91294.git.fc22.src.rpm
Normal file
Binary file not shown.
28
sbd-local-debug.patch
Normal file
28
sbd-local-debug.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
commit 617e138b4c3786208238a43ef2ff6e9543535161
|
||||||
|
Author: Andrew Beekhof <andrew@beekhof.net>
|
||||||
|
Date: Fri Oct 24 11:13:14 2014 +1100
|
||||||
|
|
||||||
|
Correctly turn on just sbd's debug logging
|
||||||
|
|
||||||
|
diff --git a/src/sbd-inquisitor.c b/src/sbd-inquisitor.c
|
||||||
|
index 61ee8be..6f7d3e4 100644
|
||||||
|
--- a/src/sbd-inquisitor.c
|
||||||
|
+++ b/src/sbd-inquisitor.c
|
||||||
|
@@ -805,14 +805,15 @@ int main(int argc, char **argv, char **envp)
|
||||||
|
case 'v':
|
||||||
|
debug++;
|
||||||
|
if(debug == 1) {
|
||||||
|
- qb_log_filter_ctl(QB_LOG_SYSLOG, QB_LOG_FILTER_ADD, QB_LOG_FILTER_FILE, "sbd-*", LOG_DEBUG);
|
||||||
|
- qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_ADD, QB_LOG_FILTER_FILE, "sbd-*", LOG_DEBUG);
|
||||||
|
+ qb_log_filter_ctl(QB_LOG_SYSLOG, QB_LOG_FILTER_ADD, QB_LOG_FILTER_FILE, "sbd-common.c,sbd-inquisitor.c,sbd-md.c,sbd-pacemaker.c", LOG_DEBUG);
|
||||||
|
+ qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_ADD, QB_LOG_FILTER_FILE, "sbd-common.c,sbd-inquisitor.c,sbd-md.c,sbd-pacemaker.c", LOG_DEBUG);
|
||||||
|
cl_log(LOG_INFO, "Verbose mode enabled.");
|
||||||
|
|
||||||
|
} else if(debug == 2) {
|
||||||
|
/* Go nuts, turn on pacemaker's logging too */
|
||||||
|
qb_log_filter_ctl(QB_LOG_SYSLOG, QB_LOG_FILTER_ADD, QB_LOG_FILTER_FILE, "*", LOG_DEBUG);
|
||||||
|
qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_ADD, QB_LOG_FILTER_FILE, "*", LOG_DEBUG);
|
||||||
|
+ cl_log(LOG_INFO, "Verbose library mode enabled.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'T':
|
17
sbd-no-storage-option.patch
Normal file
17
sbd-no-storage-option.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
diff --git a/src/sbd.sysconfig b/src/sbd.sysconfig
|
||||||
|
index 9ac2d15..f5b0b8c 100644
|
||||||
|
--- a/src/sbd.sysconfig
|
||||||
|
+++ b/src/sbd.sysconfig
|
||||||
|
@@ -1,12 +1,3 @@
|
||||||
|
-## Type: string
|
||||||
|
-## Default: ""
|
||||||
|
-#
|
||||||
|
-# SBD_DEVICE specifies the devices to use for exchanging sbd messages
|
||||||
|
-# and to monitor. If specifying more than one path, use ";" as
|
||||||
|
-# separator.
|
||||||
|
-#
|
||||||
|
-#SBD_DEVICE=""
|
||||||
|
-
|
||||||
|
## Type: yesno
|
||||||
|
## Default: yes
|
||||||
|
#
|
45
sbd-pcmk-health.patch
Normal file
45
sbd-pcmk-health.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
commit bfc01977f7413977c51f15f61fef801d2bf9c5f9
|
||||||
|
Author: Andrew Beekhof <andrew@beekhof.net>
|
||||||
|
Date: Fri Oct 24 12:03:41 2014 +1100
|
||||||
|
|
||||||
|
Repair startup when no disks are present
|
||||||
|
|
||||||
|
diff --git a/src/sbd-pacemaker.c b/src/sbd-pacemaker.c
|
||||||
|
index f62d728..7296ad2 100644
|
||||||
|
--- a/src/sbd-pacemaker.c
|
||||||
|
+++ b/src/sbd-pacemaker.c
|
||||||
|
@@ -104,7 +104,8 @@ static int check_ais = 0;
|
||||||
|
cl_log(lvl, fmt, ##args); \
|
||||||
|
last_state = state; \
|
||||||
|
} \
|
||||||
|
- } while(0)
|
||||||
|
+ healthy = state; \
|
||||||
|
+ } while(0)
|
||||||
|
|
||||||
|
static cib_t *cib = NULL;
|
||||||
|
static xmlNode *current_cib = NULL;
|
||||||
|
@@ -300,7 +301,6 @@ compute_status(pe_working_set_t * data_set)
|
||||||
|
|
||||||
|
if (data_set->dc_node == NULL) {
|
||||||
|
LOGONCE(pcmk_health_transient, LOG_INFO, "We don't have a DC right now.");
|
||||||
|
- healthy = 2;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -325,13 +325,13 @@ compute_status(pe_working_set_t * data_set)
|
||||||
|
LOGONCE(pcmk_health_online, LOG_INFO, "Node state: online");
|
||||||
|
ever_had_quorum = TRUE;
|
||||||
|
|
||||||
|
- } else if(ever_had_quorum == FALSE) {
|
||||||
|
- LOGONCE(pcmk_health_transient, LOG_INFO, "We do not have quorum yet");
|
||||||
|
-
|
||||||
|
} else if(servant_count > 0) {
|
||||||
|
LOGONCE(pcmk_health_noquorum, LOG_WARNING, "Quorum lost");
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
+ } else if(ever_had_quorum == FALSE) {
|
||||||
|
+ LOGONCE(pcmk_health_online, LOG_INFO, "We do not have quorum yet");
|
||||||
|
+
|
||||||
|
} else {
|
||||||
|
/* We lost quorum, and there are no disks present
|
||||||
|
* Setting healthy > 2 here will result in us self-fencing
|
28
sbd-proc-pid.patch
Normal file
28
sbd-proc-pid.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
commit d172f2bb9e6e530039df3a001b9ce3eb76dc4a75
|
||||||
|
Author: Andrew Beekhof <andrew@beekhof.net>
|
||||||
|
Date: Mon Oct 27 10:28:51 2014 +1100
|
||||||
|
|
||||||
|
Correctly enable /proc/pid validation in sbd_lock_running()
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index ec7fced..540fd57 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -78,9 +78,17 @@ DISK=0
|
||||||
|
if test "x${enable_shared_disk}" != xno ; then
|
||||||
|
DISK=1
|
||||||
|
fi
|
||||||
|
+
|
||||||
|
AC_DEFINE_UNQUOTED(SUPPORT_SHARED_DISK, $DISK, Turn on functionality that requires shared disk)
|
||||||
|
AM_CONDITIONAL(SUPPORT_SHARED_DISK, test "$DISK" = "1")
|
||||||
|
|
||||||
|
+if
|
||||||
|
+ test -e /proc/$$
|
||||||
|
+then
|
||||||
|
+ echo "/proc/{pid} is supported"
|
||||||
|
+ AC_DEFINE_UNQUOTED(HAVE_PROC_PID, 1, Define to 1 if /proc/{pid} is supported.)
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
dnl **********************************************************************
|
||||||
|
dnl Check for various argv[] replacing functions on various OSs
|
||||||
|
dnl
|
36
sbd.spec
36
sbd.spec
@ -15,18 +15,19 @@
|
|||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
%global commit 8f91294574f0d4b51cd73b1d12ae0f8b30418a28
|
%global commit 1ee3503cbc52b73876b6aae5471d3b6f7c092bf5
|
||||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||||
%global github_owner beekhof
|
%global github_owner beekhof
|
||||||
|
%global buildnum 1
|
||||||
|
|
||||||
Name: sbd
|
Name: sbd
|
||||||
Summary: Storage-based death
|
Summary: Storage-based death
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Version: 1.2.1
|
Version: 1.2.1
|
||||||
Release: 0.2.%{shortcommit}.git%{?dist}
|
#Release: 0.%{buildnum}.%{shortcommit}.git%{?dist}
|
||||||
Url: https://github.com/l-mb/sbd
|
Release: %{buildnum}
|
||||||
|
Url: https://github.com/%{github_owner}/%{name}
|
||||||
Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
|
Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -41,6 +42,14 @@ BuildRequires: libuuid-devel
|
|||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
|
Patch1: sbd-no-storage-option.patch
|
||||||
|
Patch2: sbd-local-debug.patch
|
||||||
|
Patch3: sbd-pcmk-health.patch
|
||||||
|
Patch4: sbd-proc-pid.patch
|
||||||
|
|
||||||
|
%if 0%{?rhel} > 0
|
||||||
|
ExclusiveArch: i686 x86_64 s390x
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{defined systemd_requires}
|
%if %{defined systemd_requires}
|
||||||
%systemd_requires
|
%systemd_requires
|
||||||
@ -49,11 +58,13 @@ BuildRequires: python-devel
|
|||||||
%description
|
%description
|
||||||
|
|
||||||
This package contains the storage-based death functionality.
|
This package contains the storage-based death functionality.
|
||||||
|
Currently it is limited to watchdog integration.
|
||||||
|
|
||||||
|
###########################################################
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
###########################################################
|
%autosetup -n %{name}-%{commit} -p1
|
||||||
# %setup -n sbd-%{version} -q
|
|
||||||
%setup -q -n %{name}-%{commit}
|
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -61,15 +72,14 @@ autoreconf -i
|
|||||||
export CFLAGS="$RPM_OPT_FLAGS -Wall -Werror"
|
export CFLAGS="$RPM_OPT_FLAGS -Wall -Werror"
|
||||||
%configure
|
%configure
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
||||||
%install
|
%install
|
||||||
###########################################################
|
|
||||||
|
|
||||||
make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
|
make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
|
||||||
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/stonith
|
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/stonith
|
||||||
|
|
||||||
install -D -m 0755 src/sbd.sh $RPM_BUILD_ROOT/usr/share/sbd/sbd.sh
|
|
||||||
%if %{defined _unitdir}
|
%if %{defined _unitdir}
|
||||||
install -D -m 0644 src/sbd.service $RPM_BUILD_ROOT/%{_unitdir}/sbd.service
|
install -D -m 0644 src/sbd.service $RPM_BUILD_ROOT/%{_unitdir}/sbd.service
|
||||||
%endif
|
%endif
|
||||||
@ -77,6 +87,8 @@ install -D -m 0644 src/sbd.service $RPM_BUILD_ROOT/%{_unitdir}/sbd.service
|
|||||||
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
|
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
|
||||||
install -m 644 src/sbd.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/sbd
|
install -m 644 src/sbd.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/sbd
|
||||||
|
|
||||||
|
###########################################################
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
@ -96,7 +108,6 @@ rm -rf %{buildroot}
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/sbd
|
%config(noreplace) %{_sysconfdir}/sysconfig/sbd
|
||||||
%{_sbindir}/sbd
|
%{_sbindir}/sbd
|
||||||
%{_datadir}/sbd
|
|
||||||
%doc %{_mandir}/man8/sbd*
|
%doc %{_mandir}/man8/sbd*
|
||||||
%if %{defined _unitdir}
|
%if %{defined _unitdir}
|
||||||
%{_unitdir}/sbd.service
|
%{_unitdir}/sbd.service
|
||||||
@ -104,8 +115,13 @@ rm -rf %{buildroot}
|
|||||||
%doc COPYING
|
%doc COPYING
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 30 2014 <andrew@beekhof.net> - 1.2.1-1
|
||||||
|
- Correctly enable /proc/pid validation for sbd_lock_running()
|
||||||
|
- Improved integration with the el7 environment
|
||||||
|
|
||||||
* Fri Aug 29 2014 <andrew@beekhof.net> - 1.2.1-0.2.8f912945.git
|
* Fri Aug 29 2014 <andrew@beekhof.net> - 1.2.1-0.2.8f912945.git
|
||||||
- Remove some additional SUSE-isms
|
- Remove some additional SUSE-isms
|
||||||
|
|
||||||
* Fri Aug 29 2014 <andrew@beekhof.net> - 1.2.1-0.1.8f912945.git
|
* Fri Aug 29 2014 <andrew@beekhof.net> - 1.2.1-0.1.8f912945.git
|
||||||
- Prepare for package review
|
- Prepare for package review
|
||||||
|
Resolves: rhbz#1134245
|
||||||
|
Loading…
Reference in New Issue
Block a user