Hello community,

here is the log from the commit of package resource-agents for openSUSE:Factory 
checked in at 2017-06-02 10:28:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/resource-agents (Old)
 and      /work/SRC/openSUSE:Factory/.resource-agents.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "resource-agents"

Fri Jun  2 10:28:57 2017 rev:73 rq:496475 version:4.0.1+git.1495055229.643177f1

Changes:
--------
--- /work/SRC/openSUSE:Factory/resource-agents/resource-agents.changes  
2017-02-19 00:58:15.682927881 +0100
+++ /work/SRC/openSUSE:Factory/.resource-agents.new/resource-agents.changes     
2017-06-02 10:29:00.520560297 +0200
@@ -2 +2 @@
-Tue Feb 07 17:17:34 UTC 2017 - [email protected]
+Wed May 17 22:04:17 UTC 2017 - [email protected]
@@ -4 +4,21 @@
-- Update to version 4.0.1+git.1486025494.150fb85
+- Update to version 4.0.1+git.1495055229.643177f1:
+  * High: SAPInstance: Add IS_ERS parameter (bsc#1036486)
+  * High: DB2: fix HADR support for DB2 V98+ (bsc#1035470)
+  * Medium: iSCSILogicalUnit/iSCSITarget: protect targetcli invocations with 
locks
+  * Medium: iSCSILogicalUnit: lio-t IPv6-support
+  * Medium: LVM: add check_writethrough parameter
+  * Medium: galera: fix permission of temporary log file for mariadb 10.1.21+
+  * Medium: galera: fix the first bootstrap when cluster has no data
+  * Medium: docker: fix to deal with the image name correctly.
+  * Medium: named: Add support for rndc options in named resource agent.
+  * Medium: NodeUtilization: Add NodeUtilization agent
+  * Medium: rabbitmq-cluster: Allow the rabbitmq cluster to work on pacemaker 
remote nodes
+  * Medium: galera: fix master target during promotion with cluster_host_map
+  * Medium: IPaddr2: add option for specifying IPv6's preferred_lft
+  * Medium: docker: Allow callers to specify a set of directories that should 
be created if the don't exist
+  * Low: pgsql: fix regex in set async mode
+  * Low: added kamctl parameter as it was missing, causing issues if kamctl is 
not in PATH
+  * Low: clvm: remove reload action from metadata
+  * Low: iSCSILogicalUnit: replace openssl call with md5sum
+  * Low: nginx: fix return code for configfile err
+  * Add 0006-Revert-ocf_log-use-same-log-format-as-pacemaker.patch

Old:
----
  resource-agents-4.0.1+git.1486025494.150fb85.tar.xz

New:
----
  0006-Revert-ocf_log-use-same-log-format-as-pacemaker.patch
  resource-agents-4.0.1+git.1495055229.643177f1.tar.xz

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

Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.Lsinik/_old  2017-06-02 10:29:01.168468747 +0200
+++ /var/tmp/diff_new_pack.Lsinik/_new  2017-06-02 10:29:01.168468747 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           resource-agents
-Version:        4.0.1+git.1486025494.150fb85
+Version:        4.0.1+git.1495055229.643177f1
 Release:        0
 Summary:        Open Source HA Reusable Cluster Resource Scripts
 License:        GPL-2.0 and LGPL-2.1+ and GPL-3.0+
@@ -37,6 +37,8 @@
 Patch4:         0004-Revert-Low-build-Move-binaries-in-usr-lib-heartbeat-.patch
 # PATCH-FIX-OPENSUSE: Medium: CTDB: Use --logging syntax for ctdbd (bsc#981863)
 Patch5:         0005-Medium-CTDB-Use-logging-syntax-for-ctdbd-bsc-981863.patch
+# PATCH-FIX-OPENSUSE: Revert ocf_log: use same log format at pacemaker
+Patch6:         0006-Revert-ocf_log-use-same-log-format-as-pacemaker.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  docbook-xsl-stylesheets
@@ -49,6 +51,7 @@
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(python)
 Obsoletes:      heartbeat-resources
+Provides:       %{name}-devel = %{version}
 Provides:       heartbeat-resources
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
@@ -107,6 +110,7 @@
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %build
 autoreconf -fvi

++++++ 0001-LVM-Default-partial_activation-to-true-in-SLE-HAE.patch ++++++
--- /var/tmp/diff_new_pack.Lsinik/_old  2017-06-02 10:29:01.192465356 +0200
+++ /var/tmp/diff_new_pack.Lsinik/_new  2017-06-02 10:29:01.192465356 +0200
@@ -1,17 +1,17 @@
-From 177ced07b7173798eaa5bca803e5dc1e003aa0cc Mon Sep 17 00:00:00 2001
+From 566778b8bdf3461d6c449cc1c1ef0239485afc84 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]>
-Date: Wed, 1 Feb 2017 14:51:23 +0100
-Subject: [PATCH 1/5] LVM: Default partial_activation to true in SLE HAE
+Date: Thu, 18 May 2017 00:16:59 +0200
+Subject: [PATCH 1/6] LVM: Default partial_activation to true in SLE HAE
 
 ---
  heartbeat/LVM | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
 
 diff --git a/heartbeat/LVM b/heartbeat/LVM
-index 90a900b..e9e5813 100755
+index 5b265f58..a5fa463f 100755
 --- a/heartbeat/LVM
 +++ b/heartbeat/LVM
-@@ -100,10 +100,10 @@ If "exclusive" is set on a non clustered volume group, 
this overrides the tag to
+@@ -102,10 +102,10 @@ If "exclusive" is set on a non clustered volume group, 
this overrides the tag to
  <longdesc lang="en">
  If set, the volume group will be activated partially even with some
  physical volumes missing. It helps to set to true when using mirrored
@@ -23,8 +23,8 @@
 +<content type="string" default="true" />
  </parameter>
  
- </parameters>
-@@ -368,7 +368,7 @@ get_activate_options()
+ <parameter name="check_writethrough" unique="0" required="0">
+@@ -378,7 +378,7 @@ get_activate_options()
        2) options="${options}ey";;
        esac
  
@@ -33,7 +33,7 @@
                options="${options} --partial"
        fi
  
-@@ -682,6 +682,7 @@ then
+@@ -699,6 +699,7 @@ then
        exit $OCF_ERR_INSTALLED
  fi
  LVM_MAJOR="${LVM_VERSION%%.*}"
@@ -42,5 +42,5 @@
  VOLUME=$OCF_RESKEY_volgrpname
  OP_METHOD=$1
 -- 
-2.10.1
+2.12.2
 

++++++ 0002-nfsserver-fix-path-to-sm-notify.patch ++++++
--- /var/tmp/diff_new_pack.Lsinik/_old  2017-06-02 10:29:01.204463661 +0200
+++ /var/tmp/diff_new_pack.Lsinik/_new  2017-06-02 10:29:01.208463096 +0200
@@ -1,14 +1,14 @@
-From e2aedf01dd440e3d4d5f88c5966c13159e763966 Mon Sep 17 00:00:00 2001
+From 2217dfd50d80c7fe0028d75be36af83c7fc362e0 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]>
 Date: Wed, 1 Feb 2017 14:52:01 +0100
