[packages/dlm] Use reboot by default instead of own hacks
jajcus
jajcus at pld-linux.org
Tue Nov 6 17:34:13 CET 2012
commit bdb4b5934681c264b74346e84eb4d7cb9655fb4a
Author: Jacek Konieczny <jajcus at jajcus.net>
Date: Tue Nov 6 17:32:01 2012 +0100
Use reboot by default instead of own hacks
The default behaviour of dlm_stonith has been changed upstream
from 'poweroff' to 'reboot'. I don't think the symlink hack is
needed any more (does anybody need dlm fencing by power-off?)
Pulling the upstream patch instead.
Release: 5
dlm.spec | 7 ++-----
dlm_stonith-reboot.patch | 24 ++++++++++++++++++++++++
dlm_stonith_reboot.patch | 32 --------------------------------
3 files changed, 26 insertions(+), 37 deletions(-)
---
diff --git a/dlm.spec b/dlm.spec
index 7a4ada2..39b59bb 100644
--- a/dlm.spec
+++ b/dlm.spec
@@ -5,7 +5,7 @@ Summary: General-purpose distributed lock manager
Summary(pl.UTF-8): Zarządca rozproszonych blokad ogólnego przeznaczenia
Name: dlm
Version: 3.99.5
-Release: 4
+Release: 5
License: LGPL v2.1+, GPL v2
Group: Libraries
Source0: http://people.redhat.com/teigland/%{name}-%{version}.tar.gz
@@ -20,7 +20,7 @@ Patch2: %{name}_stonith-build.patch
Patch3: %{name}-mem_init.patch
Patch4: %{name}-signals.patch
Patch5: 0003-dlm_controld-remove-fence_all-from-cli.patch
-Patch6: dlm_stonith_reboot.patch
+Patch6: dlm_stonith-reboot.patch
Patch7: dlm-startup_notify.patch
URL: http://sources.redhat.com/cluster/dlm/
BuildRequires: corosync-devel >= 2.0
@@ -126,9 +126,6 @@ install -d $RPM_BUILD_ROOT{%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}} \
LIBDIR=%{_libdir} \
MANDIR=%{_mandir} \
HDRDIR=%{_includedir}
-
-ln -s dlm_stonith $RPM_BUILD_ROOT%{_sbindir}/dlm_stonith_reboot
-ln -s dlm_stonith $RPM_BUILD_ROOT%{_sbindir}/dlm_stonith_off
%endif
install init/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}
diff --git a/dlm_stonith-reboot.patch b/dlm_stonith-reboot.patch
new file mode 100644
index 0000000..1892f97
--- /dev/null
+++ b/dlm_stonith-reboot.patch
@@ -0,0 +1,24 @@
+commit de04b4e0fa5c6908e3a3d78028e6066a176f80f0
+Author: David Teigland <teigland at redhat.com>
+Date: Mon Nov 5 14:53:23 2012 -0600
+
+ stonith-helper: use reboot instead of off
+
+ That 0 means reboot was verified by
+ Jacek Konieczny <jajcus at jajcus.net>
+
+ Signed-off-by: David Teigland <teigland at redhat.com>
+
+diff --git a/fence/stonith_helper.c b/fence/stonith_helper.c
+index 5b384c1..32d2c0d 100644
+--- a/fence/stonith_helper.c
++++ b/fence/stonith_helper.c
+@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
+ if (t >= fail_time)
+ return 0;
+
+- rv = stonith_api_kick_helper(nodeid, 300, 1);
++ rv = stonith_api_kick_helper(nodeid, 300, 0);
+ if (rv) {
+ fprintf(stderr, "kick_helper error %d nodeid %d\n", rv, nodeid);
+ openlog("stonith_helper", LOG_CONS | LOG_PID, LOG_DAEMON);
diff --git a/dlm_stonith_reboot.patch b/dlm_stonith_reboot.patch
deleted file mode 100644
index 0e14cd3..0000000
--- a/dlm_stonith_reboot.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -dur dlm-3.99.5.orig/fence/stonith_helper.c dlm-3.99.5/fence/stonith_helper.c
---- dlm-3.99.5.orig/fence/stonith_helper.c 2012-11-02 09:29:05.000000000 +0100
-+++ dlm-3.99.5/fence/stonith_helper.c 2012-11-02 09:28:51.000000000 +0100
-@@ -16,6 +16,7 @@
-
- int nodeid;
- uint64_t fail_time;
-+int turn_off=1;
-
- #define MAX_ARG_LEN 1024
-
-@@ -26,6 +27,11 @@
- char val[MAX_ARG_LEN];
- char c;
- int rv;
-+ int arg0_l;
-+
-+ arg0_l = strlen(argv[0]);
-+ if (arg0_l>7 && !strcmp(argv[0] + arg0_l - 7, "_reboot")) turn_off=0;
-+ else if (arg0_l>4 && !strcmp(argv[0] + arg0_l - 4, "_off")) turn_off=1;
-
- if (argc > 1) {
- while ((c = getopt(argc, argv, "n:t:")) != -1) {
-@@ -77,7 +83,7 @@
- if (t >= fail_time)
- return 0;
-
-- rv = stonith_api_kick_helper(nodeid, 300, 1);
-+ rv = stonith_api_kick_helper(nodeid, 300, turn_off);
- if (rv) {
- fprintf(stderr, "kick_helper error %d nodeid %d\n", rv, nodeid);
- openlog("stonith_helper", LOG_CONS | LOG_PID, LOG_DAEMON);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dlm.git/commitdiff/bdb4b5934681c264b74346e84eb4d7cb9655fb4a
More information about the pld-cvs-commit
mailing list