]> git.pld-linux.org Git - packages/dlm.git/commitdiff
Use reboot by default instead of own hacks auto/th/dlm-3.99.5-5
authorJacek Konieczny <jajcus@jajcus.net>
Tue, 6 Nov 2012 16:32:01 +0000 (17:32 +0100)
committerJacek Konieczny <jajcus@jajcus.net>
Tue, 6 Nov 2012 16:32:34 +0000 (17:32 +0100)
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
dlm_stonith-reboot.patch [new file with mode: 0644]
dlm_stonith_reboot.patch [deleted file]

index 7a4ada2c700acb2085bc5ede2b65da85eb3b8d2f..39b59bb19a2a511334ab22d55a84b97ab0f5eb75 100644 (file)
--- 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 (file)
index 0000000..1892f97
--- /dev/null
@@ -0,0 +1,24 @@
+commit de04b4e0fa5c6908e3a3d78028e6066a176f80f0
+Author: David Teigland <teigland@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@jajcus.net>
+    
+    Signed-off-by: David Teigland <teigland@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 (file)
index 0e14cd3..0000000
+++ /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);
This page took 0.102633 seconds and 4 git commands to generate.