-Subject: [PATCH 2/5] nfsserver: fix path to sm-notify
+Subject: [PATCH 2/6] nfsserver: fix path to sm-notify
 
 ---
  heartbeat/nfsserver | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/heartbeat/nfsserver b/heartbeat/nfsserver
-index bac5bbb..6e32d37 100755
+index bac5bbbb..6e32d37a 100755
 --- a/heartbeat/nfsserver
 +++ b/heartbeat/nfsserver
 @@ -27,7 +27,7 @@ do
@@ -21,5 +21,5 @@
  DEFAULT_RPCPIPEFS_DIR="/var/lib/nfs/rpc_pipefs"
  EXEC_MODE=0
 -- 
-2.10.1
+2.12.2
 

++++++ 0003-ldirectord-don-t-create-subsys-lock.patch ++++++
--- /var/tmp/diff_new_pack.Lsinik/_old  2017-06-02 10:29:01.216461966 +0200
+++ /var/tmp/diff_new_pack.Lsinik/_new  2017-06-02 10:29:01.220461400 +0200
@@ -1,14 +1,14 @@
-From 33607fcb964ed44876a2c5af50fa7590142fc333 Mon Sep 17 00:00:00 2001
+From 6a2ec7f170c0ca2a2940c9e72321ff4ff6699c97 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]>
 Date: Wed, 1 Feb 2017 14:52:50 +0100
-Subject: [PATCH 3/5] ldirectord: don't create subsys lock
+Subject: [PATCH 3/6] ldirectord: don't create subsys lock
 
 ---
  ldirectord/init.d/ldirectord.in | 2 --
  1 file changed, 2 deletions(-)
 
 diff --git a/ldirectord/init.d/ldirectord.in b/ldirectord/init.d/ldirectord.in
-index 9d8083e..f7ab552 100755
+index 9d8083e4..f7ab5525 100755
 --- a/ldirectord/init.d/ldirectord.in
 +++ b/ldirectord/init.d/ldirectord.in
 @@ -60,11 +60,9 @@ action() {
@@ -24,5 +24,5 @@
    restart)
          action "Restarting ldirectord" $DAEMON restart
 -- 
-2.10.1
+2.12.2
 

++++++ 0004-Revert-Low-build-Move-binaries-in-usr-lib-heartbeat-.patch ++++++
--- /var/tmp/diff_new_pack.Lsinik/_old  2017-06-02 10:29:01.228460270 +0200
+++ /var/tmp/diff_new_pack.Lsinik/_new  2017-06-02 10:29:01.228460270 +0200
@@ -1,7 +1,7 @@
-From db257a532c27e592b8cf7161acf4bf0652e3fe6f Mon Sep 17 00:00:00 2001
+From 91f6ab238e3dfc4620660d62497ec37119740d2c Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]>
-Date: Wed, 1 Feb 2017 14:53:28 +0100
-Subject: [PATCH 4/5] Revert "Low: build: Move binaries in /usr/lib/heartbeat
+Date: Thu, 18 May 2017 00:18:14 +0200
+Subject: [PATCH 4/6] Revert "Low: build: Move binaries in /usr/lib/heartbeat
  to /usr/libexec/heartbeat to avoid multi-lib inconsistencies"
 
 This reverts commit 1e79b7831d9daf9cbfa852f0d6f909d2f7ec4a2a.
@@ -13,7 +13,7 @@
  4 files changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/heartbeat/Makefile.am b/heartbeat/Makefile.am
-index 91d4090..e03b9da 100644
+index 044314bf..c52227df 100644
 --- a/heartbeat/Makefile.am
 +++ b/heartbeat/Makefile.am
 @@ -25,7 +25,7 @@ EXTRA_DIST           = $(ocf_SCRIPTS) $(ocfcommon_DATA) \
@@ -26,7 +26,7 @@
  ocfdir                        = $(OCF_RA_DIR_PREFIX)/heartbeat
  
 diff --git a/heartbeat/ocf-directories.in b/heartbeat/ocf-directories.in
-index 8d70776..7246e08 100644
+index d8df035e..f734162e 100644
 --- a/heartbeat/ocf-directories.in
 +++ b/heartbeat/ocf-directories.in
 @@ -11,7 +11,7 @@ exec_prefix=@exec_prefix@
@@ -36,10 +36,10 @@
 -: ${HA_BIN:=@libexecdir@/heartbeat}
 +: ${HA_BIN:=@libdir@/heartbeat}
  : ${HA_SBIN_DIR:=@sbindir@}
- : ${HA_DATEFMT:="%Y/%m/%d_%T "}
+ : ${HA_DATEFMT:="%b %d %T "}
  : ${HA_DEBUGLOG:=/dev/null}
 diff --git a/resource-agents.spec.in b/resource-agents.spec.in
-index d87364d..aa087ec 100644
+index d87364db..aa087ecd 100644
 --- a/resource-agents.spec.in
 +++ b/resource-agents.spec.in
 @@ -280,7 +280,7 @@ rm -rf %{buildroot}
@@ -52,7 +52,7 @@
  %post -n resource-agents
  if [ $1 = 2 ]; then
 diff --git a/tools/Makefile.am b/tools/Makefile.am
-index 1186967..71292bf 100644
+index 1186967c..71292bf3 100644
 --- a/tools/Makefile.am
 +++ b/tools/Makefile.am
 @@ -23,7 +23,7 @@ SUBDIRS                      = ocft
@@ -65,5 +65,5 @@
  EXTRA_DIST            = ocf-tester.8 sfex_init.8
  
 -- 
-2.10.1
+2.12.2
 

++++++ 0005-Medium-CTDB-Use-logging-syntax-for-ctdbd-bsc-981863.patch ++++++
--- /var/tmp/diff_new_pack.Lsinik/_old  2017-06-02 10:29:01.240458575 +0200
+++ /var/tmp/diff_new_pack.Lsinik/_new  2017-06-02 10:29:01.240458575 +0200
@@ -1,7 +1,7 @@
-From a0e995ff40a3b98dc3cb89d251748d4a2d5e8d46 Mon Sep 17 00:00:00 2001
+From 40d21e3c6fee1bc0c47fab0bfaa175e642adb341 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]>
 Date: Wed, 1 Feb 2017 14:55:09 +0100
