Hello community,

here is the log from the commit of package pacemaker for openSUSE:Factory 
checked in at 2017-03-10 20:59:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pacemaker (Old)
 and      /work/SRC/openSUSE:Factory/.pacemaker.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pacemaker"

Fri Mar 10 20:59:20 2017 rev:106 rq:477367 version:1.1.16+git20170302.a7825f4

Changes:
--------
--- /work/SRC/openSUSE:Factory/pacemaker/pacemaker.changes      2017-03-03 
17:41:07.422054204 +0100
+++ /work/SRC/openSUSE:Factory/.pacemaker.new/pacemaker.changes 2017-03-10 
20:59:24.757144684 +0100
@@ -1,0 +2,110 @@
+Tue Mar  7 00:01:15 UTC 2017 - [email protected]
+
+- Build: lrmd: Include libxml/tree.h in lrmd.h
+  * pacemaker-lrmd.h-include-libxml.patch
+
+-------------------------------------------------------------------
+Mon Mar  6 22:58:46 UTC 2017 - [email protected]
+
+- libfencing,fencing: properly remap "action" in configuration
+- libservices: ensure recurring actions table is created before using
+- libservices: improve error messages when creating operation
+- libservices: properly detect in-flight systemd/upstart ops when kicking
+- libservices: properly cancel in-flight systemd/upstart op
+- libservices: handle in-flight case first when cancelling an operation
+- libservices: prevent use-after-free when freeing an operation
+- libservices: ensure completed ops aren't on blocked ops list
+- libcrmcommon: assert if can't generate operation key
+- libcrmcommon: improve remote connection polling messages
+- crmd: clear failure only for requested node
+- crmd: improve message when clearing failures
+- pengine,libpe_status: make failcount clearing messages more helpful
+- pengine,libpe_status: don't clear same fail-count twice
+- cib: properly mark variable as volatile
+- libcib: avoid memory leak in query_node_uuid()
+- tools: avoid NULL dereference in crm_resource debug message
+- cib,libcrmcommon,lrmd: handle IP addresses better in messages
+- tools: crm_attribute should prefer node name from environment
+- libcrmcommon: Correctly delete XML comments according to their positions 
(bsc#1024037)
+- libcrmcommon: Correctly compare XML comments to prevent crmd from getting 
into infinite election loop (bsc#1024037)
+- crmd,libcrmcluster: minor log message improvements
+- tools: avoid deprecated function in notifyServicelogEvent
+- libcrmcommon,pengine,tools: pass local node name to resource agents
+- use callback instead of sync call
+- libcib: make querying node uuid more efficient
+- tools: allow regular expression with crm_attribute
+- attrd: support regular expressions in legacy attrd
+- attrd: support Pacemaker Remote node attributes in legacy attrd
+- use status scope to start node in standby mode
+- attrd: ignore unsupported requests in legacy attrd
+- attrd,crmd: implement peer remove requests in legacy attrd
+- crmd: don't clear remote node transient attributes unnecessarily
+- crm_mon: protect against non-standard or failing asctime
+- libservices(sync): partially prevent killing foreign process
+- libservices (sync): ensure no zombie is left behind
+- cib: improve re-sync handling
+- tools: implement crm_failcount command-line options correctly
+- tools: use correct regular expression for fail counts in crm_resource
+- cib: never disable legacy mode with corosync 1 stacks
+- cib: improve warning when legacy diff fails
+- libcrmcommon: ensure filename is not NULL before opening
+- crmd: be more resilient when checking an LRM command's "from"
+- crmd: improve crmd's LRM-related log messages
+- tools: properly ignore version with crm_diff --no-version (bsc#888726)
+- Ability to start node in standby
+- Upstream version cs: a7825f4f0a8db272d1ce0b1f93e8044cbcaa5144
+
+-------------------------------------------------------------------
+Mon Mar  6 13:04:16 UTC 2017 - [email protected]
+
+- libservices: properly watch writable DBus handles
+- tools: don't reference hidden parameter in crm_resource help text
+- Alert: Set SNMP_PERSISTENT_DIR directory for the snmp-trap tool.
+- dbus: Prevent lrmd from hanging on dbus calls (bsc#1015264)
+- spec: add %check to run a subset of tests on rpmbuild
+- crmd: update cache status for guest node whose host is fenced
+- pengine: consider guest node unclean if its host is unclean
+- pengine: create a pseudo-fence for guest node recovery
+- pengine: guest node fencing doesn't require stonith enabled
+- pengine: remove unnecessary assert
+- mcp: Correction of the difference in access permission setting.
+- stonith_admin: Addition of the list-targets option.
+- stonith: Check for missing params in new device and dup
+- libservices: treat systemd service reloading as OK
+- crmd: increase severity when fencing didn't happen (bsc#1011240)
+- rng: Create resources-2.7.rng to update template class validation
+- libcrmcommon: Don't report error if the output file isn't syncable
+- crmd: bump feature set
+- pengine: disable migration for versioned resources
+- add versioned parameters support
+- Upstream version cs: 2817a2081e9e70e7412f0d0a253495611afab55e
+
+-------------------------------------------------------------------
+Mon Mar  6 12:58:37 UTC 2017 - [email protected]
+
+- wd: Fix to not compare NULL when environment variable is not set
+- mcp,pacemaker_remote: order after time-sync
+
+- configure: fix fouled parameter expansion
+  * Drop obsolete pacemaker-configure-systemd-detection.patch
+
+- xml: rng: Keep score-attribute{,-mangle} in the existing RelaxNG schema 
files for graceful upgrades
+- Upstream version cs: 94ff4df51a55cc30d01843ea11b3292bac755432 
(Pacemaker-1.1.16)
+
+-------------------------------------------------------------------
+Mon Mar  6 12:57:23 UTC 2017 - [email protected]
+
+- RA: NodeUtilization - Use xl if available (bsc#1015842)
+  * bug-1015842_pacemaker-NodeUtilization-RA.patch
+
+-------------------------------------------------------------------
+Mon Mar  6 12:53:50 UTC 2017 - [email protected]
+
+- spec: Prevent overwriting existing sysconfig files by conditionally running 
%fillup_only (bsc#1022807)
+
+-------------------------------------------------------------------
+Mon Mar  6 12:52:25 UTC 2017 - [email protected]
+
+- spec: cts brings an RA that needs python-systemd
+
+-------------------------------------------------------------------

Old:
----
  pacemaker-1.1.15+git20161104.b6f251a.tar.bz2
  pacemaker-NodeUtilization-RA.patch
  pacemaker-configure-systemd-detection.patch

New:
----
  bug-1015842_pacemaker-NodeUtilization-RA.patch
  pacemaker-1.1.16+git20170302.a7825f4.tar.bz2
  pacemaker-lrmd.h-include-libxml.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pacemaker.spec ++++++
--- /var/tmp/diff_new_pack.wYbU2e/_old  2017-03-10 20:59:25.761002425 +0100
+++ /var/tmp/diff_new_pack.wYbU2e/_new  2017-03-10 20:59:25.761002425 +0100
@@ -47,20 +47,21 @@
 %bcond_with doc
 
 Name:           pacemaker
-Version:        1.1.15+git20161104.b6f251a
+Version:        1.1.16+git20170302.a7825f4
 Release:        0
 Summary:        Scalable High-Availability cluster resource manager
-# AGPL-3.0 licensed extra/clustermon.sh is not present in the binary
 License:        GPL-2.0 and GPL-2.0+ and LGPL-2.1+
 Group:          Productivity/Clustering/HA
+# AGPL-3.0 licensed extra/clustermon.sh is not present in the binary
 Url:            http://www.clusterlabs.org
-# eg. 
https://github.com/ClusterLabs/pacemaker/archive/8ae45302394b039fb098e150f156df29fc0cb576/pacemaker-8ae4530.tar.gz
+# Hint: use "spectool -s 0 pacemaker.spec" (rpmdevtools) to check the final 
URL:
+# 
https://github.com/ClusterLabs/pacemaker/archive/e91769e5a39f5cb2f7b097d3c612368f0530535e/pacemaker-e91769e.tar.gz
 Source0:        %{name}-%{version}.tar.bz2
 Source1:        crm_report.in
 Source100:      pacemaker.rpmlintrc
 Patch1:         bug-806256_pacemaker-log-level-notice.patch
 Patch2:         bug-728579_pacemaker-stonith-dev-id.patch
-Patch3:         pacemaker-NodeUtilization-RA.patch
+Patch3:         bug-1015842_pacemaker-NodeUtilization-RA.patch
 Patch4:         pacemaker-cibsecret-tool-temp-disabled.patch
 Patch5:         pacemaker-nagios-plugin-dir.patch
 Patch6:         bug-812269_pacemaker-fencing-device-register-messages.patch
@@ -68,7 +69,7 @@
 Patch8:         bug-943295_pacemaker-lrmd-log-notice.patch
 Patch9:         bug-977201_pacemaker-controld-self-fencing.patch
 Patch10:        bug-995365_pacemaker-cts-restart-systemd-journald.patch
-Patch11:        pacemaker-configure-systemd-detection.patch
+Patch11:        pacemaker-lrmd.h-include-libxml.patch
 # Required for core functionality
 BuildRequires:  autoconf
 BuildRequires:  automake
@@ -89,7 +90,8 @@
 BuildRequires:  pkgconfig(bzip2)
 BuildRequires:  pkgconfig(corosync)
 BuildRequires:  pkgconfig(dbus-1)
-BuildRequires:  pkgconfig(glib-2.0)
+## version lower bound for: G_GNUC_INTERNAL
+BuildRequires:  pkgconfig(glib-2.0) >= 2.6
 BuildRequires:  pkgconfig(gnutls)
 BuildRequires:  pkgconfig(libexslt)
 # Pacemaker requires a minimum libqb functionality
@@ -248,11 +250,13 @@
 The libpacemaker-devel package contains headers and shared libraries
 for developing tools for Pacemaker.
 
+# NOTE: can be noarch if lrmd_test is moved to another subpackage
 %package       cts
 Summary:        Test framework for cluster-related technologies
 Group:          Productivity/Clustering/HA
 Requires:       libpacemaker3 = %{version}-%{release}
 Requires:       python >= 2.6
+Requires:       python-systemd
 
 %description   cts
 Test framework for cluster-related technologies like Pacemaker
@@ -385,9 +389,15 @@
 %service_add_pre crm_mon.service
 
 %post cli
-%fillup_only pacemaker
+if [ ! -e %{_sysconfdir}/sysconfig/pacemaker ]; then
+    %fillup_only -n pacemaker
+fi
+
 %service_add_post crm_mon.service
-%fillup_only crm_mon
+
+if [ ! -e %{_sysconfdir}/sysconfig/crm_mon ]; then
+    %fillup_only -n crm_mon
+fi
 
 %preun cli
 %service_del_preun crm_mon.service

++++++ _service ++++++
--- /var/tmp/diff_new_pack.wYbU2e/_old  2017-03-10 20:59:25.800996757 +0100
+++ /var/tmp/diff_new_pack.wYbU2e/_new  2017-03-10 20:59:25.804996190 +0100
@@ -8,10 +8,10 @@
     To update to a new release, change "revision" to the desired
     git commit hash and bump "version" if necessary
 
-    <param name="version">1.1.15</param>
+    <param name="version">1.1.16</param>
 -->
-    <param name="versionformat">1.1.15+git%cd.%h</param>
-    <param name="revision">b6f251a13fadca0cb74702b0c007a55275c8ea09</param>
+    <param name="versionformat">1.1.16+git%cd.%h</param>
+    <param name="revision">a7825f4f0a8db272d1ce0b1f93e8044cbcaa5144</param>
   </service>
 
   <service name="recompress" mode="disabled">

++++++ bug-1015842_pacemaker-NodeUtilization-RA.patch ++++++
>From ab4df57e195486ee651f56793470d421233a0896 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]>
Date: Thu, 2 Feb 2017 09:06:00 +0100
Subject: [PATCH] Medium: NodeUtilization: Add NodeUtilization agent

---
 extra/resources/Makefile.am     |   1 +
 extra/resources/NodeUtilization | 224 
++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 225 insertions(+)
 create mode 100644 extra/resources/NodeUtilization

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 100644
index 0000000..da5fb56
--- /dev/null
+++ b/extra/resources/NodeUtilization
@@ -0,0 +1,224 @@
+#!/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 <<END
+<?xml version="1.0"?>
+<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
+<resource-agent name="NodeUtilization">
+<version>1.0</version>
+
+<longdesc lang="en">
+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.
+</longdesc>
+<shortdesc lang="en">Node Utilization</shortdesc>
+
+<parameters>
+<parameter name="dynamic" unique="0" required="0">
+<longdesc lang="en">
+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.
+</longdesc>
+<shortdesc lang="en">Dynamically update parameters in monitor</shortdesc>
+<content type="boolean" default="true" />
+</parameter>
+
+<parameter name="utilization_cpu" unique="0" required="0">
+<longdesc lang="en">Enable setting node CPU utilization limit.</longdesc>
+<shortdesc lang="en">Set node CPU utilization limit.</shortdesc>
+<content type="boolean" default="true" />
+</parameter>
+
+<parameter name="utilization_cpu_reservation" unique="0" required="0">
+<longdesc lang="en">Subtract this value when setting the CPU utilization 
parameter.</longdesc>
+<shortdesc lang="en">CPU reservation.</shortdesc>
+<content type="integer" default="1" />
+</parameter>
+
+<parameter name="utilization_host_memory" unique="0" required="0">
+<longdesc lang="en">Enable setting available host memory.</longdesc>
+<shortdesc lang="en">Set available host memory.</shortdesc>
+<content type="boolean" default="true" />
+</parameter>
+
+<parameter name="utilization_host_memory_reservation" unique="0" required="0">
+<longdesc lang="en">Subtract this value when setting host memory utilization, 
in MB.</longdesc>
+<shortdesc lang="en">Host memory reservation, in MB.</shortdesc>
+<content type="integer" default="512" />
+</parameter>
+
+<parameter name="utilization_hv_memory" unique="0" required="0">
+<longdesc lang="en">Enable setting available hypervisor memory.</longdesc>
+<shortdesc lang="en">Set available hypervisor memory.</shortdesc>
+<content type="boolean" default="true" />
+</parameter>
+
+<parameter name="utilization_hv_memory_reservation" unique="0" required="0">
+<longdesc lang="en">Subtract this value when setting hypervisor memory 
utilization, in MB.</longdesc>
+<shortdesc lang="en">Hypervisor memory reservation, in MB.</shortdesc>
+<content type="integer" default="512" />
+</parameter>
+</parameters>
+
+<actions>
+<action name="start"   timeout="90" />
+<action name="stop"    timeout="100" />
+<action name="monitor" timeout="20s" interval="60s"/>
+<action name="meta-data"  timeout="5" />
+<action name="validate-all"  timeout="30" />
+</actions>
+</resource-agent>
+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)
+
+        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 <<END
+usage: $0 {start|stop|monitor|validate-all|meta-data}
+
+Expects to have a fully populated OCF RA-compliant environment set.
+END
+}
+
+NodeUtilization_start() {
+       ha_pseudo_resource $statefile start
+    if ! ocf_is_true "$OCF_RESKEY_dynamic"; then
+        if ! set_utilization; then
+            exit $OCF_ERR_GENERIC
+        fi
+    fi
+    exit $OCF_SUCCESS
+}
+
+NodeUtilization_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
+}
+
+NodeUtilization_validate() {
+    exit $OCF_SUCCESS
+}
+
+statefile=$OCF_RESOURCE_TYPE.$(echo $OCF_RESOURCE_INSTANCE | sed -e 's/^.*://')
+
+: ${OCF_RESKEY_pidfile:="$HA_VARRUN/NodeUtilization-${OCF_RESOURCE_INSTANCE}"}
+: ${OCF_RESKEY_dynamic:="true"}
+: ${OCF_RESKEY_utilization_cpu:="true"}
+: ${OCF_RESKEY_utilization_cpu_reservation="1"}
+: ${OCF_RESKEY_utilization_hv_memory:="true"}
+: ${OCF_RESKEY_utilization_hv_memory_reservation="512"}
+: ${OCF_RESKEY_utilization_host_memory:="true"}
+: ${OCF_RESKEY_utilization_host_memory_reservation="512"}
+
+OCF_REQUIRED_PARAMS=""
+OCF_REQUIRED_BINARIES=""
+ocf_rarun $*
++++++ pacemaker-1.1.15+git20161104.b6f251a.tar.bz2 -> 
pacemaker-1.1.16+git20170302.a7825f4.tar.bz2 ++++++
++++ 77495 lines of diff (skipped)

++++++ pacemaker-lrmd.h-include-libxml.patch ++++++
commit 6a9c3c80245f6fd84433e0c1c65c63b4f576350e
Author: Gao,Yan <[email protected]>
Date:   Tue Mar 7 00:23:03 2017 +0100

    Build: lrmd: Include libxml/tree.h in lrmd.h
    
    65d0b80 introduced "xmlNode *versioned_params" in lrmd_event_data_t but
    without including libxml/tree.h in lrmd.h.
    
    Sbd failed to build against it:
    
    In file included from /usr/include/pacemaker/crm/common/util.h:33:0,
                     from sbd-inquisitor.c:19:
    /usr/include/pacemaker/crm/lrmd.h:241:5: error: unknown type name ‘xmlNode’
         xmlNode *versioned_params;
         ^

diff --git a/include/crm/lrmd.h b/include/crm/lrmd.h
index 446b39c..6f829f7 100644
--- a/include/crm/lrmd.h
+++ b/include/crm/lrmd.h
@@ -23,6 +23,7 @@
  * \ingroup lrmd
  */
 #include <stdbool.h>
+#include <libxml/tree.h>
 #include <crm/services.h>
 
 #ifndef LRMD__H

Reply via email to