diff --git a/.gitignore b/.gitignore index 54d2a6e..b1f7159 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/sanlock-3.2.4.tar.gz +SOURCES/sanlock-3.4.0.tar.gz diff --git a/.sanlock.metadata b/.sanlock.metadata index 8c02e8f..90c1236 100644 --- a/.sanlock.metadata +++ b/.sanlock.metadata @@ -1 +1 @@ -14f977ac7fecefc843a133ad95138fce2abba922 SOURCES/sanlock-3.2.4.tar.gz +59399a1f9e302cef3cf72759a504dc896d22cbc5 SOURCES/sanlock-3.4.0.tar.gz diff --git a/SOURCES/0001-wdmd-prevent-probe-while-watchdog-is-used.patch b/SOURCES/0001-wdmd-prevent-probe-while-watchdog-is-used.patch deleted file mode 100644 index a31d4d0..0000000 --- a/SOURCES/0001-wdmd-prevent-probe-while-watchdog-is-used.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 7e43623a8ccf59411e4a43d5aff48d9326fbed26 Mon Sep 17 00:00:00 2001 -From: David Teigland -Date: Wed, 18 Nov 2015 13:50:21 -0600 -Subject: [PATCH] wdmd: prevent probe while watchdog is used - -If the wdmd daemon is killed uncleanly, /dev/watchdog -is closed uncleanly and the watchdog should fire to -reset the machine. - -If 'wdmd -p' is run to probe available watchdog devices -after wdmd is killed and before the machine is reset, -it will unintentionally interfere with the expiring -watchdog by doing open/magic-close on each device. -This silently prevents the watchdog from firing when -it should. - -The probe function can check for the shm flag before -touching any watchdog devices, just like another wdmd -daemon process does, to avoid interfering with the -watchdog state of a previous wdmd daemon that was -terminated uncleanly. ---- - wdmd/main.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/wdmd/main.c b/wdmd/main.c -index c29667f4a10b..911d8330e84e 100644 ---- a/wdmd/main.c -+++ b/wdmd/main.c -@@ -1604,7 +1604,18 @@ int main(int argc, char *argv[]) - } - - if (do_probe) { -+ rv = setup_shm(); -+ if (rv < 0) { -+ fprintf(stderr, "cannot probe watchdog devices while wdmd is in use.\n"); -+ openlog("wdmd-probe", LOG_CONS | LOG_PID, LOG_DAEMON); -+ syslog(LOG_ERR, "cannot probe watchdog devices while wdmd is in use.\n"); -+ exit(EXIT_FAILURE); -+ } -+ - rv = probe_watchdog(); -+ -+ close_shm(); -+ - if (rv < 0) - exit(EXIT_FAILURE); - else --- -1.8.3.1 - diff --git a/SPECS/sanlock.spec b/SPECS/sanlock.spec index 8b48678..2e524f0 100644 --- a/SPECS/sanlock.spec +++ b/SPECS/sanlock.spec @@ -4,15 +4,9 @@ %define with_systemd 1 %endif -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 -%define with_systemd_macros 1 -%else -%define with_systemd_macros 0 -%endif - Name: sanlock -Version: 3.2.4 -Release: 2%{?dist} +Version: 3.4.0 +Release: 1%{?dist} Summary: A shared storage lock manager Group: System Environment/Base @@ -35,14 +29,14 @@ Requires(postun): systemd-units %endif Source0: http://git.fedorahosted.org/cgit/sanlock.git/snapshot/%{name}-%{version}.tar.gz -Patch0: 0001-wdmd-prevent-probe-while-watchdog-is-used.patch +# Patch0: 0001-foo.patch %description The sanlock daemon manages leases for applications on hosts using shared storage. %prep %setup -q -%patch0 -p1 -b .0001-wdmd-prevent-probe-while-watchdog-is-used.patch +# %patch0 -p1 -b .0001-foo.patch %build # upstream does not require configure @@ -73,10 +67,9 @@ make -C reset \ %if %{with_systemd} -install -D -m 0755 init.d/sanlock $RPM_BUILD_ROOT/usr/lib/systemd/systemd-sanlock -install -D -m 0644 init.d/sanlock.service $RPM_BUILD_ROOT/%{_unitdir}/sanlock.service +install -D -m 0644 init.d/sanlock.service.native $RPM_BUILD_ROOT/%{_unitdir}/sanlock.service install -D -m 0755 init.d/wdmd $RPM_BUILD_ROOT/usr/lib/systemd/systemd-wdmd -install -D -m 0644 init.d/wdmd.service $RPM_BUILD_ROOT/%{_unitdir}/wdmd.service +install -D -m 0644 init.d/wdmd.service.native $RPM_BUILD_ROOT/%{_unitdir}/wdmd.service install -D -m 0755 init.d/fence_sanlockd $RPM_BUILD_ROOT/usr/lib/systemd/systemd-fence_sanlockd install -D -m 0644 init.d/fence_sanlockd.service $RPM_BUILD_ROOT/%{_unitdir}/fence_sanlockd.service install -D -m 0644 init.d/sanlk-resetd.service $RPM_BUILD_ROOT/%{_unitdir}/sanlk-resetd.service @@ -92,9 +85,6 @@ install -D -m 0644 src/logrotate.sanlock \ install -D -m 0644 src/sanlock.conf \ $RPM_BUILD_ROOT/etc/sanlock/sanlock.conf -install -D -m 0644 init.d/sanlock.sysconfig \ - $RPM_BUILD_ROOT/etc/sysconfig/sanlock - install -D -m 0644 init.d/wdmd.sysconfig \ $RPM_BUILD_ROOT/etc/sysconfig/wdmd @@ -117,65 +107,22 @@ getent passwd sanlock > /dev/null || /usr/sbin/useradd \ %post %if %{with_systemd} -%if %{with_systemd_macros} %systemd_post wdmd.service sanlock.service -%else -if [ $1 -eq 1 ] ; then - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi -%endif -%else -if [ $1 -eq 1 ] ; then - /sbin/chkconfig --add sanlock - /sbin/chkconfig --add wdmd -fi %endif %preun %if %{with_systemd} -%if %{with_systemd_macros} -%systemd_preun sanlock.service -%systemd_preun wdmd.service -%else -if [ $1 = 0 ]; then - /bin/systemctl --no-reload disable sanlock.service > /dev/null 2>&1 || : - /bin/systemctl stop sanlock.service > /dev/null 2>&1 || : - /bin/systemctl --no-reload disable wdmd.service > /dev/null 2>&1 || : - /bin/systemctl stop wdmd.service > /dev/null 2>&1 || : -fi -%endif -%else -if [ $1 = 0 ]; then - /sbin/service sanlock stop > /dev/null 2>&1 - /sbin/chkconfig --del sanlock - /sbin/service wdmd stop > /dev/null 2>&1 - /sbin/chkconfig --del wdmd -fi +%systemd_preun wdmd.service sanlock.service %endif %postun %if %{with_systemd} -%if %{with_systemd_macros} -%systemd_postun_with_restart sanlock.service -%systemd_postun_with_restart wdmd.service -%else -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - /bin/systemctl try-restart sanlock.service >/dev/null 2>&1 || : - /bin/systemctl try-restart wdmd.service >/dev/null 2>&1 || : -fi -%endif -%else -if [ $1 -ge 1 ] ; then - /sbin/service sanlock condrestart >/dev/null 2>&1 || : - /sbin/service wdmd condrestart >/dev/null 2>&1 || : -fi +%systemd_postun %endif %files %defattr(-,root,root,-) %if %{with_systemd} -/usr/lib/systemd/systemd-sanlock /usr/lib/systemd/systemd-wdmd %{_unitdir}/sanlock.service %{_unitdir}/wdmd.service @@ -192,10 +139,10 @@ fi %{_mandir}/man8/sanlock* %config(noreplace) %{_sysconfdir}/logrotate.d/sanlock %config(noreplace) %{_sysconfdir}/sanlock/sanlock.conf -%config(noreplace) %{_sysconfdir}/sysconfig/sanlock %config(noreplace) %{_sysconfdir}/sysconfig/wdmd -%doc init.d/sanlock.service.native -%doc init.d/wdmd.service.native +%doc init.d/sanlock +%doc init.d/sanlock.service +%doc init.d/wdmd.service %package lib Summary: A shared storage lock manager library @@ -286,7 +233,6 @@ if [ $1 -eq 1 ] ; then %else /sbin/chkconfig --add fence_sanlockd %endif -ccs_update_schema > /dev/null 2>&1 ||: fi %preun -n fence-sanlock @@ -333,6 +279,12 @@ common sanlock lockspace. %changelog +* Fri Jun 10 2016 David Teigland - 3.4.0-1 +- Update to sanlock-3.4.0 + +* Mon Feb 22 2016 David Teigland - 3.3.0-1 +- Update to sanlock-3.3.0 + * Tue Dec 01 2015 David Teigland - 3.2.4-2 - wdmd: prevent probe while watchdog is used