-Subject: [PATCH 5/5] Medium: CTDB: Use --logging syntax for ctdbd (bsc#981863)
+Subject: [PATCH 5/6] Medium: CTDB: Use --logging syntax for ctdbd (bsc#981863)
 
 The --logfile parameter in ctdb has been replaced with
 --logging, which allows for file: or syslog:.
@@ -10,7 +10,7 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/heartbeat/CTDB b/heartbeat/CTDB
-index b23ffae..9fe8f18 100755
+index b23ffae5..9fe8f185 100755
 --- a/heartbeat/CTDB
 +++ b/heartbeat/CTDB
 @@ -572,9 +572,9 @@ ctdb_start() {
@@ -26,5 +26,5 @@
                # ensure the logfile's directory exists, otherwise ctdb will 
fail to start
                mkdir -p $(dirname $OCF_RESKEY_ctdb_logfile)
 -- 
-2.10.1
+2.12.2
 

++++++ 0006-Revert-ocf_log-use-same-log-format-as-pacemaker.patch ++++++
>From fa566f94cf5a491ce5f06e9b9edcc5d39edd05f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]>
Date: Thu, 18 May 2017 00:11:10 +0200
Subject: [PATCH 6/6] Revert "ocf_log: use same log format as pacemaker"

This reverts commit 75816393878bf063a8c3404b5c747868024e1097.
---
 heartbeat/ocf-directories.in | 2 +-
 heartbeat/ocf-shellfuncs.in  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/heartbeat/ocf-directories.in b/heartbeat/ocf-directories.in
index f734162e..7246e088 100644
--- a/heartbeat/ocf-directories.in
+++ b/heartbeat/ocf-directories.in
@@ -13,7 +13,7 @@ exec_prefix=@exec_prefix@
 : ${HA_FIFO:=@localstatedir@/lib/heartbeat/fifo}
 : ${HA_BIN:=@libdir@/heartbeat}
 : ${HA_SBIN_DIR:=@sbindir@}
-: ${HA_DATEFMT:="%b %d %T "}
+: ${HA_DATEFMT:="%Y/%m/%d_%T "}
 : ${HA_DEBUGLOG:=/dev/null}
 : ${HA_RESOURCEDIR:=$HA_DIR/resource.d}
 : ${HA_DOCDIR:=@datadir@/doc/heartbeat}
diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in
index 4a74e201..a0716bb6 100644
--- a/heartbeat/ocf-shellfuncs.in
+++ b/heartbeat/ocf-shellfuncs.in
@@ -231,7 +231,7 @@ __ha_log() {
          [ -n "$HA_LOGFILE" ]
        then
          : appending to $HA_LOGFILE
-         echo `hadate`" $HA_LOGTAG:    ${*}" >> $HA_LOGFILE
+         echo "$HA_LOGTAG:     "`hadate`"${*}" >> $HA_LOGFILE
        fi
        if
          [ -z "$HA_LOGFACILITY" -a -z "$HA_LOGFILE" ] && ! [ "$ignore_stderr" 
= "true" ]
-- 
2.12.2

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.Lsinik/_old  2017-06-02 10:29:01.280452924 +0200
+++ /var/tmp/diff_new_pack.Lsinik/_new  2017-06-02 10:29:01.284452359 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
 <param name="url">git://github.com/ClusterLabs/resource-agents.git</param>
-<param name="changesrevision">3cf75fbc5b73d3f6bdabd19e02c4664b630a62eb</param>
+<param name="changesrevision">643177f1880f0217e3e2e797195c69158a4f577f</param>
 </service>
 </servicedata>
\ No newline at end of file

++++++ resource-agents-4.0.1+git.1486025494.150fb85.tar.xz -> 
resource-agents-4.0.1+git.1495055229.643177f1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/.gitattributes 
new/resource-agents-4.0.1+git.1495055229.643177f1/.gitattributes
--- old/resource-agents-4.0.1+git.1486025494.150fb85/.gitattributes     
1970-01-01 01:00:00.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/.gitattributes    
2017-05-17 23:07:09.000000000 +0200
@@ -0,0 +1,2 @@
+configure.ac export-subst
+heartbeat/ocf-shellfuncs.in export-subst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/ci/build.sh 
new/resource-agents-4.0.1+git.1495055229.643177f1/ci/build.sh
--- old/resource-agents-4.0.1+git.1486025494.150fb85/ci/build.sh        
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/ci/build.sh       
2017-05-17 23:07:09.000000000 +0200
@@ -68,7 +68,7 @@
                check "$script"
        done < <(eval "$(find_cmd)")
        if [ $failed -gt 0 ]; then
-               echo "$failed failures detected."
+               echo "ci/build.sh: $failed failure(s) detected."
                exit 1
        fi
        exit 0
@@ -77,5 +77,5 @@
 ./autogen.sh
 ./configure
 make check
-[ $? ] || failed=$((failed + 1))
+[ $? -eq 0 ] || failed=$((failed + 1))
 check_all_executables
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/doc/dev-guides/ra-dev-guide.asc
 
new/resource-agents-4.0.1+git.1495055229.643177f1/doc/dev-guides/ra-dev-guide.asc
--- 
old/resource-agents-4.0.1+git.1486025494.150fb85/doc/dev-guides/ra-dev-guide.asc
    2017-02-02 09:51:34.000000000 +0100
+++ 
new/resource-agents-4.0.1+git.1495055229.643177f1/doc/dev-guides/ra-dev-guide.asc
   2017-05-17 23:07:09.000000000 +0200
@@ -261,10 +261,8 @@
 
 === +OCF_ERR_ARGS+ (2)
 
-The resource agent was invoked with incorrect arguments. This is a
-safety net "can't happen" error which the resource agent should only
-return when invoked with, for example, an incorrect number of command
-line arguments.
+The resource’s configuration is not valid on this machine. E.g. it
+refers to a location not found on the node.
 
 NOTE: The resource agent should not return this error when instructed
 to perform an action that it does not support. Instead, under those
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/doc/man/Makefile.am 
new/resource-agents-4.0.1+git.1495055229.643177f1/doc/man/Makefile.am
--- old/resource-agents-4.0.1+git.1486025494.150fb85/doc/man/Makefile.am        
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/doc/man/Makefile.am       
2017-05-17 23:07:09.000000000 +0200
@@ -73,6 +73,7 @@
                           ocf_heartbeat_MailTo.7 \
                           ocf_heartbeat_ManageRAID.7 \
                           ocf_heartbeat_ManageVE.7 \
+                          ocf_heartbeat_NodeUtilization.7 \
                           ocf_heartbeat_Pure-FTPd.7 \
                           ocf_heartbeat_Raid1.7 \
                           ocf_heartbeat_Route.7 \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/IPaddr2 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/IPaddr2
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/IPaddr2  
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/IPaddr2 
2017-05-17 23:07:09.000000000 +0200
@@ -56,6 +56,7 @@
 #      OCF_RESKEY_arp_count
 #      OCF_RESKEY_arp_bg
 #      OCF_RESKEY_arp_mac
+#      OCF_RESKEY_preferred_lft
 #
 #      OCF_RESKEY_CRM_meta_clone
 #      OCF_RESKEY_CRM_meta_clone_max
@@ -80,6 +81,7 @@
 OCF_RESKEY_arp_bg_default=true
 OCF_RESKEY_arp_mac_default="ffffffffffff"
 OCF_RESKEY_run_arping_default=false
+OCF_RESKEY_preferred_lft_default="forever"
 
 : ${OCF_RESKEY_lvs_support=${OCF_RESKEY_lvs_support_default}}
 : ${OCF_RESKEY_lvs_ipv6_addrlabel=${OCF_RESKEY_lvs_ipv6_addrlabel_default}}
@@ -92,6 +94,7 @@
 : ${OCF_RESKEY_arp_bg=${OCF_RESKEY_arp_bg_default}}
 : ${OCF_RESKEY_arp_mac=${OCF_RESKEY_arp_mac_default}}
 : ${OCF_RESKEY_run_arping=${OCF_RESKEY_run_arping_default}}
+: ${OCF_RESKEY_preferred_lft=${OCF_RESKEY_preferred_lft_default}}
 #######################################################################
 
 SENDARP=$HA_BIN/send_arp
@@ -350,6 +353,17 @@
 <content type="string" default="${OCF_RESKEY_run_arping_default}"/>
 </parameter>
 
+<parameter name="preferred_lft">
+<longdesc lang="en">
+For IPv6, set the preferred lifetime of the IP address.
+This can be used to ensure that the created IP address will not
+be used as a source address for routing.
+Expects a value as specified in section 5.5.4 of RFC 4862.
+</longdesc>
+<shortdesc lang="en">IPv6 preferred lifetime</shortdesc>
+<content type="string" default="${OCF_RESKEY_preferred_lft_default}"/>
+</parameter>
+
 </parameters>
 <actions>
 <action name="start"   timeout="20s" />
@@ -590,6 +604,10 @@
                cmd="$cmd label $label"
                msg="${msg} (with label $label)"
        fi
+       if [ "$FAMILY" = "inet6" ] ;then
+               cmd="$cmd preferred_lft $OCF_RESKEY_preferred_lft"
+               msg="${msg} (with preferred_lft $OCF_RESKEY_preferred_lft)"
+       fi
 
        ocf_log info "$msg"
        ocf_run $cmd || return $OCF_ERR_GENERIC
@@ -1076,6 +1094,11 @@
        exit $OCF_ERR_CONFIGURED
     fi
 
+    if [ -z "$OCF_RESKEY_preferred_lft" ]; then
+       ocf_exit_reason "Empty value is invalid for OCF_RESKEY_preferred_lft"
+       exit $OCF_ERR_CONFIGURED
+    fi
+
     if [ -n "$IP_CIP" ]; then
 
        local valid=1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/LVM 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/LVM
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/LVM      
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/LVM     
2017-05-17 23:07:09.000000000 +0200
@@ -29,6 +29,8 @@
 : ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
 . ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
 
+OCF_RESKEY_check_writethrough_default="false"
+
 #######################################################################
 
 
@@ -106,6 +108,14 @@
 <content type="string" default="false" />
 </parameter>
 
+<parameter name="check_writethrough" unique="0" required="0">
+<longdesc lang="en">
+If set to true, check if cache_mode is set to writethrough.
+</longdesc>
+<shortdesc lang="en">Check if cache_mode is set to writethrough</shortdesc>
+<content type="string" default="${OCF_RESKEY_check_writethrough_default}" />
+</parameter>
+
 </parameters>
 
 <actions>
@@ -583,6 +593,13 @@
                exit $OCF_ERR_GENERIC
        fi
 
+       if ocf_is_true "$OCF_RESKEY_check_writethrough"; then
+               if ! lvs --noheadings -o cache_mode "$OCF_RESKEY_volgrpname" | 
grep -q "writethrough"; then
+                       ocf_exit_reason "LVM cache is not in writethrough mode."
+                       exit $OCF_ERR_CONFIGURED
+               fi
+       fi
+
        ##
        # If exclusive activation is not enabled, then
        # further checking of proper setup is not necessary
@@ -690,6 +707,8 @@
        OUR_TAG=$OCF_RESKEY_tag
 fi
 
+: ${OCF_RESKEY_check_writethrough=${OCF_RESKEY_check_writethrough_default}}
+
 # What kind of method was invoked?
 case "$1" in
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/Makefile.am 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/Makefile.am
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/Makefile.am      
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/Makefile.am     
2017-05-17 23:07:09.000000000 +0200
@@ -68,6 +68,7 @@
                        MailTo                  \
                        ManageRAID              \
                        ManageVE                \
+                       NodeUtilization \
                        Pure-FTPd               \
                        Raid1                   \
                        Route                   \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/NodeUtilization 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/NodeUtilization
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/NodeUtilization  
1970-01-01 01:00:00.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/NodeUtilization 
2017-05-17 23:07:09.000000000 +0200
@@ -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 <<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)
+
+        [ $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 <<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 $*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/SAPInstance 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/SAPInstance
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/SAPInstance      
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/SAPInstance     
2017-05-17 23:07:09.000000000 +0200
@@ -31,6 +31,7 @@
 #      OCF_RESKEY_POST_START_USEREXIT  (optional, lists a script which can be 
executed after the resource is started)
 #      OCF_RESKEY_PRE_STOP_USEREXIT    (optional, lists a script which can be 
executed before the resource is stopped)
 #      OCF_RESKEY_POST_STOP_USEREXIT   (optional, lists a script which can be 
executed after the resource is stopped)
+#      OCF_RESKEY_IS_ERS               (needed for ENQ/REPL NW 740)
 #
 #  TODO: - Option to shutdown sapstartsrv for non-active instances -> that 
