Accepting request 483190 from network:ha-clustering:Factory

1

OBS-URL: https://build.opensuse.org/request/show/483190
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pacemaker?expand=0&rev=107
This commit is contained in:
Yuchen Lin 2017-04-11 10:39:38 +00:00 committed by Git OBS Bridge
commit 8f5a75fb03
9 changed files with 231 additions and 22 deletions

View File

@ -11,7 +11,7 @@
<param name="version">1.1.16</param> <param name="version">1.1.16</param>
--> -->
<param name="versionformat">1.1.16+git%cd.%h</param> <param name="versionformat">1.1.16+git%cd.%h</param>
<param name="revision">a7825f4f0a8db272d1ce0b1f93e8044cbcaa5144</param> <param name="revision">77ea74d01bcb6b7100e1c7acab0e66e79aceaf8b</param>
</service> </service>
<service name="recompress" mode="disabled"> <service name="recompress" mode="disabled">

View File

@ -1,4 +1,4 @@
From ab4df57e195486ee651f56793470d421233a0896 Mon Sep 17 00:00:00 2001 From b8d5e3eec6ade13af37cf4a8f5a08c3488585f68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se> From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se>
Date: Thu, 2 Feb 2017 09:06:00 +0100 Date: Thu, 2 Feb 2017 09:06:00 +0100
Subject: [PATCH] Medium: NodeUtilization: Add NodeUtilization agent Subject: [PATCH] Medium: NodeUtilization: Add NodeUtilization agent
@ -24,7 +24,7 @@ diff --git a/extra/resources/Makefile.am b/extra/resources/Makefile.am
diff --git a/extra/resources/NodeUtilization b/extra/resources/NodeUtilization diff --git a/extra/resources/NodeUtilization b/extra/resources/NodeUtilization
new file mode 100644 new file mode 100644
index 0000000..da5fb56 index 0000000..b9c737e
--- /dev/null --- /dev/null
+++ b/extra/resources/NodeUtilization +++ b/extra/resources/NodeUtilization
@@ -0,0 +1,224 @@ @@ -0,0 +1,224 @@

View File

