Hello community,

here is the log from the commit of package resource-agents for openSUSE:Factory 
checked in at 2015-09-19 06:54:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/resource-agents (Old)
 and      /work/SRC/openSUSE:Factory/.resource-agents.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "resource-agents"

Changes:
--------
--- /work/SRC/openSUSE:Factory/resource-agents/resource-agents.changes  
2015-05-16 20:07:46.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.resource-agents.new/resource-agents.changes     
2015-09-19 06:54:04.000000000 +0200
@@ -1,0 +2,43 @@
+Wed Sep 16 07:21:58 UTC 2015 - kgronl...@suse.com
+
+- Update to version 3.9.6+git.1442374860.7f3628a:
+  + Low: pgsql: set_master_score use an undefined variable($target).
+  + Fix exec_sql errors like "unknown variable select pg_ " on ubuntu
+  + Low: findif.sh: Allow + and - as broadcast arguments (bsc#940931)
+  + Low: IPaddr2: Describe + and - broadcast arguments (bsc#940931) (#656)
+  + galera: add support for MYSQL_HOST and MYSQL_PORT from clustercheck
+
+-------------------------------------------------------------------
+Tue Sep 08 08:44:21 UTC 2015 - kgronl...@suse.com
+
+- Update to version 3.9.6+git.1441596198.a62fc5a:
+  + High: clvm: activate_vgs option for enable/disable of automatic vg 
activation
+  + High: IPsrcaddr: return correct error code during stop when misconfigured
+  + Fixed redis start operation if replication sync takes > 20 seconds
+  + Made 'slave of XXX' wait forever (demote)
+  + Low: pgsql: eliminate duplicate "ocf_exit_reason".
+  + Docker: remove trailing spaces
+  + Docker: fix docker existance test report error
+  + High: redis: avoid 0 byte dump.rdb start failures
+  + High: dhcpd: use correct default chroot for rhel based systems
+  + orainstance.sh: interpret listener stop results correctly
+  + Support RozoFS
+  + Low: pgsql: replace "output=su ..." to a new function, exec_sql()
+  + Medium: pgsql: delete an old replication slot when creating the slot.
+  + iSCSILogicalUnit: add check for leftover target/core entries for lio-t
+  + iSCSILogicalUnit: return OCF_NOT_RUNNING on monitor if backing path does 
not exist
+  + iSCSILogicalUnit: when deleting a LUN or initiator fails with lio-t, 
proceed with warning
+  + iSCSITarget: properly create portals for lio-t implementation
+  + more accurate search results when tag is not specified
+  + Fix "docker images" difference between distro
+  + more strictly image check for repository, name, and tag
+  + Use runuser inteald of su command for SELinux enforcing mode
+  + Use runuser command instead of su in order to run selinux enforcing mode.
+  + Medium: CTDB: Preserve permissions on smb.conf (bsc#935253)
+  + High: redis: use required client pass word when set
+  + Added "maxfiles" parameter for increasing maximum number of open files 
(for ulimit -n)
+  + Low: update contact info
+  + pgsql: Fix return code override in pgsql_real_start()
+  + [high] Fix redis password parser
+
+-------------------------------------------------------------------

Old:
----
  resource-agents-3.9.6+git.1430920897.b7ea7f9.tar.xz

New:
----
  resource-agents-3.9.6+git.1442374860.7f3628a.tar.xz

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

Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.HPLXHB/_old  2015-09-19 06:54:05.000000000 +0200
+++ /var/tmp/diff_new_pack.HPLXHB/_new  2015-09-19 06:54:05.000000000 +0200
@@ -48,7 +48,7 @@
 Summary:        Open Source HA Reusable Cluster Resource Scripts
 License:        GPL-2.0 and LGPL-2.1+ and GPL-3.0+
 Group:          Productivity/Clustering/HA
-Version:        3.9.6+git.1430920897.b7ea7f9
+Version:        3.9.6+git.1442374860.7f3628a
 Release:        0
 Url:            http://linux-ha.org/
 Source:         resource-agents-%{version}.tar.xz

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.HPLXHB/_old  2015-09-19 06:54:05.000000000 +0200
+++ /var/tmp/diff_new_pack.HPLXHB/_new  2015-09-19 06:54:05.000000000 +0200
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
             <param 
name="url">git://github.com/ClusterLabs/resource-agents.git</param>
-          <param 
name="changesrevision">b7ea7f9a8c969ec019ccddf12601800483b235eb</param></service></servicedata>
\ No newline at end of file
+          <param 
name="changesrevision">7f3628a839f705fbcb66498a0b43157be87404ac</param></service></servicedata>
\ No newline at end of file

++++++ resource-agents-3.9.6+git.1430920897.b7ea7f9.tar.xz -> 
resource-agents-3.9.6+git.1442374860.7f3628a.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/.travis.yml 
new/resource-agents-3.9.6+git.1442374860.7f3628a/.travis.yml
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/.travis.yml        
1970-01-01 01:00:00.000000000 +0100
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/.travis.yml        
2015-09-16 09:21:57.000000000 +0200
@@ -0,0 +1,8 @@
+language: bash
+install:
+  - ./ci/install.sh
+script:
+  - ./ci/build.sh
+notifications:
+  email: false
+sudo: required
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/ci/build.sh 
new/resource-agents-3.9.6+git.1442374860.7f3628a/ci/build.sh
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/ci/build.sh        
1970-01-01 01:00:00.000000000 +0100
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/ci/build.sh        
2015-09-16 09:21:57.000000000 +0200
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+set -eo pipefail
+[[ "${DEBUG:-}" ]] && set -x
+
+declare -i failed
+failed=0
+
+success() {
+  printf "\r\033[2K  [ \033[00;32mOK\033[0m ] Checking %s...\n" "$1"
+}
+
+fail() {
+       printf "\r\033[2K  [\033[0;31mFAIL\033[0m] Checking %s...\n" "$1"
+       failed=1
+}
+
+check() {
+  local script="$1"
+  shellcheck "$script" || fail "$script"
+  success "$script"
+}
+
+find_prunes() {
+  local prunes="! -path './.git/*'"
+  if [ -f .gitmodules ]; then
+    while read module; do
+      prunes="$prunes ! -path './$module/*'"
+    done < <(grep path .gitmodules | awk '{print $3}')
+  fi
+  echo "$prunes"
+}
+
+find_cmd() {
+  echo "find . -type f -and \( -perm +111 -or -name '*.sh' \) $(find_prunes)"
+}
+
+check_all_executables() {
+  echo "Checking executables and .sh files..."
+  eval "$(find_cmd)" | while read script; do
+    head=$(head -n1 "$script")
+    check "$script"
+  done
+  exit $failed
+}
+
+check_all_executables
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/ci/install.sh 
new/resource-agents-3.9.6+git.1442374860.7f3628a/ci/install.sh
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/ci/install.sh      
1970-01-01 01:00:00.000000000 +0100
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/ci/install.sh      
2015-09-16 09:21:57.000000000 +0200
@@ -0,0 +1,10 @@
+#!/bin/bash
+set -eo pipefail
+
+main() {
+  local filename="shellcheck_0.3.7-1_amd64.deb"
+  wget "http://ftp.debian.org/debian/pool/main/s/shellcheck/$filename";
+  sudo dpkg -i "$filename"
+}
+
+main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/CTDB 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/CTDB
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/CTDB     
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/CTDB     
2015-09-16 09:21:57.000000000 +0200
@@ -452,6 +452,8 @@
                        vfs_fileid="$vfs_fileid\tvfs objects = fileid\n"
                fi
        fi
+       # Preserve permissions of smb.conf
+       cp -a $OCF_RESKEY_smb_conf $OCF_RESKEY_smb_conf.$$
        awk '
                /^[[:space:]]*\[/ { global = 0 }
                /^[[:space:]]*\[global\]/ { global = 1 }
@@ -472,7 +474,8 @@
 \tidmap backend = $OCF_RESKEY_smb_idmap_backend\n\
 \tctdbd socket = $OCF_RESKEY_ctdb_socket\n$private_dir$vfs_fileid\
 \t# CTDB-RA: End auto-generated section (do not change above)" > 
$OCF_RESKEY_smb_conf.$$
-       mv -f $OCF_RESKEY_smb_conf.$$ $OCF_RESKEY_smb_conf
+       dd conv=notrunc,fsync of=$OCF_RESKEY_smb_conf.$$ if=/dev/null 
>/dev/null 2>&1
+       mv $OCF_RESKEY_smb_conf.$$ $OCF_RESKEY_smb_conf
 }
 
 
@@ -480,8 +483,10 @@
 cleanup_smb_conf() {
        ocf_is_true "$OCF_RESKEY_ctdb_manages_samba" || return 0
 
+       # preserve permissions of smb.conf
+       cp -a $OCF_RESKEY_smb_conf $OCF_RESKEY_smb_conf.$$
        sed '/# CTDB-RA: Begin/,/# CTDB-RA: End/d' $OCF_RESKEY_smb_conf > 
$OCF_RESKEY_smb_conf.$$
-       mv -f $OCF_RESKEY_smb_conf.$$ $OCF_RESKEY_smb_conf
+       mv $OCF_RESKEY_smb_conf.$$ $OCF_RESKEY_smb_conf
 }
 
 append_ctdb_sysconfig() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/Filesystem 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/Filesystem
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/Filesystem       
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/Filesystem       
2015-09-16 09:21:57.000000000 +0200
@@ -275,7 +275,7 @@
        # Get the current real device name, if possible.
        # (specified devname could be -L or -U...)
        case "$FSTYPE" in
-       nfs4|nfs|smbfs|cifs|glusterfs|ceph|tmpfs|overlayfs|none)
+       nfs4|nfs|smbfs|cifs|glusterfs|ceph|tmpfs|overlayfs|rozofs|none)
                : ;;
        *)
                DEVICE=`list_mounts | grep " $MOUNTPOINT " | cut -d' ' -f1`