means: do probes only with OS tools (sapinstance_status)
 #        - Option for better standalone enqueue server monitoring, using 
ensmon (test enque-deque)
@@ -195,6 +196,15 @@
   <shortdesc lang="en">Path to a post-start script</shortdesc>
   <content type="string" default="" />
  </parameter>
+ <parameter name="IS_ERS" unique="0" required="0">
+  <longdesc lang="en">Only used for ASCS/ERS SAP Netweaver installations 
without implementing a master/slave resource to
+    allow the ASCS to 'find' the ERS running on an other cluster node after a 
resource failure. This parameter should be set
+    to true 'only' for the ERS instance for implementations following the SAP 
NetWeaver 7.40 HA certification (NW-HA-CLU-740). This includes also
+    systems for NetWeaver less than 7.40, if you like to impelemnt the 
NW-HA-CLU-740 scenario.
+  </longdesc>
+  <shortdesc lang="en">Mark SAPInstance as ERS instance</shortdesc>
+  <content type="boolean" default="false" />
+ </parameter>
 </parameters>
 
 <actions>
@@ -342,6 +352,12 @@
     currentSTART_PROFILE=$OCF_RESKEY_START_PROFILE
   fi
 
+  if [ -z "$OCF_RESKEY_IS_ERS" ]; then
+      is_ers="no"
+  else
+      is_ers="$OCF_RESKEY_IS_ERS"
+  fi
+
   if [ -z "$currentSTART_PROFILE" ]
   then
     SAPSTARTPROFILE="$DIR_PROFILE/START_${InstanceName}_${SAPVIRHOST}"