@ -0,0 +1,66 @@
From 25264762338c210e865b3531baa33705c40e7ea9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se>
Date: Wed, 15 Mar 2017 13:30:19 +0100
Subject: [PATCH] NodeUtilization: Fix mixed indentation, set executable bit
---
extra/resources/NodeUtilization | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
mode change 100644 => 100755 extra/resources/NodeUtilization
diff --git a/extra/resources/NodeUtilization b/extra/resources/NodeUtilization
old mode 100644
new mode 100755
index b9c737e..f246010
--- a/extra/resources/NodeUtilization
+++ b/extra/resources/NodeUtilization
@@ -173,7 +173,7 @@ END
}
NodeUtilization_start() {
- ha_pseudo_resource $statefile start
+ ha_pseudo_resource $statefile start
if ! ocf_is_true "$OCF_RESKEY_dynamic"; then
if ! set_utilization; then
exit $OCF_ERR_GENERIC
@@ -183,25 +183,25 @@ NodeUtilization_start() {
}
NodeUtilization_stop() {
- ha_pseudo_resource $statefile stop
+ ha_pseudo_resource $statefile stop
exit $OCF_SUCCESS
}
NodeUtilization_monitor() {
- local rc
- ha_pseudo_resource $statefile monitor
- rc=$?
-
- case $rc in
- $OCF_SUCCESS)
- if ocf_is_true "$OCF_RESKEY_dynamic"; then
- if ! set_utilization; then
- exit $OCF_ERR_GENERIC
- fi
- fi
- ;;
- *) exit $rc;;
- esac
+ local rc
+ ha_pseudo_resource $statefile monitor
+ rc=$?
+
+ case $rc in
+ $OCF_SUCCESS)
+ if ocf_is_true "$OCF_RESKEY_dynamic"; then
+ if ! set_utilization; then
+ exit $OCF_ERR_GENERIC
+ fi
+ fi
+ ;;
+ *) exit $rc;;
+ esac
}
NodeUtilization_validate() {

View File

@ -0,0 +1,22 @@
From a678ce6daf71326fee7c6e2309c480f34673b0d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se>
Date: Wed, 15 Mar 2017 13:36:15 +0100
Subject: [PATCH] NodeUtilization: Never set hv_memory to a negative value
---
extra/resources//NodeUtilization | 2 ++
1 file changed, 2 insertions(+)
diff --git a/heartbeat/NodeUtilization b/heartbeat/NodeUtilization
index f246010..61969e6 100755
--- a/extra/resources//NodeUtilization
+++ b/extra/resources//NodeUtilization
@@ -155,6 +155,8 @@ set_utilization() {
hv_mem=$(( $(Host_Total_Memory) - OCF_RESKEY_utilization_hv_memory_reservation ))
uti_mem=$(crm_attribute -Q -t nodes -U "$host_name" -z -n hv_memory 2>/dev/null)
+ [ $hv_mem -lt 0 ] && hv_mem=0
+
if [ "$hv_mem" != "$uti_mem" ]; then
if ! crm_attribute -t nodes -U "$host_name" -z -n hv_memory -v $hv_mem; then
ocf_log err "Failed to set the hv_memory utilization attribute for $host_name using crm_attribute."

View File

@ -0,0 +1,12 @@
Index: pacemaker/mcp/pacemaker.service.in
===================================================================
--- pacemaker.orig/mcp/pacemaker.service.in
+++ pacemaker/mcp/pacemaker.service.in
@@ -26,6 +26,7 @@ NotifyAccess=main
EnvironmentFile=-@CONFIGDIR@/pacemaker
EnvironmentFile=-@CONFIGDIR@/sbd
SuccessExitStatus=100
+TasksMax=4915
ExecStart=@sbindir@/pacemakerd -f

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e259506a9b70639a9e06bd6b508f0fcc5bbc7daa487effd736220983c485d81e
size 3963273

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d30636bdece960e43b562392b4f461adbd2c213c83bc6fc88aed7c7217121994
size 3602760

View File

@ -1,3 +1,57 @@
-------------------------------------------------------------------
Thu Mar 23 16:02:22 UTC 2017 - ygao@suse.com
- libcrmcluster,crmd: log join phase as text rather than integer
- pacemaker-remote: pacemaker_remoted shutdown while unmanaged
- tools: disable agent stdout/stderr for crm_resource --validate
- tools: Add "--validate" command to crm_resource
- tools: crm_resource should set OCF_RESKEY_crm_feature_set
- tools: make crm_failcount compatible with per-operation failcounts
- tools: support clearing failure of a single operation with crm_resource -C
- crmd: support clearing failure of a single operation
- crmd: make clearing last failure more efficient
- attrd,libcrmcommon: support clearing failure of a single operation
- attrd,crmd,libraries,tools: track resource failures per-operation
- tools: support crm_failcount -q as advertised
- Upstream version cs: 77ea74d01bcb6b7100e1c7acab0e66e79aceaf8b
-------------------------------------------------------------------
Fri Mar 17 16:10:49 UTC 2017 - ygao@suse.com
- NodeUtilization: Never set hv_memory to a negative value (bsc#1015842)
* bug-1015842_pacemaker-NodeUtilization-RA-3.patch
- NodeUtilization: Fix mixed indentation, set executable bit (bsc#1015842)
* bug-1015842_pacemaker-NodeUtilization-RA-2.patch
- RA: NodeUtilization - Use xl if available (bsc#1015842)
* Drop obsolete bug-1015842_pacemaker-NodeUtilization-RA.patch
* Add bug-1015842_pacemaker-NodeUtilization-RA-1.patch
-------------------------------------------------------------------
Fri Mar 17 11:07:49 UTC 2017 - ygao@suse.com
- spec: Merge the SLE and Factory versions
* enable_fatal_warnings=0
-------------------------------------------------------------------
Thu Mar 16 14:25:19 UTC 2017 - ygao@suse.com
- crmd: new cluster option stonith-max-attempts with default value 10
- crmd: Change of the log level and addition of uuid.
- crmd: use new attrd op to clear fail counts
- tools: crm_resource -C should clear last-failure
- libcrmcommon: add API for new attrd clear-failure operation
- attrd: add more detail to legacy attrd messages
- attrd: add API for clearing failures
- Upstream version cs: e55d506cc390f0a0335b4ec6e365ea89da30b6b1
-------------------------------------------------------------------
Mon Mar 13 13:46:36 UTC 2017 - ygao@suse.com
- pacemaker.service: Add presetting TasksMax=4915 (bsc#1028138)
* bug-1028138_pacemaker-pacemaker.service-TasksMax.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Mar 7 00:01:15 UTC 2017 - ygao@suse.com Tue Mar 7 00:01:15 UTC 2017 - ygao@suse.com

View File

@ -25,8 +25,10 @@
## Where to install Pacemaker documentation ## Where to install Pacemaker documentation
%global pcmk_docdir %{_docdir}/%{name} %global pcmk_docdir %{_docdir}/%{name}
%global commit 1.1.16+20170320.77ea74d
## Corosync version ## Corosync version
%global cs_version 2 %define cs_version 2
%define with_nagios 1 %define with_nagios 1
%define with_snmp 1 %define with_snmp 1
@ -42,12 +44,29 @@
## Add option to enable support for stonith/external fencing agents ## Add option to enable support for stonith/external fencing agents
%bcond_without stonithd %bcond_without stonithd
## Add option to create binaries suitable for use with profiling tools
%bcond_with profiling
## Add option to create binaries with coverage analysis
%bcond_with coverage
## Add option to skip generating documentation ## Add option to skip generating documentation
## (the build tools aren't available everywhere) ## (the build tools aren't available everywhere)
%bcond_with doc %bcond_with doc
## Add option to turn off hardening of libraries and daemon executables
%bcond_with hardening
# Keep sane profiling data if requested
%if %{with profiling}
## Disable -debuginfo package and stripping binaries/libraries
%define debug_package %{nil}
%endif
Name: pacemaker Name: pacemaker
Version: 1.1.16+git20170302.a7825f4 Version: 1.1.16
Release: 0 Release: 0
Summary: Scalable High-Availability cluster resource manager Summary: Scalable High-Availability cluster resource manager
License: GPL-2.0 and GPL-2.0+ and LGPL-2.1+ License: GPL-2.0 and GPL-2.0+ and LGPL-2.1+
@ -56,20 +75,23 @@ Group: Productivity/Clustering/HA
Url: http://www.clusterlabs.org Url: http://www.clusterlabs.org
# Hint: use "spectool -s 0 pacemaker.spec" (rpmdevtools) to check the final URL: # Hint: use "spectool -s 0 pacemaker.spec" (rpmdevtools) to check the final URL:
# https://github.com/ClusterLabs/pacemaker/archive/e91769e5a39f5cb2f7b097d3c612368f0530535e/pacemaker-e91769e.tar.gz # https://github.com/ClusterLabs/pacemaker/archive/e91769e5a39f5cb2f7b097d3c612368f0530535e/pacemaker-e91769e.tar.gz
Source0: %{name}-%{version}.tar.bz2 Source0: %{name}-%{commit}.tar.bz2
Source1: crm_report.in Source1: crm_report.in
Source100: pacemaker.rpmlintrc Source100: pacemaker.rpmlintrc
Patch1: bug-806256_pacemaker-log-level-notice.patch Patch1: bug-806256_pacemaker-log-level-notice.patch
Patch2: bug-728579_pacemaker-stonith-dev-id.patch Patch2: bug-728579_pacemaker-stonith-dev-id.patch
Patch3: bug-1015842_pacemaker-NodeUtilization-RA.patch Patch3: pacemaker-cibsecret-tool-temp-disabled.patch
Patch4: pacemaker-cibsecret-tool-temp-disabled.patch Patch4: pacemaker-nagios-plugin-dir.patch
Patch5: pacemaker-nagios-plugin-dir.patch Patch5: bug-812269_pacemaker-fencing-device-register-messages.patch
Patch6: bug-812269_pacemaker-fencing-device-register-messages.patch Patch6: pacemaker-Wno-format-signedness.patch
Patch7: pacemaker-Wno-format-signedness.patch Patch7: bug-943295_pacemaker-lrmd-log-notice.patch
Patch8: bug-943295_pacemaker-lrmd-log-notice.patch Patch8: bug-977201_pacemaker-controld-self-fencing.patch
Patch9: bug-977201_pacemaker-controld-self-fencing.patch Patch9: bug-995365_pacemaker-cts-restart-systemd-journald.patch
Patch10: bug-995365_pacemaker-cts-restart-systemd-journald.patch Patch10: bug-1028138_pacemaker-pacemaker.service-TasksMax.patch
Patch11: pacemaker-lrmd.h-include-libxml.patch Patch11: bug-1015842_pacemaker-NodeUtilization-RA-1.patch
Patch12: bug-1015842_pacemaker-NodeUtilization-RA-2.patch
Patch13: bug-1015842_pacemaker-NodeUtilization-RA-3.patch
Patch14: pacemaker-lrmd.h-include-libxml.patch
# Required for core functionality # Required for core functionality
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
@ -256,7 +278,8 @@ Summary: Test framework for cluster-related technologies
Group: Productivity/Clustering/HA Group: Productivity/Clustering/HA
Requires: libpacemaker3 = %{version}-%{release} Requires: libpacemaker3 = %{version}-%{release}
Requires: python >= 2.6 Requires: python >= 2.6
Requires: python-systemd #Requires: python-systemd
Recommends: python-systemd
%description cts %description cts
Test framework for cluster-related technologies like Pacemaker Test framework for cluster-related technologies like Pacemaker
@ -274,7 +297,7 @@ manager for Corosync, CMAN and/or Linux-HA.
%endif %endif
%prep %prep
%setup -q %setup -q -n %{name}-%{commit}
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
@ -286,19 +309,34 @@ manager for Corosync, CMAN and/or Linux-HA.
%patch9 -p1 %patch9 -p1
%patch10 -p1 %patch10 -p1
%patch11 -p1 %patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%build %build
export systemdunitdir=%{?_unitdir}%{?!_unitdir:no} export systemdunitdir=%{?_unitdir}%{?!_unitdir:no}
%if %{with hardening}
# prefer distro-provided hardening flags in case they are defined
# through _hardening_{c,ld}flags macros, configure script will
# use its own defaults otherwise; if such hardenings are completely
# undesired, rpmbuild using "--without hardening"
# (or "--define '_without_hardening 1'")
export CFLAGS_HARDENED_EXE="%{?_hardening_cflags}"
export CFLAGS_HARDENED_LIB="%{?_hardening_cflags}"
export LDFLAGS_HARDENED_EXE="%{?_hardening_ldflags}"
export LDFLAGS_HARDENED_LIB="%{?_hardening_ldflags}"
%endif
autoreconf -fvi autoreconf -fvi
%configure \ %configure \
%{?with_profiling: --with-profiling} \
%{?with_coverage: --with-coverage} \
--docdir=%{_docdir}/%{name} \ --docdir=%{_docdir}/%{name} \
--disable-static \ --disable-static \
--disable-silent-rules \ --disable-silent-rules \
--without-profiling \
--without-coverage \
--without-cman \ --without-cman \
--without-heartbeat \ --without-heartbeat \
--with-acl=true \ --with-acl=true \
@ -318,6 +356,7 @@ autoreconf -fvi
--enable-fatal-warnings=no \ --enable-fatal-warnings=no \
%endif %endif
%{!?with_doc: --with-brand=} \ %{!?with_doc: --with-brand=} \
%{!?with_hardening: --disable-hardening} \
--with-initdir=%{_initddir} \ --with-initdir=%{_initddir} \
--localstatedir=%{_var} \ --localstatedir=%{_var} \
--with-version=%{version}-%{release} --with-version=%{version}-%{release}
@ -337,8 +376,11 @@ chmod a+x %{buildroot}/%{_datadir}/pacemaker/tests/cts/CTSlab.py
# These are not actually scripts # These are not actually scripts
find %{buildroot} -name '*.xml' -type f -print0 | xargs -0 chmod a-x find %{buildroot} -name '*.xml' -type f -print0 | xargs -0 chmod a-x
# Don't package static libs
find %{buildroot} -type f -name "*.a" -delete -print
find %{buildroot} -type f -name "*.la" -delete -print find %{buildroot} -type f -name "*.la" -delete -print
# Do not package these either
rm -f %{buildroot}/%{_libdir}/service_crm.so rm -f %{buildroot}/%{_libdir}/service_crm.so
# Don't ship init scripts for systemd based platforms # Don't ship init scripts for systemd based platforms
@ -348,6 +390,16 @@ rm -f %{buildroot}/%{_initddir}/pacemaker_remote
# Don't ship fence_pcmk where it has no use # Don't ship fence_pcmk where it has no use
rm -f %{buildroot}/%{_sbindir}/fence_pcmk rm -f %{buildroot}/%{_sbindir}/fence_pcmk
%if %{with coverage}
GCOV_BASE=%{buildroot}/%{_var}/lib/pacemaker/gcov
mkdir -p $GCOV_BASE
find . -name '*.gcno' -type f | while read F ; do
D=`dirname $F`
mkdir -p ${GCOV_BASE}/$D
cp $F ${GCOV_BASE}/$D
done
%endif
ln -s service %{buildroot}%{_sbindir}/rcpacemaker ln -s service %{buildroot}%{_sbindir}/rcpacemaker
ln -s service %{buildroot}%{_sbindir}/rcpacemaker_remote ln -s service %{buildroot}%{_sbindir}/rcpacemaker_remote
ln -s service %{buildroot}%{_sbindir}/rccrm_mon ln -s service %{buildroot}%{_sbindir}/rccrm_mon
@ -595,6 +647,9 @@ fi
%{_datadir}/pacemaker/tests %{_datadir}/pacemaker/tests
%{_includedir}/pacemaker %{_includedir}/pacemaker
%{_libdir}/*.so %{_libdir}/*.so
%if %{with coverage}
%{_var}/lib/pacemaker/gcov
%endif
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
#%license licenses/LGPLv2.1 #%license licenses/LGPLv2.1
%doc COPYING ChangeLog %doc COPYING ChangeLog