@@ -326,7 +326,7 @@
                no)    false;;
                ""|auto)
                case $FSTYPE in
-                       
ext4|ext4dev|ext3|reiserfs|reiser4|nss|xfs|jfs|vfat|fat|nfs4|nfs|cifs|smbfs|ocfs2|gfs2|none|lustre|glusterfs|ceph|tmpfs|overlayfs)
+                       
ext4|ext4dev|ext3|reiserfs|reiser4|nss|xfs|jfs|vfat|fat|nfs4|nfs|cifs|smbfs|ocfs2|gfs2|none|lustre|glusterfs|ceph|tmpfs|overlayfs|rozofs)
                        false;;
                        *)
                        true;;
@@ -355,7 +355,7 @@
 
        # support fuse-filesystems (e.g. GlusterFS)
        case $FSTYPE in
-               glusterfs) support="fuse";;
+               fuse.*|glusterfs|rozofs) support="fuse";;
        esac
 
        grep -w "$support"'$' /proc/filesystems >/dev/null
@@ -724,7 +724,7 @@
 
        # these are definitely not block devices
        case $FSTYPE in
-       nfs4|nfs|smbfs|cifs|none|glusterfs|ceph|overlayfs) return;;
+       nfs4|nfs|smbfs|cifs|none|glusterfs|ceph|overlayfs|rozofs) return;;
        esac
 
        if `is_option "loop"`; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/IPaddr2 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/IPaddr2
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/IPaddr2  
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/IPaddr2  
2015-09-16 09:21:57.000000000 +0200
@@ -169,8 +169,10 @@
 
 <parameter name="broadcast">
 <longdesc lang="en">
