From 76130e97313d5df78115e74cccde84b27b7ea3d27718599233ab551b8e061e5f Mon Sep 17 00:00:00 2001 From: Yan Gao Date: Sun, 29 May 2016 21:17:56 +0000 Subject: [PATCH] Accepting request 398795 from home:yan_gao:branches:network:ha-clustering:Factory:Test - controld: Prevent unwanted self-fencing if "stateful_merge_wait" state of dlm is not available (bsc#977201) * bug-977201_pacemaker-controld-self-fencing.patch - libservices: clean up non-signalfd code paths - spec: fence_pcmk only eligible for Pacemaker+CMAN - crmd: Acknowledge cancellation operations for remote connection resources (bsc#976865) - controld: improve DLM check with stateful_merge_wait (bsc#977201) - attrd, libcrmcommon: validate attrd requests better - crmd: clear remote node transient attributes on disconnect - Revert "Fix: attrd: Correctly implement mass removal of a node's attributes" - crm_mon: Fix time formatting on x32 - resources: use OCF version tagging correctly - libcommon: crm_procfs_pid_of() would always return last /proc entry checked - crmd: correctly dig into cib-query-answer if alerts section is present timestamp-format defaults to "%H:%M:%S.%06N" - crmd: Take start-delay into account for the timeout of the action timer (bsc#977258) - libservices: make systemd override file world-readable to avoid log warning - libcrmcommon: correct directory name in log message - Log: make crmd messages more user-friendly - Log: make messages in common quorum/fencing situations more user-friendly - Log: make shutdown messages more user-friendly - pengine: lf#2560/lf#2588 - Correctly set the environment variable "OCF_RESKEY_CRM_meta_timeout" when "start-delay" is configured (bsc#977258) - Log: make operation messages more user-friendly - Log: make startup messages more user-friendly - services: Correctly clean up service actions for non-dbus case - uninitialized use of nano_digits - attrd: Update also dampens when synchronizing attributes (bsc#977846) - Upstream version cs: 389294fd1ebefddad67fff51306f585b758ca860 OBS-URL: https://build.opensuse.org/request/show/398795 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=244 --- _service | 2 +- ...7201_pacemaker-controld-self-fencing.patch | 25 +++++++++ pacemaker-1.1.14+git20160503.9e38256.tar.bz2 | 3 -- pacemaker-1.1.14+git20160527.389294f.tar.bz2 | 3 ++ pacemaker.changes | 34 ++++++++++++ pacemaker.spec | 54 +++++++++++++------ 6 files changed, 101 insertions(+), 20 deletions(-) create mode 100644 bug-977201_pacemaker-controld-self-fencing.patch delete mode 100644 pacemaker-1.1.14+git20160503.9e38256.tar.bz2 create mode 100644 pacemaker-1.1.14+git20160527.389294f.tar.bz2 diff --git a/_service b/_service index 77fc896..0f52122 100644 --- a/_service +++ b/_service @@ -11,7 +11,7 @@ 1.1.14 --> 1.1.14+git%cd.%h - 9e382568ac3cd54c222496501088ab3fc158b2e2 + 389294fd1ebefddad67fff51306f585b758ca860 diff --git a/bug-977201_pacemaker-controld-self-fencing.patch b/bug-977201_pacemaker-controld-self-fencing.patch new file mode 100644 index 0000000..ea5a55c --- /dev/null +++ b/bug-977201_pacemaker-controld-self-fencing.patch @@ -0,0 +1,25 @@ +commit f61b9889cd169ce2c715a5cc4808321977432ec0 +Author: Gao,Yan +Date: Sun May 29 20:31:25 2016 +0200 + + Fix: controld: Prevent unwanted self-fencing if "stateful_merge_wait" state of dlm is not available + +diff --git a/extra/resources/controld b/extra/resources/controld +index 7d75319..908e2ca 100644 +--- a/extra/resources/controld ++++ b/extra/resources/controld +@@ -229,13 +229,9 @@ controld_monitor() { + + case $rc in + 0) smw=$(dlm_tool status -v | grep "stateful_merge_wait=" | cut -d= -f2) +- if [ $smw -eq 1 ]; then ++ if [ "$smw" = "1" ]; then + ocf_log err "DLM status is: stateful_merge_wait" + rc=$OCF_ERR_GENERIC +- elif [ -z "$smw" ] && dlm_tool ls | grep -q "wait fencing" && \ +- ! stonith_admin -H -V | grep -q "wishes to"; then +- ocf_log err "DLM status is: wait fencing" +- rc=$OCF_ERR_GENERIC + else + rc=$OCF_SUCCESS + fi diff --git a/pacemaker-1.1.14+git20160503.9e38256.tar.bz2 b/pacemaker-1.1.14+git20160503.9e38256.tar.bz2 deleted file mode 100644 index 33cb5b8..0000000 --- a/pacemaker-1.1.14+git20160503.9e38256.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0f9efc1ed281dd8911aca9073cda8e521571be20152693413ca0d1c5aa7851db -size 3815605 diff --git a/pacemaker-1.1.14+git20160527.389294f.tar.bz2 b/pacemaker-1.1.14+git20160527.389294f.tar.bz2 new file mode 100644 index 0000000..f944576 --- /dev/null +++ b/pacemaker-1.1.14+git20160527.389294f.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d0c26d5c57607cf4368187f4b68e0e3549085305baa4c1c69ccb452ff06701e +size 3820078 diff --git a/pacemaker.changes b/pacemaker.changes index c0a08f1..5d1d118 100644 --- a/pacemaker.changes +++ b/pacemaker.changes @@ -1,3 +1,37 @@ +------------------------------------------------------------------- +Sun May 29 20:06:12 UTC 2016 - ygao@suse.com + +- controld: Prevent unwanted self-fencing if "stateful_merge_wait" state of dlm is not available (bsc#977201) + * bug-977201_pacemaker-controld-self-fencing.patch + +------------------------------------------------------------------- +Sun May 29 14:44:18 UTC 2016 - ygao@suse.com + +- libservices: clean up non-signalfd code paths +- spec: fence_pcmk only eligible for Pacemaker+CMAN +- crmd: Acknowledge cancellation operations for remote connection resources (bsc#976865) +- controld: improve DLM check with stateful_merge_wait (bsc#977201) +- attrd, libcrmcommon: validate attrd requests better +- crmd: clear remote node transient attributes on disconnect +- Revert "Fix: attrd: Correctly implement mass removal of a node's attributes" +- crm_mon: Fix time formatting on x32 +- resources: use OCF version tagging correctly +- libcommon: crm_procfs_pid_of() would always return last /proc entry checked +- crmd: correctly dig into cib-query-answer if alerts section is present timestamp-format defaults to "%H:%M:%S.%06N" +- crmd: Take start-delay into account for the timeout of the action timer (bsc#977258) +- libservices: make systemd override file world-readable to avoid log warning +- libcrmcommon: correct directory name in log message +- Log: make crmd messages more user-friendly +- Log: make messages in common quorum/fencing situations more user-friendly +- Log: make shutdown messages more user-friendly +- pengine: lf#2560/lf#2588 - Correctly set the environment variable "OCF_RESKEY_CRM_meta_timeout" when "start-delay" is configured (bsc#977258) +- Log: make operation messages more user-friendly +- Log: make startup messages more user-friendly +- services: Correctly clean up service actions for non-dbus case +- uninitialized use of nano_digits +- attrd: Update also dampens when synchronizing attributes (bsc#977846) +- Upstream version cs: 389294fd1ebefddad67fff51306f585b758ca860 + ------------------------------------------------------------------- Wed May 4 10:38:16 UTC 2016 - ygao@suse.com diff --git a/pacemaker.spec b/pacemaker.spec index 2d46bb5..9b3c6a7 100644 --- a/pacemaker.spec +++ b/pacemaker.spec @@ -21,7 +21,7 @@ %global pcmk_docdir %{_docdir}/%{name} %global specversion 1 -%global pcmkversion 1.1.14+git20160503.9e38256 +%global pcmkversion 1.1.14+git20160527.389294f # set following to the actual commit or, for final release, concatenate # "pcmkversion" macro to "Pacemaker-" (will yield a tag per the convention) %global commit HEAD @@ -44,9 +44,19 @@ %global cs_version 2 # It has to be eventually decided whether to use Python2 or Python3 %global py_site %{?python_sitearch}%{!?python_sitearch:%(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%global cman_native 0%{?el6} || (0%{?fedora} > 0 && 0%{?fedora} < 17) -# https://fedoraproject.org/wiki/EPEL:Packaging?rd=Packaging:EPEL#The_.25license_tag -%{!?_licensedir:%global license %doc} +# It's desired to apply "license" macro uniformly in "files" sections below, +# but RPM versions not aware of this new classification normally (re)define it +# to the value of "License:", so following is to ensure the macro definition +# is per expectation only after that tag; solution courtesy of Jason Tibbitts: +# https://pkgs.fedoraproject.org/cgit/rpms/epel-rpm-macros.git/tree/macros.zzz-epel?h=el6&id=e1adcb77b0c05a6c29bc0eb0c4e82113180a0a99#n12 +%if !%{defined _licensedir} +%define description %{lua: + rpm.define("license %doc") + print("%description") +} +%endif # Conditionals # Invoke "rpmbuild --without " or "rpmbuild --with " @@ -144,6 +154,7 @@ Patch5: pacemaker-nagios-plugin-dir.patch Patch6: bug-812269_pacemaker-fencing-device-register-messages.patch Patch7: pacemaker-Wno-format-signedness.patch Patch8: bug-943295_pacemaker-lrmd-log-notice.patch +Patch9: bug-977201_pacemaker-controld-self-fencing.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: pacemaker-ticket-support = 2.0 Conflicts: heartbeat < 3.0 @@ -224,20 +235,11 @@ BuildRequires: openssl-devel BuildRequires: pkgconfig(systemd) -%if %{with cman} - -%if 0%{?fedora} > 0 -%if 0%{?fedora} < 17 +%if %{with cman} && %{cman_native} BuildRequires: clusterlib-devel -%endif -%endif - -%if 0%{?rhel} > 0 -%if 0%{?rhel} < 7 -BuildRequires: clusterlib-devel -%endif -%endif - +# pacemaker initscript: cman initscript, fence_tool (+ some soft-dependencies) +# "post" scriptlet: ccs_update_schema +Requires: cman %endif %if %with_corosync_support @@ -438,6 +440,7 @@ manager for Corosync, CMAN and/or Linux-HA. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 # Force the local time # @@ -528,6 +531,11 @@ rm -f %{buildroot}/%{_libdir}/service_crm.so rm -f %{buildroot}/%{_initrddir}/pacemaker rm -f %{buildroot}/%{_initrddir}/pacemaker_remote +# Don't ship fence_pcmk where it has no use +%if %{without cman} +rm -f %{buildroot}/%{_sbindir}/fence_pcmk +%endif + ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcpacemaker ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcpacemaker_remote ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rccrm_mon @@ -606,6 +614,12 @@ fi %post /sbin/chkconfig --add pacemaker || : +%if %{with cman} && %{cman_native} +# make fence_pcmk in cluster.conf valid instantly otherwise tools like ccs may +# choke (until schema gets auto-regenerated on the next start of cluster), +# per the protocol shared with other packages contributing to cluster.rng +/usr/sbin/ccs_update_schema >/dev/null 2>&1 || : +%endif %preun /sbin/service pacemaker stop || : @@ -687,17 +701,23 @@ fi %{_sbindir}/crm_node %{_sbindir}/fence_legacy +%if %{with cman} %{_sbindir}/fence_pcmk +%endif %{_sbindir}/stonith_admin %doc %{_mandir}/man7/crmd.* %doc %{_mandir}/man7/pengine.* %doc %{_mandir}/man7/stonithd.* +%if %{without cman} || !%{cman_native} %doc %{_mandir}/man7/ocf_pacemaker_controld.* +%endif %doc %{_mandir}/man7/ocf_pacemaker_o2cb.* %doc %{_mandir}/man7/ocf_pacemaker_remote.* %doc %{_mandir}/man8/crm_node.* +%if %{with cman} %doc %{_mandir}/man8/fence_pcmk.* +%endif %doc %{_mandir}/man8/fence_legacy.* %doc %{_mandir}/man8/pacemakerd.* %doc %{_mandir}/man8/stonith_admin.* @@ -709,7 +729,9 @@ fi %dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/cib %dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/pengine +%if %{without cman} || !%{cman_native} /usr/lib/ocf/resource.d/pacemaker/controld +%endif /usr/lib/ocf/resource.d/pacemaker/o2cb /usr/lib/ocf/resource.d/pacemaker/remote /usr/lib/ocf/resource.d/.isolation