From 5498ebebbbd446e3ee7d1a4d4914e0474a75482da4f50487c2870da1ff8d8039 Mon Sep 17 00:00:00 2001 From: Yan Gao Date: Wed, 29 Nov 2017 16:52:08 +0000 Subject: [PATCH] Accepting request 546490 from home:yan_gao:branches:network:ha-clustering:Factory:Test - NodeUtilization RA is now shipped by resource-agents package (bsc#1070347) * Drop bug-1015842_pacemaker-NodeUtilization-RA.patch - libpe_status: remove support for default-resource-failure-stickiness - libpe_status: remove support for resource-failure-stickiness - various: remove support for pre-Pacemaker-1.0 CIB XML - libpe_status,tools: remove support for legacy ticket state entries - various: remove isolation wrapper support - systemd unit files: enable TasksMax=infinity (bsc#1028138, bsc#1066710) * Drop obsolete bug-1028138_pacemaker-pacemaker.service-TasksMax.patch - crmd: default record-pending to TRUE - tools: enable new crm_resource --cleanup/--refresh behavior - Upstream version cs: 53a3fe14b15b087bbde9ccb524d11d0a413cc6e9 - Update to version 1.1.18 - libpe_status: always use default key location with bundles - attrd,stonithd: more efficient regular expression parsing - libpe_status: avoid potential NULL dereference - tools: use proper variable in message from crm_resource -g - tools: use uber-parent for crm_resource -a/-A - tools: use g_main_loop_is_running() properly - libpe_status: monitors are rescheduled, not reloaded - crmd: determine restart/private digests correctly - systemd: add TasksMax comment to pacemaker_remote unit (bsc#1028138, bsc#1066710) - tools: make regression test insensitive to line number changes - pengine,tools,libpe_status: avoid unnecessary use of pe_find_current - pacemaker.service: Recommend not to limit tasks (bsc#1028138, bsc#1066710) - tools: set the correct OCF_RESOURCE_INSTANCE env when crm_resource --force-* executes RA - typo: overriden -> overridden - portability: the difference of time_t values is given by difftime() OBS-URL: https://build.opensuse.org/request/show/546490 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=279 --- _service | 6 +- ...1015842_pacemaker-NodeUtilization-RA.patch | 259 ------------------ ...pacemaker-pacemaker.service-TasksMax.patch | 12 - pacemaker-1.1.17+20171023.36d2962a8.tar.bz2 | 3 - pacemaker-1.1.18+20171128.53a3fe14b.tar.bz2 | 3 + pacemaker.changes | 102 +++++++ pacemaker.spec | 11 +- 7 files changed, 112 insertions(+), 284 deletions(-) delete mode 100644 bug-1015842_pacemaker-NodeUtilization-RA.patch delete mode 100644 bug-1028138_pacemaker-pacemaker.service-TasksMax.patch delete mode 100644 pacemaker-1.1.17+20171023.36d2962a8.tar.bz2 create mode 100644 pacemaker-1.1.18+20171128.53a3fe14b.tar.bz2 diff --git a/_service b/_service index 1ce27e9..be20db5 100644 --- a/_service +++ b/_service @@ -8,10 +8,10 @@ To update to a new release, change "revision" to the desired git commit hash and bump "version" if necessary - 1.1.17 + 1.1.18 --> - 1.1.17+git%cd.%h - 36d2962a8613322fc43d727d95720d61a47d0138 + 1.1.18+git%cd.%h + 53a3fe14b15b087bbde9ccb524d11d0a413cc6e9 diff --git a/bug-1015842_pacemaker-NodeUtilization-RA.patch b/bug-1015842_pacemaker-NodeUtilization-RA.patch deleted file mode 100644 index db7afd9..0000000 --- a/bug-1015842_pacemaker-NodeUtilization-RA.patch +++ /dev/null @@ -1,259 +0,0 @@ -commit 501bfa9359923b5c9b1fd3f349d93c497940d0cd -Author: Kristoffer Grönlund -Date: Thu Feb 2 09:06:00 2017 +0100 - - Medium: NodeUtilization: Add NodeUtilization agent - - The Node Utilization agent detects system parameters like available CPU, host - memory and hypervisor memory availability, and adds them into the CIB for each - node using crm_attribute. Run the agent as a clone resource to have it populate - these parameters on each node. - - Note: Setting hv_memory only works with Xen at the moment, using the xl or xm - command line tools. - -diff --git a/extra/resources/Makefile.am b/extra/resources/Makefile.am ---- a/extra/resources/Makefile.am -+++ b/extra/resources/Makefile.am -@@ -38,7 +38,8 @@ ocf_SCRIPTS = ClusterMon \ - SysInfo \ - SystemHealth \ - attribute \ -- remote -+ remote \ -+ NodeUtilization - - isolationtech_SCRIPTS = docker-wrapper - -diff --git a/extra/resources/NodeUtilization b/extra/resources/NodeUtilization -new file mode 100755 -index 00000000..61969e6f ---- /dev/null -+++ b/heartbeat/NodeUtilization -@@ -0,0 +1,226 @@ -+#!/bin/sh -+# -+# -+# NodeUtilization OCF Resource Agent -+# -+# Copyright (c) 2011 SUSE LINUX, John Shi -+# Copyright (c) 2016 SUSE LINUX, Kristoffer Gronlund -+# All Rights Reserved. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of version 2 of the GNU General Public License as -+# published by the Free Software Foundation. -+# -+# This program is distributed in the hope that it would be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -+# -+# Further, this software is distributed without any warranty that it is -+# free of the rightful claim of any third person regarding infringement -+# or the like. Any license provided herein, whether implied or -+# otherwise, applies only to this software file. Patent licenses, if -+# any, provided herein do not apply to combinations of this program with -+# other software, or any other product whatsoever. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write the Free Software Foundation, -+# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. -+# -+####################################################################### -+# Initialization: -+ -+: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat} -+. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs -+ -+####################################################################### -+ -+NodeUtilization_meta_data() { -+ cat < -+ -+ -+1.0 -+ -+ -+The Node Utilization agent detects system parameters like available CPU, host -+memory and hypervisor memory availability, and adds them into the CIB for each -+node using crm_attribute. Run the agent as a clone resource to have it populate -+these parameters on each node. -+Note: Setting hv_memory only works with Xen at the moment, using the xl or xm -+command line tools. -+ -+Node Utilization -+ -+ -+ -+ -+If set, parameters will be updated if there are differences between the HA -+parameters and the system values when running the monitor action. -+If not set, the parameters will be set once when the resource instance starts. -+ -+Dynamically update parameters in monitor -+ -+ -+ -+ -+Enable setting node CPU utilization limit. -+Set node CPU utilization limit. -+ -+ -+ -+ -+Subtract this value when setting the CPU utilization parameter. -+CPU reservation. -+ -+ -+ -+ -+Enable setting available host memory. -+Set available host memory. -+ -+ -+ -+ -+Subtract this value when setting host memory utilization, in MB. -+Host memory reservation, in MB. -+ -+ -+ -+ -+Enable setting available hypervisor memory. -+Set available hypervisor memory. -+ -+ -+ -+ -+Subtract this value when setting hypervisor memory utilization, in MB. -+Hypervisor memory reservation, in MB. -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+END -+} -+ -+Host_Total_Memory() { -+ local xentool -+ -+ xentool=$(which xl 2> /dev/null || which xm 2> /dev/null) -+ -+ if [ -x $xentool ]; then -+ $xentool info | awk '/total_memory/{printf("%d\n",$3);exit(0)}' -+ else -+ ocf_log warn "Can only set hv_memory for Xen hypervisor" -+ echo "0" -+ fi -+} -+ -+ -+set_utilization() { -+ host_name="$(ocf_local_nodename)" -+ -+ if ocf_is_true "$OCF_RESKEY_utilization_cpu"; then -+ sys_cpu=$(( $(grep -c processor /proc/cpuinfo) - $OCF_RESKEY_utilization_cpu_reservation )) -+ uti_cpu=$(crm_attribute -Q -t nodes -U "$host_name" -z -n cpu 2>/dev/null) -+ -+ if [ "$sys_cpu" != "$uti_cpu" ]; then -+ if ! crm_attribute -t nodes -U "$host_name" -z -n cpu -v $sys_cpu; then -+ ocf_log err "Failed to set the cpu utilization attribute for $host_name using crm_attribute." -+ return 1 -+ fi -+ fi -+ fi -+ -+ if ocf_is_true "$OCF_RESKEY_utilization_host_memory"; then -+ sys_mem=$(( $(awk '/MemTotal/{printf("%d\n",$2/1024);exit(0)}' /proc/meminfo) - $OCF_RESKEY_utilization_host_memory_reservation )) -+ uti_mem=$(crm_attribute -Q -t nodes -U "$host_name" -z -n host_memory 2>/dev/null) -+ -+ if [ "$sys_mem" != "$uti_mem" ]; then -+ if ! crm_attribute -t nodes -U "$host_name" -z -n host_memory -v $sys_mem; then -+ ocf_log err "Failed to set the host_memory utilization attribute for $host_name using crm_attribute." -+ return 1 -+ fi -+ fi -+ fi -+ -+ if ocf_is_true "$OCF_RESKEY_utilization_hv_memory"; then -+ 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." -+ return 1 -+ fi -+ fi -+ fi -+} -+ -+NodeUtilization_usage() { -+ cat < overridden +- portability: the difference of time_t values is given by difftime() +- pengine: avoid not-really-possible use-of-NULL +- PE: Have bundles log to stderr so that 'journalctl -M' works (rkt) +- tools: don't expect reply to failed send +- pengine: use newer Pacemaker Remote terminology +- pengine: memory leak when writing graph to file +- tools: don't reinvent the glib wheel +- tools: implement clean-up dry-run correctly +- pengine: avoid potential use-of-NULL +- Update regression test outputs +- PE: Improved logging of reasons for stop/restart actions +- PE: Allow all resources to stop prior to probes completing +- PE: Correctly defer processing of resources inside containers +- crm_resource: Ensure we wait for all messages before exiting +- crm_resource: Have cleanup operate only on failures +- PE: Have bundles log to stderr so that 'docker logs' works +- PE: Resources are allowed to stop before their state is known everywhere +- PE: Use the node we already have and know isnt NULL +- PE: Flag resources that are acting as remote nodes +- crmd: Scale all cib operation timeouts +- PE: Bare metal remotes _can_ run resources now and must be probed +- PE: Bundles only need to wait for other containers on the same node to be probed +- crmd: Scale timeouts with the number of remotes too +- PE: There is no need for port mapping directives when net=host is specified +- PE: Do not always expire failed operations of nested remotes +- PE: Consolidate REMOTE_CONTAINER_HACK logic +- PE: Exclude resources and nodes from the symmetric_default constraint in some circumstances +- crm_resource: Don't cleanup on nodes not meeting the discovery conditions +- PE: Restore the ability to send the transition graph via the disk if it gets too big +- crm_resource: Prevent disconnection from crmd during cleanup +- PE: Do not probe connection resources until the container is active +- PE: Detailed resource information should include connection resource state +- Tools: Allow crm_resource to operate on anonymous clones in unknown states +- tools: Clean up everywhere if we don't know anything about the resource +- crm_resource: See what cleanup would have done for a saved configuration +- PE: Only pass requests for promote/demote flags onto the bundle's child +- Upstream version cs: 2b07d5c5a908998891c3317faa30328c108d3a91 (Pacemaker-1.1.18) + +------------------------------------------------------------------- +Thu Nov 2 15:15:06 UTC 2017 - ygao@suse.com + +- pengine: if ignoring failure, also ignore migration-threshold +- libcrmcommon,liblrmd,lrmd: improve messages for failed remote sends +- libcrmcommon,lrmd: meaningful error codes when sending remote messages +- libcrmcommon: lower watchdog messages when default +- tools: set meta_timeout env when crm_resource --force-* executes RA +- fencing: don't print event twice with stonith_admin --verbose +- fencing: memory leak in stonith_admin --env +- fencing: improve stonith_admin help +- crmd: hard error if remote start fails due to missing key +- libcrmcommon,liblrmd: report meaningful async connection errors +- libcrmcommon: return meaningful error codes to connection callbacks +- libcrmcommon: async connection callback must get negative error codes +- libcrmcommon,liblrmd: improve remote connection messages +- pacemaker_remote: warn if TLS key can't be read at start-up +- lrmd: tweak TLS listener messages +- pengine: don't probe offline or unclean guest nodes +- agents: ifspeed - Try to detect interface name from ip address. +- pengine: don't keep unique instances on same node +- pengine: improve messages when assigning resources to nodes +- Upstream version cs: 23be51236edc34477a99d6979bc0e2cc1e1a7684 + ------------------------------------------------------------------- Tue Oct 24 10:29:38 UTC 2017 - ygao@suse.com diff --git a/pacemaker.spec b/pacemaker.spec index d83e756..dd6b30d 100644 --- a/pacemaker.spec +++ b/pacemaker.spec @@ -25,7 +25,7 @@ ## Where to install Pacemaker documentation %global pcmk_docdir %{_docdir}/%{name} -%global commit 1.1.17+20171023.36d2962a8 +%global commit 1.1.18+20171128.53a3fe14b ## Corosync version %define cs_version 2 @@ -66,7 +66,7 @@ %endif Name: pacemaker -Version: 1.1.17 +Version: 1.1.18 Release: 0 Summary: Scalable High-Availability cluster resource manager # AGPL-3.0 licensed extra/clustermon.sh is not present in the binary @@ -87,8 +87,6 @@ Patch6: pacemaker-Wno-format-signedness.patch Patch7: bug-943295_pacemaker-lrmd-log-notice.patch Patch8: bug-977201_pacemaker-controld-self-fencing.patch Patch9: bug-995365_pacemaker-cts-restart-systemd-journald.patch -Patch10: bug-1028138_pacemaker-pacemaker.service-TasksMax.patch -Patch11: bug-1015842_pacemaker-NodeUtilization-RA.patch # Required for core functionality BuildRequires: autoconf BuildRequires: automake @@ -304,8 +302,6 @@ manager for Corosync, CMAN and/or Linux-HA. %patch7 -p1 %patch8 -p1 %patch9 -p1 -%patch10 -p1 -%patch11 -p1 %build @@ -401,6 +397,8 @@ ln -s service %{buildroot}%{_sbindir}/rccrm_mon mv %{buildroot}%{_sbindir}/crm_report %{buildroot}%{_sbindir}/crm_report.pacemaker install -m 755 %{SOURCE1} %{buildroot}%{_sbindir}/crm_report +ln -s ../heartbeat/NodeUtilization %{buildroot}%{_libexecdir}/ocf/resource.d/pacemaker/ + %fdupes -s %{buildroot} %check @@ -519,7 +517,6 @@ fi %{_libexecdir}/ocf/resource.d/pacemaker/controld %{_libexecdir}/ocf/resource.d/pacemaker/o2cb %{_libexecdir}/ocf/resource.d/pacemaker/remote -%{_libexecdir}/ocf/resource.d/.isolation %if "%{?cs_version}" != "UNKNOWN" %if 0%{?cs_version} < 2