-Broadcast address associated with the IP. If left empty, the script will
-determine this from the netmask.
+Broadcast address associated with the IP. It is possible to use the
+special symbols '+' and '-' instead of the broadcast address. In this
+case, the broadcast address is derived by setting/resetting the host
+bits of the interface prefix.
 </longdesc>
 <shortdesc lang="en">Broadcast address</shortdesc>
 <content type="string" default=""/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/IPsrcaddr 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/IPsrcaddr
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/IPsrcaddr        
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/IPsrcaddr        
2015-09-16 09:21:57.000000000 +0200
@@ -387,15 +387,27 @@
 
 srca_validate_all() {
 
-    check_binary $AWK
-    check_binary $IFCONFIG
+       if [ -z "$OCF_RESKEY_ipaddress" ]; then
+               #  usage
+               ocf_exit_reason "Please set OCF_RESKEY_ipaddress to the 
preferred source IP address!"
+               return $OCF_ERR_CONFIGURED
+       fi
+
+
+       if ! [ "x$SYSTYPE" = "xLinux" ]; then
+               # checks after this point are only relevant for linux.
+               return $OCF_SUCCESS
+       fi
+
+       check_binary $AWK
+       check_binary $IFCONFIG
 
 #      The IP address should be in good shape
        if CheckIP "$ipaddress"; then
          : 
        else
          ocf_exit_reason "Invalid IP address [$ipaddress]"
-         exit $OCF_ERR_CONFIGURED
+         return $OCF_ERR_CONFIGURED
        fi
 
        if ocf_is_probe; then
@@ -407,8 +419,9 @@
          :
        else
          ocf_exit_reason "We are not serving [$ipaddress], hence can not make 
it a preferred source address"
-         exit $OCF_ERR_INSTALLED
+         return $OCF_ERR_INSTALLED
        fi
+       return $OCF_SUCCESS
 }
 
 if
@@ -430,18 +443,22 @@
                        ;;
 esac
 
-if 
-  [ -z "$OCF_RESKEY_ipaddress" ]
-then
-#  usage
-  ocf_exit_reason "Please set OCF_RESKEY_ipaddress to the preferred source IP 
address!"
-  exit $OCF_ERR_CONFIGURED
-fi
-
 ipaddress="$OCF_RESKEY_ipaddress"
 
-if [ "x$SYSTYPE" = "xLinux" ]; then
-       srca_validate_all
+srca_validate_all
+rc=$?
+if [ $rc -ne $OCF_SUCCESS ]; then
+       case $1 in
+               # if we can't validate the configuration during a stop, that
+               # means the resources isn't configured correctly. There's no way
+               # to actually stop the resource in this situation because 
there's
+               # no way it could have even started. Return success here
+               # to indicate that the resource is not running, otherwise the
+               # stop action will fail causing the node to be fenced just 
because
+               # of a mis configuration.
+               stop) exit $OCF_SUCCESS;;
+               *)    exit $rc;;
+       esac
 fi
 
 findif_out=`$FINDIF -C`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/clvm 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/clvm
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/clvm     
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/clvm     
2015-09-16 09:21:57.000000000 +0200
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2014 David Vossel <dvos...@redhat.com>
+# Copyright (c) 2014 David Vossel <davidvos...@gmail.com>
 #                    All Rights Reserved.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -60,6 +60,18 @@
 <shortdesc lang="en">Daemon Options</shortdesc>
 <content type="string" default="-d0"/>
 </parameter>
+
+<parameter name="activate_vgs" unique="0">
+<longdesc lang="en">
+Whether or not to activate all cluster volume groups after starting
+the clvmd or not. Note that clustered volume groups will always be
+deactivated before the clvmd stops regardless of what this option
+is set to.
+</longdesc>
+<shortdesc lang="en">Activate volume groups</shortdesc>
+<content type="boolean" default="true"/>
+</parameter>
+
 </parameters>
 
 <actions>
@@ -77,6 +89,7 @@
 #######################################################################
 
 : ${OCF_RESKEY_daemon_options:="-d0"}
+: ${OCF_RESKEY_activate_vgs:="true"}
 
 sbindir=$HA_SBIN_DIR
 if [ -z $sbindir ]; then