@@ -568,9 +584,11 @@
     ocf_log info "SAP Instance $SID-$InstanceName started: $output"
     rc=$OCF_SUCCESS
     sapuserexit POST_START_USEREXIT "$OCF_RESKEY_POST_START_USEREXIT"
+    if ocf_is_true $is_ers; then crm_attribute -n runs_ers_${SID} -v 1 -l 
reboot; fi
   else
     ocf_log err "SAP Instance $SID-$InstanceName start failed: $output"
     rc=$OCF_NOT_RUNNING
+    if ocf_is_true $is_ers; then crm_attribute -n runs_ers_${SID} -v 0 -l 
reboot; fi
   fi
 
   return $rc
@@ -628,6 +646,7 @@
   fi
 
   sapuserexit POST_STOP_USEREXIT "$OCF_RESKEY_POST_STOP_USEREXIT"
+  if ocf_is_true $is_ers; then crm_attribute -n runs_ers_${SID} -v 0 -l 
reboot;  fi
 
   return $rc
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/clvm 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/clvm
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/clvm     
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/clvm    
2017-05-17 23:07:09.000000000 +0200
@@ -78,7 +78,6 @@
 <action name="start"        timeout="90" />
 <action name="stop"         timeout="90" />
 <action name="monitor"      timeout="90" interval="30" depth="0" />
-<action name="reload"       timeout="90" />
 <action name="meta-data"    timeout="10" />
 <action name="validate-all"   timeout="20" />
 </actions>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/db2 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/db2
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/db2      
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/db2     
2017-05-17 23:07:09.000000000 +0200
@@ -650,7 +650,9 @@
     fi
 
     echo "$output" |
-    awk '/^HADR is not active/ {print "Standard/Standalone"; exit; }
+    awk '/^\s+HADR_(ROLE|STATE) =/ {printf $3"/"}
+         /^\s+HADR_CONNECT_STATUS =/ {print $3; exit; }
+         /^HADR is not active/ {print "Standard/Standalone"; exit; }
          /^Role *State */ {getline; printf "%s/%s\n", $1, $2; exit; }'
 }
 
@@ -680,7 +682,7 @@
 
         # set master preference accordingly
         case "$hadr" in
-            Primary/*|Standard/*)
+            PRIMARY/*|Primary/*|Standard/*)
             # perform  a basic health check
             CMD="if db2 connect to $db;
             then 
@@ -712,11 +714,11 @@
             ocf_is_ms && master_score -v 10000 -l reboot
             ;;
 
-            Standby/*Peer)
+            STANDBY/PEER/*|Standby/*Peer)
             master_score -v 8000 -l reboot
             ;;
 
-            Standby/*)
+            STANDBY/*|Standby/*)
             ocf_log warn "DB2 database $instance($db2node)/$db in status $hadr 
can never be promoted"
             master_score -D -l reboot
             ;;
@@ -755,17 +757,17 @@
             return $OCF_SUCCESS
             ;;
 
-            Primary/Peer)
+            PRIMARY/PEER/*|PRIMARY/REMOTE_CATCHUP/*|Primary/Peer)
             # nothing to do, only update pacemaker's view
             echo MASTER > $STATE_FILE
             return $OCF_SUCCESS
             ;;
 
-            Standby/Peer)
+            STANDBY/PEER/CONNECTED|Standby/Peer)
             # must take over 
             ;;
 
-            Standby/DisconnectedPeer)
+            STANDBY/PEER/DISCONNECTED|Standby/DisconnectedPeer)
             # must take over forced 
             force="by force peer window only"
             ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/docker 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/docker
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/docker   
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/docker  
2017-05-17 23:07:09.000000000 +0200
@@ -106,6 +106,15 @@
 <content type="string"/>
 </parameter>
 
+<parameter name="mount_points" required="0" unique="0">
+<longdesc lang="en">
+A comma separated list of directories that the container is expecting to use.
+The agent will ensure they exist by running 'mkdir -p' 
+</longdesc>
+<shortdesc lang="en">Required mount points</shortdesc>
+<content type="string"/>
+</parameter>
+
 <parameter name="monitor_cmd" required="0" unique="0">
 <longdesc lang="en">
 Specifiy the full path of a command to launch within the container to check
@@ -263,8 +272,18 @@
        monitor_cmd_exec
 }
 
+docker_create_mounts() {
+       oldIFS="$IFS"
+       IFS=","
+       for directory in $OCF_RESKEY_mount_points; do
+               mkdir -p "$directory"
+       done
+       IFS="$oldIFS"
+}
+
 docker_start()
 {
+       docker_create_mounts
        local run_opts="-d --name=${CONTAINER}"
        # check to see if the container has already started
        docker_simple_status
@@ -360,24 +379,31 @@
 
 image_exists()
 {
-       # assume that OCF_RESKEY_name have been validated
-       local IMAGE_NAME="$(echo ${OCF_RESKEY_image} | awk -F':' '{print $1}')"
-
        # if no tag was specified, use default "latest"
        local COLON_FOUND=0
+       local SLASH_FOUND=0
+       local SERVER_NAME=""
+       local IMAGE_NAME="${OCF_RESKEY_image}"
        local IMAGE_TAG="latest"
 
-       COLON_FOUND="$(echo "${OCF_RESKEY_image}" | grep -o ':' | grep -c .)"
+       SLASH_FOUND="$(echo "${OCF_RESKEY_image}" | grep -o '/' | grep -c .)"
+
+       if [ ${SLASH_FOUND} -ge 1 ]; then
+               SERVER_NAME="$(echo ${IMAGE_NAME} | cut -d / -f 
1-${SLASH_FOUND})"
+               IMAGE_NAME="$(echo ${IMAGE_NAME} | awk -F'/' '{print $NF}')"
+       fi
 
-       if [ ${COLON_FOUND} -ne 0 ]; then
-               IMAGE_TAG="$(echo ${OCF_RESKEY_image} | awk -F':' '{print 
$NF}')"
+       COLON_FOUND="$(echo "${IMAGE_NAME}" | grep -o ':' | grep -c .)"
+       if [ ${COLON_FOUND} -ge 1 ]; then
+               IMAGE_TAG="$(echo ${IMAGE_NAME} | awk -F':' '{print $NF}')"
+               IMAGE_NAME="$(echo ${IMAGE_NAME} | cut -d : -f 
1-${COLON_FOUND})"
        fi
 
        # IMAGE_NAME might be following formats:
        # - image
-       # - repository/image
+       # - repository:port/image
        # - docker.io/image (some distro will display "docker.io/" as prefix)
-       docker images | awk '{print $1 ":" $2}' | egrep -q -s 
"^(docker.io\/)?${IMAGE_NAME}:${IMAGE_TAG}\$"
+       docker images | awk '{print $1 ":" $2}' | egrep -q -s 
"^(docker.io\/|${SERVER_NAME}\/)?${IMAGE_NAME}:${IMAGE_TAG}\$"
        if [ $? -eq 0 ]; then
                # image found
                return 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/galera 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/galera
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/galera   
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/galera  
2017-05-17 23:07:09.000000000 +0200
@@ -415,6 +415,13 @@
 {
 
     for node in $(echo "$OCF_RESKEY_wsrep_cluster_address" | sed 
's/gcomm:\/\///g' | tr -d ' ' | tr -s ',' ' '); do
+        local pcmk_node=$(galera_to_pcmk_name $node)
+        if [ -z "$pcmk_node" ]; then
+            ocf_log err "Could not determine pacemaker node from galera name 
<${node}>."
+            return
+        else
+            node=$pcmk_node
+        fi
 
         set_master_score $node
     done
@@ -451,17 +458,27 @@
 detect_first_master()
 {
     local best_commit=0
-    local best_node="$NODENAME"
     local last_commit=0
     local missing_nodes=0
     local nodes=""
     local nodes_recovered=""
+    local all_nodes
+    local best_node_gcomm
+    local best_node
+
+    all_nodes=$(echo "$OCF_RESKEY_wsrep_cluster_address" | sed 
's/gcomm:\/\///g' | tr -d ' ' | tr -s ',' ' ')
+    best_node_gcomm=$(echo "$all_nodes" | sed 's/^.* \(.*\)$/\1/')
+    best_node=$(galera_to_pcmk_name $best_node_gcomm)
+    if [ -z "$best_node" ]; then
+        ocf_log err "Could not determine initial best node from galera name 
<${best_node_gcomm}>."
+        return
+    fi
 
     # avoid selecting a recovered node as bootstrap if possible
-    for node in $(echo "$OCF_RESKEY_wsrep_cluster_address" | sed 
's/gcomm:\/\///g' | tr -d ' ' | tr -s ',' ' '); do
+    for node in $all_nodes; do
         local pcmk_node=$(galera_to_pcmk_name $node)
         if [ -z "$pcmk_node" ]; then
-            ocf_log error "Could not determine pacemaker node from galera name 
<${node}>."
+            ocf_log err "Could not determine pacemaker node from galera name 
<${node}>."
             return
         else
             node=$pcmk_node
@@ -520,6 +537,7 @@
     last_commit="$(cat ${OCF_RESKEY_datadir}/grastate.dat | sed -n 
's/^seqno.\s*\(.*\)\s*$/\1/p')"
     if [ -z "$last_commit" ] || [ "$last_commit" = "-1" ]; then
         local tmp=$(mktemp)
+        chown $OCF_RESKEY_user:$OCF_RESKEY_group $tmp
 
         # if we pass here because grastate.dat doesn't exist,
         # try not to bootstrap from this node if possible
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/iSCSILogicalUnit 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/iSCSILogicalUnit
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/iSCSILogicalUnit 
2017-02-02 09:51:34.000000000 +0100
+++ 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/iSCSILogicalUnit    
    2017-05-17 23:07:09.000000000 +0200
@@ -56,7 +56,7 @@
 : ${OCF_RESKEY_scsi_id=${OCF_RESKEY_scsi_id_default}}
 # To have a reasonably unique default SCSI SN, use the first 8 bytes
 # of an MD5 hash of of $OCF_RESOURCE_INSTANCE
-sn=`echo -n "${OCF_RESOURCE_INSTANCE}" | openssl md5 | sed -e 's/(stdin)= //'`
+sn=`echo -n "${OCF_RESOURCE_INSTANCE}" | md5sum | sed -e 's/ .*//'`
 OCF_RESKEY_scsi_sn_default=${sn:0:8}
 : ${OCF_RESKEY_scsi_sn=${OCF_RESKEY_scsi_sn_default}}
 # set 0 as a default value for lio iblock device number
@@ -75,6 +75,8 @@
 # OCF_RESKEY_tgt_bsopts
 # OCF_RESKEY_tgt_device_type
 
+# targetcli: iSCSITarget and iSCSILogicalUnit must use the same lockfile
+TARGETLOCKFILE=${HA_RSCTMP}/targetcli.lock
 #######################################################################
 
 meta_data() {
@@ -371,6 +373,8 @@
                fi
                ;;
        lio-t)
+               ocf_take_lock $TARGETLOCKFILE
+               ocf_release_lock_on_exit $TARGETLOCKFILE
                # For lio, we first have to create a target device, then
                # add it to the Target Portal Group as an LU.
                ocf_run targetcli /backstores/block create 
name=${OCF_RESOURCE_INSTANCE} dev=${OCF_RESKEY_path} || exit $OCF_ERR_GENERIC
@@ -379,6 +383,11 @@
                fi
                ocf_run targetcli /iscsi/${OCF_RESKEY_target_iqn}/tpg1/luns 
create /backstores/block/${OCF_RESOURCE_INSTANCE} ${OCF_RESKEY_lun} || exit 
$OCF_ERR_GENERIC
 
+               if $(ip a | grep -q inet6); then
+                       ocf_run -q targetcli 
/iscsi/${OCF_RESKEY_target_iqn}/tpg1/portals delete 0.0.0.0 3260
+                       ocf_run -q targetcli 
/iscsi/${OCF_RESKEY_target_iqn}/tpg1/portals create ::0
+               fi
+
                if [ -n "${OCF_RESKEY_allowed_initiators}" ]; then
                        for initiator in ${OCF_RESKEY_allowed_initiators}; do
                                ocf_run targetcli 
/iscsi/${OCF_RESKEY_target_iqn}/tpg1/acls create ${initiator} 
add_mapped_luns=False || exit $OCF_ERR_GENERIC
@@ -440,6 +449,8 @@
                fi
                ;;
        lio-t)
+               ocf_take_lock $TARGETLOCKFILE
+               ocf_release_lock_on_exit $TARGETLOCKFILE
                # "targetcli delete" will fail if the LUN is already
                # gone. Log a warning and still push ahead.
                ocf_run -warn targetcli 
/iscsi/${OCF_RESKEY_target_iqn}/tpg1/luns delete ${OCF_RESKEY_lun}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/iSCSITarget 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/iSCSITarget
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/iSCSITarget      
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/iSCSITarget     
2017-05-17 23:07:09.000000000 +0200
@@ -50,6 +50,9 @@
 
 # Lockfile, used for selecting a target ID
 LOCKFILE=${HA_RSCTMP}/iSCSITarget-${OCF_RESKEY_implementation}.lock
+
+# targetcli: iSCSITarget and iSCSILogicalUnit must use the same lockfile
+TARGETLOCKFILE=${HA_RSCTMP}/targetcli.lock
 #######################################################################
 
 meta_data() {
@@ -334,6 +337,8 @@
                # number 1. In lio, creating a network portal
                # automatically creates the corresponding target if it
                # doesn't already exist.
+               ocf_take_lock $TARGETLOCKFILE
+               ocf_release_lock_on_exit $TARGETLOCKFILE
                ocf_run targetcli /iscsi set global 
auto_add_default_portal=false || exit $OCF_ERR_GENERIC
                ocf_run targetcli /iscsi create ${OCF_RESKEY_iqn} || exit 
$OCF_ERR_GENERIC
                for portal in ${OCF_RESKEY_portals}; do
@@ -499,6 +504,8 @@
                ocf_run lio_node --deliqn ${OCF_RESKEY_iqn} || exit 
$OCF_ERR_GENERIC
                ;;
        lio-t)