@@ -322,6 +335,11 @@
 
 clvmd_activate_all()
 {
+
+       if ! ocf_is_true "$OCF_RESKEY_activate_vgs"; then
+               ocf_log info "skipping vg activation, activate_vgs is set to 
$OCF_RESKEY_activate_vgs"
+               return $OCF_SUCCESS
+       fi
        # Activate all volume groups by leaving the
        # "volume group name" parameter empty
        ocf_run ${LVM_VGCHANGE} -aay
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/dhcpd 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/dhcpd
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/dhcpd    
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/dhcpd    
2015-09-16 09:21:57.000000000 +0200
@@ -38,6 +38,14 @@
 OCF_RESKEY_interface_default=""
 OCF_RESKEY_includes_default=""
 
+# On some systems, the chrooted default is slightly different.
+# Lets do our best to support both by default.
+if [ ! -d "$OCF_RESKEY_chrooted_path_default" ]; then
+       if [ -d "/var/lib/dhcpd" ]; then
+               OCF_RESKEY_chrooted_path_default="/var/lib/dhcpd"
+       fi
+fi
+
 : ${OCF_RESKEY_binary=${OCF_RESKEY_binary_default}}
 : ${OCF_RESKEY_pid=${OCF_RESKEY_pid_default}}
 : ${OCF_RESKEY_user=${OCF_RESKEY_user_default}}
@@ -304,7 +312,7 @@
            { ocf_exit_reason "could not copy $i to chroot jail"; return 
$OCF_ERR_GENERIC; }
     done
 
-    libdir=$(basename $(echo /var/lib/dhcp/lib*))
+    libdir=$(basename $(echo ${OCF_RESKEY_chrooted_path}/lib*))
     if test -x /usr/bin/ldd ; then
        get_ldd_deps()
        {
@@ -329,7 +337,7 @@
     done | sort -u`
     for i in $cplibs ; do
        if [ -s "$i" ]; then
-           cp -pL "$i" "/var/lib/dhcp/$libdir/" ||
+           cp -pL "$i" "${OCF_RESKEY_chrooted_path}/$libdir/" ||
                { ocf_exit_reason "could not copy $i to chroot jail"; return 
$OCF_ERR_GENERIC; }
        fi
     done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/docker 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/docker
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/docker   
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/docker   
2015-09-16 09:21:57.000000000 +0200
@@ -4,7 +4,7 @@
 # based off a supplied docker image. Containers managed by this agent
 # are both created and removed upon the agent's start and stop actions.
 #
-# Copyright (c) 2014 David Vossel <dvos...@redhat.com>
+# Copyright (c) 2014 David Vossel <davidvos...@gmail.com>
 #                    All Rights Reserved.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -61,7 +61,7 @@
 
 <parameter name="name" required="0" unique="0">
 <longdesc lang="en">
-The name to give the created container. By default this will 
+The name to give the created container. By default this will
 be that resource's instance name.
 </longdesc>
 <shortdesc lang="en">docker container name</shortdesc>
@@ -72,7 +72,7 @@
 <longdesc lang="en">
 Allow the image to be pulled from the configured docker registry when
 the image does not exist locally. NOTE, this can drastically increase
-the time required to start the container if the image repository is 
+the time required to start the container if the image repository is
 pulled over the network.
 </longdesc>
 <shortdesc lang="en">Allow pulling non-local images</shortdesc>
@@ -84,8 +84,8 @@
 Add options to be appended to the 'docker run' command which is used
 when creating the container during the start action. This option allows
 users to do things such as setting a custom entry point and injecting
-environment variables into the newly created container. Note the '-d' 
-option is supplied regardless of this value to force containers to run 
+environment variables into the newly created container. Note the '-d'
+option is supplied regardless of this value to force containers to run
 in the background.
 
 NOTE: Do not explicitly specify the --name argument in the run_opts. This
@@ -99,7 +99,7 @@
 
 <parameter name="run_cmd" required="0" unique="0">
 <longdesc lang="en">
-Specifiy a command to launch within the container once 
+Specifiy a command to launch within the container once
 it has initialized.
 </longdesc>
 <shortdesc lang="en">run command</shortdesc>
@@ -186,7 +186,7 @@
                        exit $OCF_ERR_ARGS
                fi
                rc=$OCF_ERR_GENERIC
-       else 
+       else
                ocf_log info "monitor cmd passed: exit code = $rc"
        fi
 
@@ -195,7 +195,7 @@
 
 container_exists()
 {
-       docker inspect $CONTAINER > /dev/null 2>&1
+       docker inspect --format {{.State.Running}} $CONTAINER | egrep 
'(true|false)' >/dev/null 2>&1
 }
 
 remove_container()
@@ -279,7 +279,7 @@
                ocf_run docker start $CONTAINER
        else
                # make sure any previous container matching our container name 
is cleaned up first.
-               # we already know at this point it wouldn't be running 
+               # we already know at this point it wouldn't be running
                remove_container
                ocf_log info "running container $CONTAINER for the first time"
                ocf_run docker run $run_opts $OCF_RESKEY_image 
$OCF_RESKEY_run_cmd
@@ -328,7 +328,7 @@
 
        if ocf_is_true "$OCF_RESKEY_force_kill"; then
                ocf_run docker kill $CONTAINER
-       else    
+       else
                ocf_log debug "waiting $timeout second[s] before killing 
container"
                ocf_run docker stop -t=$timeout $CONTAINER
        fi
@@ -349,23 +349,34 @@
 
 image_exists()
 {
-       local res=1
+       # assume that OCF_RESKEY_name have been validated
+       local IMAGE_NAME="$(echo ${OCF_RESKEY_name} | awk -F':' '{print $1}')"
 
+       # if no tag was specified, use default "latest"
+       local COLON_FOUND=0
+       local IMAGE_TAG="latest"
 
-       echo "${OCF_RESKEY_image}" | grep -q ":"
-       if [ $? -eq 0 ]; then
-               docker images | awk '{print $1 ":" $2}' |  grep 
"^${OCF_RESKEY_image}\$" > /dev/null 2>&1
-       else
-               docker images | awk '{print $1}' | grep 
"^${OCF_RESKEY_image}\$" > /dev/null 2>&1
+       COLON_FOUND="$(echo "${OCF_RESKEY_name}" | grep -o ':' | grep -c .)"
+
+       if [ ${COLON_FOUND} -ne 0 ]; then
+               IMAGE_TAG="$(echo ${OCF_RESKEY_name} | awk -F':' '{print $NF}')"
        fi
+
+       # IMAGE_NAME might be following formats:
+       # - image
+       # - repository/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}\$"
        if [ $? -eq 0 ]; then
+               # image found
                return 0
        fi
+
        if ocf_is_true "$OCF_RESKEY_allow_pull"; then
                REQUIRE_IMAGE_PULL=1
                ocf_log notice "Image (${OCF_RESKEY_image}) does not exist 
locally but will be pulled during start"
                return 0
-       fi 
+       fi
        # image not found.
        return 1
 }
@@ -376,7 +387,7 @@
        if [ -z "$OCF_RESKEY_image" ]; then
                ocf_exit_reason "'image' option is required"
                exit $OCF_ERR_CONFIGURED
-       fi 
+       fi
 
        if [ -n "$OCF_RESKEY_monitor_cmd" ]; then
                ocf_log info "checking for nsenter, which is required when 
'monitor_cmd' is specified"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/findif.sh 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/findif.sh
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/findif.sh        
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/findif.sh        
2015-09-16 09:21:57.000000000 +0200
@@ -182,8 +182,10 @@
     if [ -n "$brdcast" ] ; then
       ipcheck_ipv4 $brdcast
       if [ $? = 1 ] ; then
-        ocf_log err "Invalid broadcast address [$brdcast]."
-        return $OCF_ERR_CONFIGURED
+        if [ "$brdcast" != "+" -a "$brdcast" != "-" ]; then
+          ocf_log err "Invalid broadcast address [$brdcast]."
+          return $OCF_ERR_CONFIGURED
+        fi
       fi
     fi
   fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/galera 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/galera
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/galera   
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/galera   
2015-09-16 09:21:57.000000000 +0200
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2014 David Vossel <dvos...@redhat.com>
+# Copyright (c) 2014 David Vossel <davidvos...@gmail.com>
 #                    All Rights Reserved.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -704,6 +704,18 @@
     MYSQL_OPTIONS_CHECK="$MYSQL_OPTIONS_CHECK 
--password=${OCF_RESKEY_check_passwd}"
 fi
 
+# This value is automatically sourced from /etc/sysconfig/checkcluster if 
available
+if [ -n "${MYSQL_HOST}" ]; then
+    MYSQL_OPTIONS_CHECK="$MYSQL_OPTIONS_CHECK -h ${MYSQL_HOST}"
+fi
+
+# This value is automatically sourced from /etc/sysconfig/checkcluster if 
available
+if [ -n "${MYSQL_PORT}" ]; then
+    MYSQL_OPTIONS_CHECK="$MYSQL_OPTIONS_CHECK -P ${MYSQL_PORT}"
+fi
+
+
+
 # What kind of method was invoked?
 case "$1" in
   start)    galera_start;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/iSCSILogicalUnit 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/iSCSILogicalUnit
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/iSCSILogicalUnit 
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/iSCSILogicalUnit 
2015-09-16 09:21:57.000000000 +0200
@@ -429,15 +429,21 @@
                fi
                ;;
        lio-t)
-               ocf_run targetcli /iscsi/${OCF_RESKEY_target_iqn}/tpg1/luns 
delete ${OCF_RESKEY_lun} || exit $OCF_ERR_GENERIC
+               # "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}
                if [ -n "${OCF_RESKEY_allowed_initiators}" ]; then
                        for initiator in ${OCF_RESKEY_allowed_initiators}; do
                                if targetcli 
/iscsi/${OCF_RESKEY_target_iqn}/tpg1/acls/${initiator} status | grep "Mapped 
LUNs: 0" >/dev/null ; then
-                                       ocf_run targetcli 
/iscsi/${OCF_RESKEY_target_iqn}/tpg1/acls/ delete ${initiator}
+                                       ocf_run -warn targetcli 
/iscsi/${OCF_RESKEY_target_iqn}/tpg1/acls/ delete ${initiator}
                                fi
                        done
                fi
 
+               # If we've proceeded down to here and we're unable to
+               # delete the backstore, then something is seriously
+               # wrong and we need to fail the stop operation
+               # (potentially causing fencing)
                ocf_run targetcli /backstores/block delete 
${OCF_RESOURCE_INSTANCE} || exit $OCF_ERR_GENERIC
                ;;
        esac
@@ -446,6 +452,9 @@
 }
 
 iSCSILogicalUnit_monitor() {
+       # If our backing device (or file) doesn't even exist, we're not running
+       [ -e ${OCF_RESKEY_path} ] || return $OCF_NOT_RUNNING
+
        case $OCF_RESKEY_implementation in
        iet)
                # Figure out and set the target ID
@@ -486,6 +495,11 @@
        lio-t)
                
configfs_path="/sys/kernel/config/target/iscsi/${OCF_RESKEY_target_iqn}/tpgt_1/lun/lun_${OCF_RESKEY_lun}/*/udev_path"
                [ -e ${configfs_path} ] && [ `cat ${configfs_path}` = 
"${OCF_RESKEY_path}" ] && return $OCF_SUCCESS
+
+               # if we aren't activated, is a block device still left over?
+               
block_configfs_path="/sys/kernel/config/target/core/iblock_*/${OCF_RESOURCE_INSTANCE}/udev_path"
+               [ -e ${block_configfs_path} ] && ocf_log warn "existing block 
without an active lun: ${block_configfs_path}"
+               [ -e ${block_configfs_path} ] && return $OCF_ERR_GENERIC
                ;;
        esac
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/iSCSITarget 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/iSCSITarget
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/iSCSITarget      
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/iSCSITarget      
2015-09-16 09:21:57.000000000 +0200
@@ -326,10 +326,13 @@
                # automatically creates the corresponding target if it
                # doesn't already exist.
                for portal in ${OCF_RESKEY_portals}; do
-                       ocf_run targetcli /iscsi create ${OCF_RESKEY_iqn} || 
exit $OCF_ERR_GENERIC
                        if [ $portal != ${OCF_RESKEY_portals_default} ] ; then
+                               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
                                IFS=':' read -a sep_portal <<< "$portal"
                                ocf_run targetcli 
/iscsi/${OCF_RESKEY_iqn}/tpg1/portals create "${sep_portal[0]}" 
"${sep_portal[1]}" || exit $OCF_ERR_GENERIC
+                       else
+                               ocf_run targetcli /iscsi create 
${OCF_RESKEY_iqn} || exit $OCF_ERR_GENERIC
                        fi
                done
                # in lio, we can set target parameters by manipulating
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/nfsnotify 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/nfsnotify
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/nfsnotify        
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/nfsnotify        
2015-09-16 09:21:57.000000000 +0200
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2014 David Vossel <dvos...@redhat.com>
+# Copyright (c) 2014 David Vossel <davidvos...@gmail.com>
 #                    All Rights Reserved.
 #
 # This program is free software; you can redistribute it and/or modify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/pgsql 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/pgsql
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/pgsql    
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/pgsql    
2015-09-16 09:21:57.000000000 +0200
@@ -18,6 +18,13 @@
 : ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
 . ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
 
+# Use runuser if available for SELinux.
+if [ -x /sbin/runuser ]; then
+    SU=runuser
+else
+    SU=su
+fi
+
 #
 # Get PostgreSQL Configuration parameter
 #
@@ -475,7 +482,7 @@
         esac
     done
 
-    ocf_run $quietrun $loglevel su $OCF_RESKEY_pgdba -c "cd 
$OCF_RESKEY_pgdata; $*"
+    ocf_run $quietrun $loglevel $SU $OCF_RESKEY_pgdba -c "cd 
$OCF_RESKEY_pgdata; $*"
 }
 
 #
@@ -506,6 +513,22 @@
 }
 
 
+# Execulte SQL and return the result.
+exec_sql() {
+    local sql="$1"
+    local output
+    local rc
+
+    output=`$SU $OCF_RESKEY_pgdba -c "cd $OCF_RESKEY_pgdata; \
+                $OCF_RESKEY_psql $psql_options -U $OCF_RESKEY_pgdba \
+                -Atc \"$sql\""`
+    rc=$?
+
+    echo $output
+    return $rc
+}
+
+
 #pgsql_real_start: Starts PostgreSQL
 pgsql_real_start() {
     local pgctl_options
@@ -590,9 +613,8 @@
     # creating slot on the slave node is in preparation for failover.
     if use_replication_slot; then
         create_replication_slot
-        rc=$?
-        if [ $rc -eq $OCF_ERR_GENERIC ]; then
-            ocf_exit_reason ocf_exit_reason "PostgreSQL can't create 
replication_slot."
+        if [ $? -eq $OCF_ERR_GENERIC ]; then
+            ocf_exit_reason "PostgreSQL can't create replication_slot."
             return $OCF_ERR_GENERIC
         fi
     fi
@@ -895,10 +917,9 @@
 
     if is_replication; then
         #Check replication state
-        output=`su $OCF_RESKEY_pgdba -c "cd $OCF_RESKEY_pgdata; \
-                $OCF_RESKEY_psql $psql_options -U $OCF_RESKEY_pgdba \
-                -Atc \"${CHECK_MS_SQL}\""`
+        output=`exec_sql "${CHECK_MS_SQL}"`
         rc=$?
+
         if [ $rc -ne  0 ]; then
             report_psql_error $rc $loglevel "Can't get PostgreSQL recovery 
status."
             return $OCF_ERR_GENERIC
@@ -1095,10 +1116,9 @@
     local tmp_data_status
     local number_of_nodes
 
-    all_data_status=`su $OCF_RESKEY_pgdba -c "cd $OCF_RESKEY_pgdata; \
-                     $OCF_RESKEY_psql $psql_options -U $OCF_RESKEY_pgdba \
-                     -Atc \"${CHECK_REPLICATION_STATE_SQL}\""`
+    all_data_status=`exec_sql "${CHECK_REPLICATION_STATE_SQL}"`
     rc=$?
+
     if [ $rc -eq 0 ]; then
         if [ -n "$all_data_status" ]; then
             all_data_status=`echo $all_data_status | sed "s/\n/ /g"`
@@ -1319,24 +1339,33 @@
     local output
     local rc
     local CREATE_REPLICATION_SLOT_sql
+    local DELETE_REPLICATION_SLOT_sql
 
     replication_slot_name_list=`create_replication_slot_name`
     ocf_log debug "replication slot names are $replication_slot_name_list."
 
     for replication_slot_name in $replication_slot_name_list
     do
-        # create replication slot when the same name slot is not exists.
-        # If the same name slot is already exists, don't create new slot and 
reuse the old slot.
-        CREATE_REPLICATION_SLOT_sql="SELECT 
pg_create_physical_replication_slot('$replication_slot_name') \
-                                     FROM (VALUES (1)) AS t \
-                                     WHERE NOT EXISTS (SELECT * FROM 
pg_replication_slots WHERE slot_name = '$replication_slot_name');"
+        # If the same name slot is already exists, initialize(delete and 
create) the slot.
+        if [ `check_replication_slot $replication_slot_name` = "1" ]; then
+            DELETE_REPLICATION_SLOT_sql="SELECT 
pg_drop_replication_slot('$replication_slot_name');"
+            output=`exec_sql "$DELETE_REPLICATION_SLOT_sql"`
+            rc=$?
 
-        output=`su $OCF_RESKEY_pgdba -c "cd $OCF_RESKEY_pgdata; \
-                $OCF_RESKEY_psql $psql_options -U $OCF_RESKEY_pgdba \
-                -Atc \"$CREATE_REPLICATION_SLOT_sql\""`
+            if [ $rc -eq 0 ]; then
+                ocf_log info "PostgreSQL delete the replication 
slot($replication_slot_name)."
+            else
+                ocf_exit_reason "$output"
+                return $OCF_ERR_GENERIC
+            fi
+        fi
+
+        CREATE_REPLICATION_SLOT_sql="SELECT 
pg_create_physical_replication_slot('$replication_slot_name');"
+        output=`exec_sql "$CREATE_REPLICATION_SLOT_sql"`
         rc=$?
+
         if [ $rc -eq 0 ]; then
-            ocf_log info "PostgreSQL creates or alredy exist the replication 
slot($replication_slot_name)"
+            ocf_log info "PostgreSQL creates the replication 
slot($replication_slot_name)."
         else
             ocf_exit_reason "$output"
             return $OCF_ERR_GENERIC
@@ -1346,6 +1375,16 @@
     return 0
 }
 
+# This function check the replication slot does exists.
+check_replication_slot(){
+    local replication_slot_name=$1
+    local output
+    local CHECK_REPLICATION_SLOT_sql="SELECT count(*) FROM 
pg_replication_slots WHERE slot_name = '$replication_slot_name'"
+
+    output=`exec_sql "$CHECK_REPLICATION_SLOT_sql"`
+    echo "$output"
+}
+
 get_my_location() {
     local rc
     local output
@@ -1357,10 +1396,9 @@
     local log2
     local newer_location
 
-    output=`su $OCF_RESKEY_pgdba -c "cd $OCF_RESKEY_pgdata; \
-            $OCF_RESKEY_psql $psql_options -U $OCF_RESKEY_pgdba \
-            -Atc \"${CHECK_XLOG_LOC_SQL}\""`
+    output=`exec_sql "$CHECK_REPLICATION_SLOT_sql"`
     rc=$?
+
     if [ $rc -ne 0 ]; then
         report_psql_error $rc err "Can't get my xlog location."
         return 1
@@ -1555,7 +1593,7 @@
     current_score=`$CRM_ATTR_REBOOT -N "$1" -n "master-$3" -G -q 2>/dev/null`
     if [ -n "$current_score" -a "$current_score" != "$2" ]; then
         ocf_log info "Changing $3 master score on $1 : $current_score->$2."
-        exec_with_retry 0 $CRM_ATTR_REBOOT -N "$target" -n "master-$3" -v "$2"
+        exec_with_retry 0 $CRM_ATTR_REBOOT -N "$1" -n "master-$3" -v "$2"
     fi
     return 0
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/rabbitmq-cluster 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/rabbitmq-cluster
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/rabbitmq-cluster 
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/rabbitmq-cluster 
2015-09-16 09:21:57.000000000 +0200
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2014 David Vossel <dvos...@redhat.com>
+# Copyright (c) 2014 David Vossel <davidvos...@gmail.com>
 #                    All Rights Reserved.
 #
 # This program is free software; you can redistribute it and/or modify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/redis 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/redis
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/redis    
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/redis    
2015-09-16 09:21:57.000000000 +0200
@@ -20,6 +20,7 @@
 
 CHECK_SLAVE_STATE=0
 
+REDIS_CHECK_DUMP="/usr/bin/redis-check-dump"
 REDIS_SERVER="$OCF_RESKEY_bin"
 REDIS_CLIENT="$OCF_RESKEY_client_bin"
 REDIS_CONFIG="$OCF_RESKEY_config"
@@ -29,6 +30,17 @@
 REDIS_SOCKET="$OCF_RESKEY_rundir/$OCF_RESKEY_socket_name"
 REDIS_REPLICATION_PORT="$OCF_RESKEY_port"
 
+if ! [ -f $REDIS_CHECK_DUMP ]; then
+       REDIS_CHECK_DUMP="$(which redis-check-dump 2>/dev/null)"
+fi
+
+if [ -f "$REDIS_CONFIG" ]; then
+       REDIS_DUMP_DIR="$(cat $REDIS_CONFIG | grep "^\s*dir\s" | awk '{ print 
$2 }' 2>/dev/null)"
+       REDIS_DUMP_FILE="$(cat $REDIS_CONFIG | grep "^\s*dbfilename\s" | awk '{ 
print $2 }' 2>/dev/null)"
+fi
+: ${REDIS_DUMP_DIR:=/var/lib/redis/}
+: ${REDIS_DUMP_FILE:=dump.rdb}
+
 function meta_data() {
        cat <<EOI
 <?xml version="1.0"?>
@@ -218,7 +230,11 @@
 
 function redis_client() {
        ocf_log debug "redis_client: '$REDIS_CLIENT' -s '$REDIS_SOCKET' $@"
-       "$REDIS_CLIENT" -s "$REDIS_SOCKET" "$@" | sed 's/\r//'
+       if [ -n "$clientpasswd" ]; then
+               "$REDIS_CLIENT" -s "$REDIS_SOCKET" -a "$clientpasswd" "$@" | 
sed 's/\r//'
+       else 
+               "$REDIS_CLIENT" -s "$REDIS_SOCKET" "$@" | sed 's/\r//'
+       fi
 }
 
 function simple_status() {
@@ -289,6 +305,14 @@
        return $OCF_SUCCESS
 }
 
+function check_dump_file()
+{
+       if ! have_binary "$REDIS_CHECK_DUMP"; then
+               return 0
+       fi
+       $REDIS_CHECK_DUMP ${REDIS_DUMP_DIR}/${REDIS_DUMP_FILE} 2>&1
+}
+
 function start() {
        monitor
        status=$?
@@ -301,6 +325,16 @@
        [[ ! -d "$REDIS_RUNDIR" ]] && mkdir -p "$REDIS_RUNDIR"
        chown -R "$REDIS_USER" "$REDIS_RUNDIR"
 
+       # check for 0 byte database dump file. This is an unrecoverable start
+       # condition that we can avoid by deleting the 0 byte database file.
+       if [ -f "${REDIS_DUMP_DIR}/${REDIS_DUMP_FILE}" ]; then
+               local size="$(stat --format "%s" 
${REDIS_DUMP_DIR}/${REDIS_DUMP_FILE})"
+               if [ "$?" -eq "0" ] && [ "$size" -eq "0" ]; then
+                       ocf_log notice "Detected 0 byte ${REDIS_DUMP_FILE}, 
deleting zero length file to avoid start failure."
+                       rm -f ${REDIS_DUMP_DIR}/${REDIS_DUMP_FILE}
+               fi
+       fi
+
        ocf_log info "start: $REDIS_SERVER --daemonize yes --unixsocket 
'$REDIS_SOCKET' --pidfile '$REDIS_PIDFILE'"
        output="$(su "$REDIS_USER" -s /bin/sh -c "cd '$REDIS_RUNDIR'; exec 
'$REDIS_SERVER' '$REDIS_CONFIG' --daemonize yes --unixsocket '$REDIS_SOCKET' 
--pidfile '$REDIS_PIDFILE'" 2>&1)"
 
@@ -325,7 +359,8 @@
                        # It's possible that the `pidof` will pick up a 
different redis, but in that case, the start operation will just time out
                        sleep 1
                else
-                       ocf_log err "start: Unknown error waiting for redis to 
start"
+                       check_output="$(check_dump_file)"
+                       ocf_log err "start: Unknown error waiting for redis to 
start. redis-check-dump output=${check_output//$'\n'/; }"
                        return $OCF_ERR_GENERIC
                fi
        done
@@ -338,7 +373,8 @@
                return $OCF_SUCCESS
        fi
 
-       ocf_log err "start: Unknown error starting redis. 
output=${output//$'\n'/; }"
+       check_output="$(check_dump_file)"
+       ocf_log err "start: Unknown error starting redis. redis-server 
output=${output//$'\n'/; } redis-check-dump output=${check_output//$'\n'/; }"
        return $status
 }
 
@@ -427,14 +463,23 @@
 
        redis_client slaveof "$master_host" "$master_port"
 
-       # wait briefly for the slave to connect to the master   
-       for (( c=1; c <= 20; c++ ))
-       do
+       # Wait forever for the slave to connect to the master and finish the 
+       # sync. Timeout is controlled by Pacemaker "op start timeout=XX".
+       #
+       # hint: redis master_link_status will only come "up" when 
+       #       the SYNC with the master has completed.
+       #       This can take an arbitraty time (data) and should 
+       #       only be parametrized by the start operation timeout
+       #       by the administrator, not by this resource agent code
+       while true; do 
+               # Wait infinite if replication is syncing
+               # Then start/demote operation timeout determines timeout
                monitor
                status=$?
                if (( status == OCF_SUCCESS )); then
                        return $OCF_SUCCESS
                fi
+               
                sleep 1
        done
 
@@ -478,6 +523,9 @@
 }
 
 NODENAME=$(ocf_local_nodename)
+if [ -f "$REDIS_CONFIG" ]; then
+       clientpasswd="$(cat $REDIS_CONFIG | sed -n -e  
's/^\s*requirepass\s*\(.*\)\s*$/\1/p' | tail -n 1)"
+fi
 
 ocf_log debug "action=${1:-$__OCF_ACTION} 
notify_type=${OCF_RESKEY_CRM_meta_notify_type} 
notify_operation=${OCF_RESKEY_CRM_meta_notify_operation} 
master_host=${OCF_RESKEY_CRM_meta_notify_master_uname} 
slave_host=${OCF_RESKEY_CRM_meta_notify_slave_uname} 
promote_host=${OCF_RESKEY_CRM_meta_notify_promote_uname} 
demote_host=${OCF_RESKEY_CRM_meta_notify_demote_uname}; params: 
bin=${OCF_RESKEY_bin} client_bin=${OCF_RESKEY_client_bin} 
config=${OCF_RESKEY_config} user=${OCF_RESKEY_user} rundir=${OCF_RESKEY_rundir} 
port=${OCF_RESKEY_port}"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/slapd 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/slapd
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/slapd    
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/slapd    
2015-09-16 09:21:57.000000000 +0200
@@ -32,6 +32,7 @@
 #   OCF_RESKEY_password
 #   OCF_RESKEY_parameters
 #   OCF_RESKEY_stop_escalate
+#   OCF_RESKEY_maxfiles
 #
 
################################################################################
 
@@ -53,6 +54,7 @@
 : ${OCF_RESKEY_password=""}
 : ${OCF_RESKEY_parameters=""}
 : ${OCF_RESKEY_stop_escalate=15}
+: ${OCF_RESKEY_maxfiles=""}
 
 USAGE="Usage: $0 {start|stop|status|monitor|validate-all|meta-data}"
 ORIG_IFS=$IFS
@@ -196,6 +198,14 @@
 <shortdesc lang="en">Seconds before stop escalation to KILL</shortdesc>
 <content type="integer" default="15" />
 </parameter>
+
+<parameter name="maxfiles">
+<longdesc lang="en">
+Maximum number of open files (for ulimit -n)
+</longdesc>
+<shortdesc lang="en">Max open files</shortdesc>
+<content type="string" default="" />
+</parameter>
 </parameters>
 
 <actions>
@@ -324,6 +334,14 @@
     options="$options $parameters"
   fi
 
+  if [ -n "$OCF_RESKEY_maxfiles" ]; then
+    ulimit -n $OCF_RESKEY_maxfiles
+    u_rc=$?
+      if [ "$u_rc" -ne 0 ]; then
+        ocf_log warn "Could not set ulimit for open files for slapd to 
'$OCF_RESKEY_maxfiles'"
+      fi
+  fi
+
   if [ -n "$services" ]; then
     $slapd -h "$services" $options 2>&1; rc=$?
   else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/tomcat 
new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/tomcat
--- old/resource-agents-3.9.6+git.1430920897.b7ea7f9/heartbeat/tomcat   
2015-05-08 19:36:26.000000000 +0200
+++ new/resource-agents-3.9.6+git.1442374860.7f3628a/heartbeat/tomcat   
2015-09-16 09:21:57.000000000 +0200
@@ -49,6 +49,13 @@
 : ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
 . ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
 
+# Use runuser if available for SELinux.
+if [ -x /sbin/runuser ]; then 
+  SU=runuser
+else
+  SU=su
+fi
+
 ############################################################################
 # Usage
 usage() 
@@ -143,7 +150,7 @@
 start_rotatelogs()
 {
        # -s is required because tomcat5.5's login shell is /bin/false
-       su - -s /bin/sh $RESOURCE_TOMCAT_USER \
+       $SU - -s /bin/sh $RESOURCE_TOMCAT_USER \
                -c "$ROTATELOGS -l \"$CATALINA_BASE/logs/catalina_%F.log\" 
$CATALINA_ROTATETIME" \
                < "$CATALINA_OUT" > /dev/null 2>&1 &
 }
@@ -154,7 +161,7 @@
 {
        # Check catalina_%F.log is writable or not.
        CURRENT_ROTATELOG_SUFFIX=`date +"%F"`
-       su - -s /bin/sh $RESOURCE_TOMCAT_USER \
+       $SU - -s /bin/sh $RESOURCE_TOMCAT_USER \
                -c "touch 
\"$CATALINA_BASE/logs/catalina_$CURRENT_ROTATELOG_SUFFIX.log\"" > /dev/null 2>&1
        if [ $? -ne 0 ]; then
                ocf_exit_reason 
"$CATALINA_BASE/logs/catalina_$CURRENT_ROTATELOG_SUFFIX.log is not writable."
@@ -205,7 +212,7 @@
        if [ "$RESOURCE_TOMCAT_USER" = root ]; then
                "$TOMCAT_START_SCRIPT" $@ >> "$TOMCAT_CONSOLE" 2>&1
        else
-               tomcatCommand $@ | su - -s /bin/sh "$RESOURCE_TOMCAT_USER" >> 
"$TOMCAT_CONSOLE" 2>&1
+               tomcatCommand $@ | $SU - -s /bin/sh "$RESOURCE_TOMCAT_USER" >> 
"$TOMCAT_CONSOLE" 2>&1
        fi
 
        if [ -n "$REDIRECT_DEFAULT_CONFIG" ]; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/rgmanager/src/resources/db2.sh 
new/resource-agents-3.9.6+git.1442374860.7f3628a/rgmanager/src/resources/db2.sh
--- 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/rgmanager/src/resources/db2.sh 
    2015-05-08 19:36:26.000000000 +0200
+++ 
new/resource-agents-3.9.6+git.1442374860.7f3628a/rgmanager/src/resources/db2.sh 
    2015-09-16 09:21:57.000000000 +0200
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 # Copyright (c) 2011 Holger Teutsch <holger.teut...@web.de>
-# Copyright (c) 2014 David Vossel <dvos...@redhat.com>
+# Copyright (c) 2014 David Vossel <davidvos...@gmail.com>
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/rgmanager/src/resources/orainstance.sh
 
new/resource-agents-3.9.6+git.1442374860.7f3628a/rgmanager/src/resources/orainstance.sh
--- 
old/resource-agents-3.9.6+git.1430920897.b7ea7f9/rgmanager/src/resources/orainstance.sh
     2015-05-08 19:36:26.000000000 +0200
+++ 
new/resource-agents-3.9.6+git.1442374860.7f3628a/rgmanager/src/resources/orainstance.sh
     2015-09-16 09:21:57.000000000 +0200
@@ -473,7 +473,7 @@
                ocf_log info "Stopping listener $LISTENER for $ORACLE_SID"
                lsnrctl_stdout=$(lsnrctl stop "$LISTENER")
                rv=$?
-               if [ $? -ne 0 ]; then
+               if [ $rv -ne 0 ]; then
                        ocf_log error "Listener $LISTENER stop failed for 
$ORACLE_SID: $rv output $lsnrctl_stdout"
                        # XXX - failure?
                fi


Reply via email to