+               ocf_take_lock $TARGETLOCKFILE
+               ocf_release_lock_on_exit $TARGETLOCKFILE
                ocf_run targetcli /iscsi delete ${OCF_RESKEY_iqn} || exit 
$OCF_ERR_GENERIC
                ;;
        esac
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/kamailio 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/kamailio
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/kamailio 
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/kamailio        
2017-05-17 23:07:09.000000000 +0200
@@ -54,6 +54,7 @@
 RESKEY_port_default=5060
 RESKEY_proto_default="udptcp"
 RESKEY_sipsak_default="/usr/bin/sipsak"
+RESKEY_kamctl_default="/usr/bin/kamctl"
 RESKEY_kamctlrc_default="/etc/kamailio/kamctlrc"
 RESKEY_kamuser_default=""
 
@@ -65,6 +66,7 @@
 : ${OCF_RESKEY_port=${RESKEY_port_default}}
 : ${OCF_RESKEY_proto=${RESKEY_proto_default}}
 : ${OCF_RESKEY_sipsak=${RESKEY_sipsak_default}}
+: ${OCF_RESKEY_kamctl=${RESKEY_kamctl_default}}
 : ${OCF_RESKEY_kamctlrc=${RESKEY_kamctlrc_default}}
 : ${OCF_RESKEY_kamuser=${RESKEY_kamuser_default}}
 
@@ -201,10 +203,18 @@
     The installation path of the sipsak tool, which is used 
     for monitoring Kamailio via SIP OPTIONS polling. 
    </longdesc>
-   <shortdesc lang="en">protocol</shortdesc>
+   <shortdesc lang="en">sipsak path</shortdesc>
    <content type="string" default="${RESKEY_sipsak_default}" />
   </parameter>
 
+  <parameter name="kamctl" unique="0" required="0">
+   <longdesc lang="en">
+    The installation path of the "kamctl" control tool. 
+   </longdesc>
+   <shortdesc lang="en">kamctl path</shortdesc>
+   <content type="string" default="${RESKEY_kamctl_default}" />
+  </parameter>
+
   <parameter name="kamctlrc" unique="0" required="0">
    <longdesc lang="en">
     The location of the "kamctlrc" file for the Kamailio instance.
@@ -232,7 +242,7 @@
     configured per cluster node.
 
    </longdesc>
-   <shortdesc lang="en">protocol</shortdesc>
+   <shortdesc lang="en">kamctlrc path</shortdesc>
    <content type="string" default="${RESKEY_kamctlrc_default}" />
   </parameter>
 
@@ -414,7 +424,7 @@
         # to be avoided.
         # In order to be on the safe side, we run this check therefore under 
"timeout" control:
         rc=1
-        timeout 3 kamctl monitor 1 |grep "Up since" ; rc=$?
+        timeout 3 ${OCF_RESKEY_kamctl} monitor 1 |grep "Up since" ; rc=$?
     fi
 
     if [ $rc -ne 0 ]; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/named 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/named
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/named    
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/named   
2017-05-17 23:07:09.000000000 +0200
@@ -25,6 +25,7 @@
 OCF_RESKEY_named_rootdir_default=""
 OCF_RESKEY_named_options_default=""
 OCF_RESKEY_named_keytab_file_default=""
+OCF_RESKEY_rndc_options_default=""
 OCF_RESKEY_monitor_request_default="localhost"
 OCF_RESKEY_monitor_response_default="127.0.0.1"
 OCF_RESKEY_monitor_ip_default="127.0.0.1"
@@ -38,6 +39,7 @@
 : ${OCF_RESKEY_named_rootdir=${OCF_RESKEY_named_rootdir_default}}
 : ${OCF_RESKEY_named_options=${OCF_RESKEY_named_options_default}}
 : ${OCF_RESKEY_named_keytab_file=${OCF_RESKEY_named_keytab_file_default}}
+: ${OCF_RESKEY_rndc_options=${OCF_RESKEY_rndc_options_default}}
 : ${OCF_RESKEY_monitor_request=${OCF_RESKEY_monitor_request_default}}
 : ${OCF_RESKEY_monitor_response=${OCF_RESKEY_monitor_response_default}}
 : ${OCF_RESKEY_monitor_ip=${OCF_RESKEY_monitor_ip_default}}
@@ -144,6 +146,14 @@
 <content type="string" default="${OCF_RESKEY_named_keytab_file_default}" />
 </parameter>
 
+<parameter name="rndc_options" unique="0" required="0">
+<longdesc lang="en">
+Options for rndc process if any.
+</longdesc>
+<shortdesc lang="en">rndc_options</shortdesc>
+<content type="string" default="${OCF_RESKEY_rndc_options_default}" />
+</parameter>
+
 <parameter name="monitor_request" unique="0" required="0">
 <longdesc lang="en">
 Request that shall be sent to named for monitoring. Usually an A record in DNS.
@@ -326,7 +336,7 @@
 #
 
 named_reload() {
-    $OCF_RESKEY_rndc reload >/dev/null || return $OCF_ERR_GENERIC
+    $OCF_RESKEY_rndc $OCF_RESKEY_rndc_options reload >/dev/null || return 
$OCF_ERR_GENERIC
     
     return $OCF_SUCCESS
 }
@@ -396,7 +406,7 @@
     
     named_status || return $OCF_SUCCESS
     
-    $OCF_RESKEY_rndc stop >/dev/null
+    $OCF_RESKEY_rndc $OCF_RESKEY_rndc_options stop >/dev/null
     if [ $? -ne 0 ]; then
         ocf_log info "rndc stop failed. Killing named."
         kill `cat ${OCF_RESKEY_named_pidfile}`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/nginx 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/nginx
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/nginx    
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/nginx   
2017-05-17 23:07:09.000000000 +0200
@@ -420,7 +420,7 @@
   then
     : Configuration file $CONFIGFILE looks OK
   else
-    return $OCF_ERR_CONFIGURED
+    return $OCF_ERR_INSTALLED
   fi
   NGINX_VERSION=`$NGINXD -v 2>&1`
   ocf_log info "Starting $NGINXD - $NGINX_VERSION"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/ocf-directories.in 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/ocf-directories.in
--- 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/ocf-directories.in   
    2017-02-02 09:51:34.000000000 +0100
+++ 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/ocf-directories.in  
    2017-05-17 23:07:09.000000000 +0200
@@ -13,7 +13,7 @@
 : ${HA_FIFO:=@localstatedir@/lib/heartbeat/fifo}
 : ${HA_BIN:=@libexecdir@/heartbeat}
 : ${HA_SBIN_DIR:=@sbindir@}
-: ${HA_DATEFMT:="%Y/%m/%d_%T "}
+: ${HA_DATEFMT:="%b %d %T "}
 : ${HA_DEBUGLOG:=/dev/null}
 : ${HA_RESOURCEDIR:=$HA_DIR/resource.d}
 : ${HA_DOCDIR:=@datadir@/doc/heartbeat}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/ocf-shellfuncs.in 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/ocf-shellfuncs.in
--- 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/ocf-shellfuncs.in    
    2017-02-02 09:51:34.000000000 +0100
+++ 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/ocf-shellfuncs.in   
    2017-05-17 23:07:09.000000000 +0200
@@ -231,7 +231,7 @@
          [ -n "$HA_LOGFILE" ]
        then
          : appending to $HA_LOGFILE
-         echo "$HA_LOGTAG:     "`hadate`"${*}" >> $HA_LOGFILE
+         echo `hadate`" $HA_LOGTAG:    ${*}" >> $HA_LOGFILE
        fi
        if
          [ -z "$HA_LOGFACILITY" -a -z "$HA_LOGFILE" ] && ! [ "$ignore_stderr" 
= "true" ]
@@ -433,20 +433,20 @@
 
        output=`"$@" 2>&1`
        rc=$?
-       output=`echo $output`
+       output=`echo "$output" | tr -s ' \t\r\n' ' '`
        if [ $rc -eq 0 ]; then 
            if [ "$verbose" -a ! -z "$output" ]; then
                ocf_log info "$output"
            fi
-           return $OCF_SUCCESS
        else
            if [ ! -z "$output" ]; then
                ocf_log $loglevel "$output"
            else
                ocf_log $loglevel "command failed: $*"
            fi
-           return $rc
        fi
+
+       return $rc
 }
 
 ocf_pidfile_status() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/pgsql 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/pgsql
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/pgsql    
2017-02-02 09:51:34.000000000 +0100
+++ new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/pgsql   
2017-05-17 23:07:09.000000000 +0200
@@ -1063,8 +1063,13 @@
             cmp_location=`printf "$master_baseline\n$my_master_baseline\n" |\
                           sort | head -1`
             if [ "$cmp_location" != "$my_master_baseline" ]; then
+                # We used to set the failcount to INF for the resource here in
+                # order to move the master to the other node. However, setting
+                # the failcount should be done only by the CRM and so this use
+                # got deprecated in pacemaker version 1.1.17. Now we do the
+                # "ban resource from the node".
                 ocf_exit_reason "My data is newer than new master's one. New 
master's location : $master_baseline"
-                exec_with_retry 0 $CRM_FAILCOUNT -r $OCF_RESOURCE_INSTANCE -U 
$NODENAME -v INFINITY
+                exec_with_retry 0 $CRM_RESOURCE -B -r $OCF_RESOURCE_INSTANCE 
-N $NODENAME -Q
                 return $OCF_ERR_GENERIC
             fi
         fi
@@ -1474,7 +1479,7 @@
 }
 
 set_async_mode() {
-    cat $REP_MODE_CONF |  grep -q -e "[,' ]$1[,' ]"
+    cat $REP_MODE_CONF |  grep -q -E "(\"$1\")|([,' ]$1[,' ])"
     if [ $? -eq 0 ]; then
         ocf_log info "Setup $1 into async mode."
         runasowner -q err "echo \"synchronous_standby_names = ''\" > 
\"$REP_MODE_CONF\""
@@ -1977,7 +1982,7 @@
     CRM_MASTER="${HA_SBIN_DIR}/crm_master -l reboot"
     CRM_ATTR_REBOOT="${HA_SBIN_DIR}/crm_attribute -l reboot"
     CRM_ATTR_FOREVER="${HA_SBIN_DIR}/crm_attribute -l forever"
-    CRM_FAILCOUNT="${HA_SBIN_DIR}/crm_failcount"
+    CRM_RESOURCE="${HA_SBIN_DIR}/crm_resource"
 
     CAN_NOT_PROMOTE="-INFINITY"
     CAN_PROMOTE="100"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/rabbitmq-cluster 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/rabbitmq-cluster
--- old/resource-agents-4.0.1+git.1486025494.150fb85/heartbeat/rabbitmq-cluster 
2017-02-02 09:51:34.000000000 +0100
+++ 
new/resource-agents-4.0.1+git.1495055229.643177f1/heartbeat/rabbitmq-cluster    
    2017-05-17 23:07:09.000000000 +0200
@@ -56,7 +56,9 @@
 <version>1.0</version>
 
 <longdesc lang="en">
-Starts cloned rabbitmq cluster instance
+Starts cloned rabbitmq cluster instance. NB: note that this RA
+cannot be spawned across a mix of pacemaker and pacemaker-remote nodes.
+Only on pacemaker *or* pacemaker-remote nodes exclusively.
 </longdesc>
 <shortdesc lang="en">rabbitmq clustered</shortdesc>
 
@@ -111,7 +113,25 @@
 
 rmq_join_list()
 {
-    cibadmin -Q --xpath 
"//node_state[@crmd='online']//nvpair[@name='$RMQ_CRM_ATTR_COOKIE']" | grep 
"$RMQ_CRM_ATTR_COOKIE" | sed -n -e "s/^.*value=.\(.*\)\".*$/\1/p"
+       local join_list=$(cibadmin -Q --xpath 
"//node_state[@crmd='online']//nvpair[@name='$RMQ_CRM_ATTR_COOKIE']" | grep 
"$RMQ_CRM_ATTR_COOKIE" | sed -n -e "s/^.*value=.\(.*\)\".*$/\1/p")
+       # If join_list is empty we want to check if there are any remote nodes
+       # where rabbitmq is allowed to run (i.e. nodes without the crmd=online 
selector)
+       if [ -z "$join_list" ]; then
+               # Get all the nodes written in the ATTR_COOKIE no matter if
+               # they are online or not. This will be one line per node like
+               # rabbit@overcloud-rabbit-0
+               # rabbit@overcloud-rabbit-1
+               # ...
+               local remote_join_list=$(cibadmin -Q --xpath 
"//node_state//nvpair[@name='$RMQ_CRM_ATTR_COOKIE']" | grep 
"$RMQ_CRM_ATTR_COOKIE" | sed -n -e "s/^.*value=.\(.*\)\".*$/\1/p")
+               # The following expression prepares a filter like '-e 
overcloud-rabbit-0 -e overcloud-rabbit-1 -e ...'
+               local filter=$(crm_mon -r --as-xml | xmllint --format --xpath 
"//nodes//node[@online='true' and @standby='false']/@name" - | xargs -n1 echo | 
awk -F= '{print "-e "$2}')
+               # export the intersection which gives us only the nodes that
+               # a) wrote their namein the cib attrd
+               # b) run on nodes where pacemaker_remote is enabled
+               join_list="$(echo $remote_join_list | grep $filter)"
+       fi
+
+       echo $join_list
 }
 
 rmq_write_nodename()


Reply via email to