Hello community,

here is the log from the commit of package resource-agents for openSUSE:Factory 
checked in at 2018-03-12 12:03:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/resource-agents (Old)
 and      /work/SRC/openSUSE:Factory/.resource-agents.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "resource-agents"

Mon Mar 12 12:03:58 2018 rev:83 rq:583760 version:4.1.1+git0.5a1edf2b

Changes:
--------
--- /work/SRC/openSUSE:Factory/resource-agents/resource-agents.changes  
2018-02-08 14:10:32.609551190 +0100
+++ /work/SRC/openSUSE:Factory/.resource-agents.new/resource-agents.changes     
2018-03-12 12:04:00.556039522 +0100
@@ -1,0 +2,12 @@
+Tue Mar 06 13:02:41 UTC 2018 - [email protected]
+
+- Update to version 4.1.1+git0.5a1edf2b:
+  * High: mpathpersist: Fixed problem that character string could not be 
correctly parsed (bsc#1083896)
+  * High: VirtualDomain: Properly migrate VMs on node shutdown (bsc#1074014)
+  * Medium: awseip/awsvip: improvements (incl multi NIC support)
+  * Medium: awseip/awsvip: increase default "api_delay" to 3s to avoid failures
+  * Low: pgsql: try to create stats_temp_directory
+  * Low: Filesystem: Add support for cvfs
+  * Low: pgsql: improve validations for replication mode
+
+-------------------------------------------------------------------

Old:
----
  resource-agents-4.1.0+git83.6c77ce7e.tar.xz

New:
----
  resource-agents-4.1.1+git0.5a1edf2b.tar.xz

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

Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.VjDHDk/_old  2018-03-12 12:04:02.311976592 +0100
+++ /var/tmp/diff_new_pack.VjDHDk/_new  2018-03-12 12:04:02.315976449 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           resource-agents
-Version:        4.1.0+git83.6c77ce7e
+Version:        4.1.1+git0.5a1edf2b
 Release:        0
 Summary:        HA Reusable Cluster Resource Scripts
 License:        GPL-2.0 and LGPL-2.1+ and GPL-3.0+

++++++ _service ++++++
--- /var/tmp/diff_new_pack.VjDHDk/_old  2018-03-12 12:04:02.379974155 +0100
+++ /var/tmp/diff_new_pack.VjDHDk/_new  2018-03-12 12:04:02.379974155 +0100
@@ -4,7 +4,7 @@
     <param name="scm">git</param>
     <param name="exclude">.git</param>
     <param name="filename">resource-agents</param>
-    <param name="versionformat">4.1.0+git@TAG_OFFSET@.%h</param>
+    <param name="versionformat">4.1.1+git@TAG_OFFSET@.%h</param>
     <param name="revision">master</param>
     <param name="changesgenerate">enable</param>
   </service>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.VjDHDk/_old  2018-03-12 12:04:02.415972865 +0100
+++ /var/tmp/diff_new_pack.VjDHDk/_new  2018-03-12 12:04:02.419972722 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
 <param name="url">git://github.com/ClusterLabs/resource-agents.git</param>
-<param name="changesrevision">6c77ce7e06beaec7b8220f4bcc84f60e86740423</param>
+<param name="changesrevision">5a1edf2b9d514a6526cdc2ae7218b6e75be2583a</param>
 </service>
 </servicedata>
\ No newline at end of file

++++++ resource-agents-4.1.0+git83.6c77ce7e.tar.xz -> 
resource-agents-4.1.1+git0.5a1edf2b.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/resource-agents-4.1.0+git83.6c77ce7e/ChangeLog 
new/resource-agents-4.1.1+git0.5a1edf2b/ChangeLog
--- old/resource-agents-4.1.0+git83.6c77ce7e/ChangeLog  2018-02-07 
14:30:07.000000000 +0100
+++ new/resource-agents-4.1.1+git0.5a1edf2b/ChangeLog   2018-03-05 
10:25:31.000000000 +0100
@@ -1,3 +1,35 @@
+* Mon Mar  5 2018 resource-agents contributors
+- stable release 4.1.1
+- VirtualDomain: properly migrate VMs on node shutdown (bsc#1074014)
+- mpathpersist: fixed issue with reservation key parsing in status()
+- pgsql: create stats temp directory if it doesnt exist
+- pgsql: improved validation for replication mode
+
+* Mon Feb 26 2018 resource-agents contributors
+- release candidate 4.1.1 rc1
+- awseip/awsvip: improvements (incl multi NIC support)
+- Filesystem: add support for cvfs
+- redis: add support for tunneling replication traffic
+- Raid1: ignore transient devices after stopping a device
+- tomcat: fix invalid stop option
+- oracle: log warning when using using sysdba instead of "monuser"
+- crm_*: use new parameter names
+- syslog-ng: fix to make commercial version supported as well
+- lvmlockd: change lvm.conf to use lvmlockd
+- mariadb: new RA for MariaDB master/slave replication setup with GTID
+- mpathpersist: new RA
+- lxd-info/machine-info: new RAs
+- IPsrcaddr: only check for ifconfig on BSD/Solaris
+- CTDB: cope with deprecated "idmap backend" smb.conf option
+- CTDB: add new possible location for CTDB_SYSCONFIG
+- oracle: fix alter user syntax for set_mon_user_profile
+- db2: improve monitor and simplify STANDBY/.../DISCONNECTED
+- ocf-shellfuncs: fix fallback name for ocf_attribute_target()
+- CTDB: fix initial probe
+- jira: new RA
+- azure-lb: new RA
+- IPsrcaddr: match exact route to avoid failing
+
 * Tue Nov 28 2017 resource-agents contributors
 - stable release 4.1.0
 - ipsec: new RA
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.1.0+git83.6c77ce7e/doc/dev-guides/ra-dev-guide.asc 
new/resource-agents-4.1.1+git0.5a1edf2b/doc/dev-guides/ra-dev-guide.asc
--- old/resource-agents-4.1.0+git83.6c77ce7e/doc/dev-guides/ra-dev-guide.asc    
2018-02-07 14:30:07.000000000 +0100
+++ new/resource-agents-4.1.1+git0.5a1edf2b/doc/dev-guides/ra-dev-guide.asc     
2018-03-05 10:25:31.000000000 +0100
@@ -1235,7 +1235,7 @@
 
 [source,bash]
 --------------------------------------------------------------------------
-ocf_run "frobnicate --spam=eggs" || exit $OCF_ERR_GENERIC
+ocf_run frobnicate --spam=eggs || exit $OCF_ERR_GENERIC
 --------------------------------------------------------------------------
 
 With the command specified above, the resource agent will invoke
@@ -1253,7 +1253,7 @@
 
 [source,bash]
 --------------------------------------------------------------------------
-ocf_run -q "frobnicate --spam=eggs" || exit $OCF_ERR_GENERIC
+ocf_run -q frobnicate --spam=eggs || exit $OCF_ERR_GENERIC
 --------------------------------------------------------------------------
 
 Finally, if the resource agent wants to log the output of a command
@@ -1262,7 +1262,7 @@
 
 [source,bash]
 --------------------------------------------------------------------------
-ocf_run -warn "frobnicate --spam=eggs"
+ocf_run -warn frobnicate --spam=eggs
 --------------------------------------------------------------------------
 
 === Locks: +ocf_take_lock+ and +ocf_release_lock_on_exit+
@@ -1316,7 +1316,7 @@
 [source,bash]
 --------------------------------------------------------------------------
 if ocf_is_true $OCF_RESKEY_superfrobnicate; then
-    ocf_run "frobnicate --super"
+    ocf_run frobnicate --super
 fi
 --------------------------------------------------------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/Filesystem 
new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/Filesystem
--- old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/Filesystem       
2018-02-07 14:30:07.000000000 +0100
+++ new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/Filesystem        
2018-03-05 10:25:31.000000000 +0100
@@ -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|overlay|overlayfs|rozofs|zfs|none)
+       
nfs4|nfs|smbfs|cifs|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs|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|overlay|overlayfs|rozofs|zfs)
+                       
ext4|ext4dev|ext3|reiserfs|reiser4|nss|xfs|jfs|vfat|fat|nfs4|nfs|cifs|smbfs|ocfs2|gfs2|none|lustre|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs)
                        false;;
                        *)
                        true;;
@@ -730,7 +730,7 @@
 
        # these are definitely not block devices
        case $FSTYPE in
-       
nfs4|nfs|smbfs|cifs|none|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs) 
return;;
+       
nfs4|nfs|smbfs|cifs|none|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs)
 return;;
        esac
 
        if `is_option "loop"`; then
@@ -842,7 +842,7 @@
        CLUSTERSAFE=2
 
 case $FSTYPE in
-nfs4|nfs|smbfs|cifs|none|gfs2|glusterfs|ceph|ocfs2|overlay|overlayfs|tmpfs)
+nfs4|nfs|smbfs|cifs|none|gfs2|glusterfs|ceph|ocfs2|overlay|overlayfs|tmpfs|cvfs)
        CLUSTERSAFE=1 # this is kind of safe too
        ;;
 # add here CLUSTERSAFE=0 for all filesystems which are not
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/LVM 
new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/LVM
--- old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/LVM      2018-02-07 
14:30:07.000000000 +0100
+++ new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/LVM       2018-03-05 
10:25:31.000000000 +0100
@@ -217,7 +217,7 @@
 
        # systemd drop-in to stop process before storage services during
        # shutdown/reboot
-       if ps -p 1 | grep -q systemd ; then
+       if systemd_is_running ; then
                systemd_drop_in "99-LVM" "After" "blk-availability.service"
        fi
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/VirtualDomain 
new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/VirtualDomain
--- old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/VirtualDomain    
2018-02-07 14:30:07.000000000 +0100
+++ new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/VirtualDomain     
2018-03-05 10:25:31.000000000 +0100
@@ -518,6 +518,14 @@
                return $OCF_SUCCESS
        fi
 
+       # systemd drop-in to stop domain before libvirtd terminates services
+       # during shutdown/reboot
+       if systemd_is_running ; then
+               systemd_drop_in "99-VirtualDomain-libvirt" "After" 
"libvirtd.service"
+               systemd_drop_in "99-VirtualDomain-machines" "Wants" 
"virt-guest-shutdown.target"
+               systemctl start virt-guest-shutdown.target
+       fi
+
        snapshotimage="$OCF_RESKEY_snapshot/${DOMAIN_NAME}.state"
        if [ -n "$OCF_RESKEY_snapshot" -a -f "$snapshotimage" ]; then
                virsh restore $snapshotimage
@@ -824,6 +832,14 @@
 }
 
 VirtualDomain_migrate_from() {
+       # systemd drop-in to stop domain before libvirtd terminates services
+       # during shutdown/reboot
+       if systemd_is_running ; then
+               systemd_drop_in "99-VirtualDomain-libvirt" "After" 
"libvirtd.service"
+               systemd_drop_in "99-VirtualDomain-machines" "Wants" 
"virt-guest-shutdown.target"
+               systemctl start virt-guest-shutdown.target
+       fi
+
        while ! VirtualDomain_monitor; do
                sleep 1
        done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/aws-vpc-move-ip 
new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/aws-vpc-move-ip
--- old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/aws-vpc-move-ip  
2018-02-07 14:30:07.000000000 +0100
+++ new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/aws-vpc-move-ip   
2018-03-05 10:25:31.000000000 +0100
@@ -66,7 +66,7 @@
 Resource Agent to move IP addresses within a VPC of the Amazon Webservices EC2
 by changing an entry in an specific routing table
 </longdesc>
-<shortdesc lang="en">Move IP within a APC of the AWS EC2</shortdesc>
+<shortdesc lang="en">Move IP within a VPC of the AWS EC2</shortdesc>
 
 <parameters>
 <parameter name="awscli">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/awseip 
new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/awseip
--- old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/awseip   2018-02-07 
14:30:07.000000000 +0100
+++ new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/awseip    2018-03-05 
10:25:31.000000000 +0100
@@ -43,9 +43,11 @@
 # Defaults
 #
 OCF_RESKEY_awscli_default="/usr/bin/aws"
-OCF_RESKEY_api_delay_default="1"
+OCF_RESKEY_profile_default="default"
+OCF_RESKEY_api_delay_default="3"
 
 : ${OCF_RESKEY_awscli=${OCF_RESKEY_awscli_default}}
+: ${OCF_RESKEY_profile=${OCF_RESKEY_profile_default}}
 : ${OCF_RESKEY_api_delay=${OCF_RESKEY_api_delay_default}}
 
 meta_data() {
@@ -76,6 +78,14 @@
 <content type="string" default="${OCF_RESKEY_awscli_default}" />
 </parameter>
 
+<parameter name="profile">
+<longdesc lang="en">
+Valid AWS CLI profile name (see ~/.aws/config and 'aws configure')
+</longdesc>
+<shortdesc lang="en">profile name</shortdesc>
+<content type="string" default="${OCF_RESKEY_profile_default}" />
+</parameter>
+
 <parameter name="elastic_ip" unique="1" required="1">
 <longdesc lang="en">
 reserved elastic ip for ec2 instance
@@ -111,12 +121,11 @@
 </parameters>
 
 <actions>
-<action name="start"        timeout="10s" />
-<action name="stop"         timeout="10s" />
-<action name="monitor"      timeout="10s" interval="20s" depth="0" />
-<action name="reload"       timeout="10s" />
-<action name="migrate_to"   timeout="10s" />
-<action name="migrate_from" timeout="10s" />
+<action name="start"        timeout="30s" />
+<action name="stop"         timeout="30s" />
+<action name="monitor"      timeout="30s" interval="20s" depth="0" />
+<action name="migrate_to"   timeout="30s" />
+<action name="migrate_from" timeout="30s" />
 <action name="meta-data"    timeout="5s" />
 <action name="validate"     timeout="10s" />
 <action name="validate-all" timeout="10s" />
@@ -139,14 +148,21 @@
     awseip_monitor && return $OCF_SUCCESS
 
     if [ -n "${PRIVATE_IP_ADDRESS}" ]; then
-        $AWSCLI ec2 associate-address  \
-            --instance-id ${INSTANCE_ID} \
+        NETWORK_INTERFACES_MACS="$(curl -s 
http://169.254.169.254/latest/meta-data/network/interfaces/macs/)"
+        for MAC in ${NETWORK_INTERFACES_MACS}; do
+            curl -s 
http://169.254.169.254/latest/meta-data/network/interfaces/macs/${MAC}/local-ipv4s
 |
+                grep -q "^${PRIVATE_IP_ADDRESS}$"
+            if [ $? -eq 0 ]; then
+                NETWORK_ID="$(curl -s 
http://169.254.169.254/latest/meta-data/network/interfaces/macs/${MAC}/interface-id)"
+            fi
+        done
+        $AWSCLI --profile $OCF_RESKEY_profile ec2 associate-address  \
             --network-interface-id ${NETWORK_ID} \
             --allocation-id ${ALLOCATION_ID} \
             --private-ip-address ${PRIVATE_IP_ADDRESS}
         RET=$?
     else
-        $AWSCLI ec2 associate-address  \
+        $AWSCLI --profile $OCF_RESKEY_profile ec2 associate-address  \
             --instance-id ${INSTANCE_ID} \
             --allocation-id ${ALLOCATION_ID}
         RET=$?
@@ -159,16 +175,16 @@
         return $OCF_NOT_RUNNING
     fi
 
-    ocf_log info "elastic_ip have been successfully bring up (${ELASTIC_IP})"
+    ocf_log info "elastic_ip has been successfully brought up (${ELASTIC_IP})"
     return $OCF_SUCCESS
 }
 
 awseip_stop() {
     awseip_monitor || return $OCF_SUCCESS
 
-    ASSOCIATION_ID=$($AWSCLI ec2 describe-addresses \
+    ASSOCIATION_ID=$($AWSCLI --profile $OCF_RESKEY_profile --output json ec2 
describe-addresses \
                          --allocation-id ${ALLOCATION_ID} | grep -m 1 
"AssociationId" | awk -F'"' '{print$4}')
-    $AWSCLI ec2 disassociate-address  \
+    $AWSCLI --profile $OCF_RESKEY_profile ec2 disassociate-address  \
         --association-id ${ASSOCIATION_ID}
     RET=$?
 
@@ -179,12 +195,12 @@
         return $OCF_NOT_RUNNING
     fi
 
-    ocf_log info "elastic_ip have been successfully bring down (${ELASTIC_IP})"
+    ocf_log info "elastic_ip has been successfully brought down 
(${ELASTIC_IP})"
     return $OCF_SUCCESS
 }
 
 awseip_monitor() {
-    $AWSCLI ec2 describe-instances --instance-id "${INSTANCE_ID}" | grep -q 
"${ELASTIC_IP}"
+    $AWSCLI --profile $OCF_RESKEY_profile ec2 describe-instances --instance-id 
"${INSTANCE_ID}" | grep -q "${ELASTIC_IP}"
     RET=$?
 
     if [ $RET -ne 0 ]; then
@@ -196,6 +212,11 @@
 awseip_validate() {
     check_binary ${AWSCLI}
 
+    if [ -z "$OCF_RESKEY_profile" ]; then
+        ocf_exit_reason "profile parameter not set"
+        return $OCF_ERR_CONFIGURED
+    fi
+
     if [ -z "${INSTANCE_ID}" ]; then
         ocf_exit_reason "instance_id not found. Is this a EC2 instance?"
         return $OCF_ERR_GENERIC
@@ -216,7 +237,6 @@
 ALLOCATION_ID="${OCF_RESKEY_allocation_id}"
 PRIVATE_IP_ADDRESS="${OCF_RESKEY_private_ip_address}"
 INSTANCE_ID="$(curl -s http://169.254.169.254/latest/meta-data/instance-id)"
-NETWORK_ID="$($AWSCLI ec2 describe-instances --instance-id ${INSTANCE_ID} | 
grep -m 1 'eni' | awk -F'"' '{print$4}')"
 
 case $__OCF_ACTION in
     start)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/awsvip 
new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/awsvip
--- old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/awsvip   2018-02-07 
14:30:07.000000000 +0100
+++ new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/awsvip    2018-03-05 
10:25:31.000000000 +0100
@@ -43,9 +43,11 @@
 # Defaults
 #
 OCF_RESKEY_awscli_default="/usr/bin/aws"
-OCF_RESKEY_api_delay_default="1"
+OCF_RESKEY_profile_default="default"
+OCF_RESKEY_api_delay_default="3"
 
 : ${OCF_RESKEY_awscli=${OCF_RESKEY_awscli_default}}
+: ${OCF_RESKEY_profile=${OCF_RESKEY_profile_default}}
 : ${OCF_RESKEY_api_delay=${OCF_RESKEY_api_delay_default}}
 
 meta_data() {
@@ -76,6 +78,14 @@
 <content type="string" default="${OCF_RESKEY_awscli_default}" />
 </parameter>
 
+<parameter name="profile">
+<longdesc lang="en">
+Valid AWS CLI profile name (see ~/.aws/config and 'aws configure')
+</longdesc>
+<shortdesc lang="en">profile name</shortdesc>
+<content type="string" default="${OCF_RESKEY_profile_default}" />
+</parameter>
+
 <parameter name="secondary_private_ip" unique="1" required="1">
 <longdesc lang="en">
 reserved secondary private ip for ec2 instance
@@ -95,12 +105,11 @@
 </parameters>
 
 <actions>
-<action name="start"        timeout="10s" />
-<action name="stop"         timeout="10s" />
-<action name="monitor"      timeout="10s" interval="20s" depth="0" />
-<action name="reload"       timeout="10s" />
-<action name="migrate_to"   timeout="10s" />
-<action name="migrate_from" timeout="10s" />
+<action name="start"        timeout="30s" />
+<action name="stop"         timeout="30s" />
+<action name="monitor"      timeout="30s" interval="20s" depth="0" />
+<action name="migrate_to"   timeout="30s" />
+<action name="migrate_from" timeout="30s" />
 <action name="meta-data"    timeout="5s" />
 <action name="validate"     timeout="10s" />
 <action name="validate-all" timeout="10s" />
@@ -122,7 +131,7 @@
 awsvip_start() {
     awsvip_monitor && return $OCF_SUCCESS
 
-    $AWSCLI ec2 assign-private-ip-addresses \
+    $AWSCLI --profile $OCF_RESKEY_profile ec2 assign-private-ip-addresses \
         --network-interface-id ${NETWORK_ID} \
         --private-ip-addresses ${SECONDARY_PRIVATE_IP} \
         --allow-reassignment
@@ -135,14 +144,14 @@
         return $OCF_NOT_RUNNING
     fi
 
-    ocf_log info "secondary_private_ip have been successfully bring up 
(${SECONDARY_PRIVATE_IP})"
+    ocf_log info "secondary_private_ip has been successfully brought up 
(${SECONDARY_PRIVATE_IP})"
     return $OCF_SUCCESS
 }
 
 awsvip_stop() {
     awsvip_monitor || return $OCF_SUCCESS
 
-    $AWSCLI ec2 unassign-private-ip-addresses \
+    $AWSCLI --profile $OCF_RESKEY_profile ec2 unassign-private-ip-addresses \
         --network-interface-id ${NETWORK_ID} \
         --private-ip-addresses ${SECONDARY_PRIVATE_IP}
     RET=$?
@@ -154,12 +163,12 @@
         return $OCF_NOT_RUNNING
     fi
 
-    ocf_log info "secondary_private_ip have been successfully bring down 
(${SECONDARY_PRIVATE_IP})"
+    ocf_log info "secondary_private_ip has been successfully brought down 
(${SECONDARY_PRIVATE_IP})"
     return $OCF_SUCCESS
 }
 
 awsvip_monitor() {
-    $AWSCLI ec2 describe-instances --instance-id "${INSTANCE_ID}" | grep -q 
"${SECONDARY_PRIVATE_IP}"
+    $AWSCLI --profile $OCF_RESKEY_profile ec2 describe-instances --instance-id 
"${INSTANCE_ID}" | grep -q "${SECONDARY_PRIVATE_IP}"
     RET=$?
 
     if [ $RET -ne 0 ]; then
@@ -171,6 +180,11 @@
 awsvip_validate() {
     check_binary ${AWSCLI}
 
+    if [ -z "$OCF_RESKEY_profile" ]; then
+        ocf_exit_reason "profile parameter not set"
+        return $OCF_ERR_CONFIGURED
+    fi
+
     if [ -z "${INSTANCE_ID}" ]; then
         ocf_exit_reason "instance_id not found. Is this a EC2 instance?"
         return $OCF_ERR_GENERIC
@@ -189,7 +203,7 @@
 AWSCLI="${OCF_RESKEY_awscli}"
 SECONDARY_PRIVATE_IP="${OCF_RESKEY_secondary_private_ip}"
 INSTANCE_ID="$(curl -s http://169.254.169.254/latest/meta-data/instance-id)"
-NETWORK_ID="$($AWSCLI ec2 describe-instances --instance-id ${INSTANCE_ID} | 
grep -m 1 'eni' | awk -F'"' '{print$4}')"
+NETWORK_ID="$($AWSCLI --profile $OCF_RESKEY_profile --output json ec2 
describe-instances --instance-id ${INSTANCE_ID} | grep -m 1 'eni' | awk -F'"' 
'{print$4}')"
 
 case $__OCF_ACTION in
     start)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/clvm 
new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/clvm
--- old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/clvm     2018-02-07 
14:30:07.000000000 +0100
+++ new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/clvm      2018-03-05 
10:25:31.000000000 +0100
@@ -363,7 +363,7 @@
 
        # systemd drop-in to stop process before storage services during
        # shutdown/reboot
-       if ps -p 1 | grep -q systemd ; then
+       if systemd_is_running ; then
                systemd_drop_in "99-clvmd" "After" "blk-availability.service"
        fi
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/mpathpersist 
new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/mpathpersist
--- old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/mpathpersist     
2018-02-07 14:30:07.000000000 +0100
+++ new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/mpathpersist      
2018-03-05 10:25:31.000000000 +0100
@@ -271,7 +271,7 @@
                         RESERVED_DEVS+=($dev)
                     fi
 
-                    reservation_key=`echo $READ_RESERVATION | $GREP -o 
'Key=0x[0-9a-f]*' | $GREP -o '0x[0-9a-f]*'`
+                    reservation_key=`echo $READ_RESERVATION | $GREP -o 'Key = 
0x[0-9a-f]*' | $GREP -o '0x[0-9a-f]*'`
                     if [ -n "$reservation_key" ]; then 
                         DEVS_WITH_RESERVATION+=($dev)
                         RESERVATION_KEYS+=($reservation_key)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/ocf-shellfuncs.in 
new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/ocf-shellfuncs.in
--- old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/ocf-shellfuncs.in        
2018-02-07 14:30:07.000000000 +0100
+++ new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/ocf-shellfuncs.in 
2018-03-05 10:25:31.000000000 +0100
@@ -668,6 +668,15 @@
        return 0
 }
 
+# usage: systemd_is_running
+# returns:
+#    0  PID 1 is systemd
+#    1  otherwise
+systemd_is_running()
+{
+       [ "$(cat /proc/1/comm 2>/dev/null)" = "systemd" ]
+}
+
 # usage: systemd_drop_in <name> <After|Before> <dependency.service>
 systemd_drop_in()
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/pgsql 
new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/pgsql
--- old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/pgsql    2018-02-07 
14:30:07.000000000 +0100
+++ new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/pgsql     2018-03-05 
10:25:31.000000000 +0100
@@ -575,6 +575,8 @@
         check_socket_dir
     fi
 
+    check_stat_temp_directory
+
     if [ "$OCF_RESKEY_rep_mode" = "slave" ]; then
         rm -f $RECOVERY_CONF
         make_recovery_conf || return $OCF_ERR_GENERIC
@@ -633,6 +635,7 @@
 
 pgsql_replication_start() {
     local rc
+    local synchronous_standby_names
 
     # initializing for replication
     change_pgsql_status "$NODENAME" "STOP"
@@ -653,6 +656,13 @@
     if [ $? -ne $OCF_SUCCESS ]; then
         return $OCF_ERR_GENERIC
     fi
+
+    synchronous_standby_names=$(exec_sql 
"${CHECK_SYNCHRONOUS_STANDBY_NAMES_SQL}")
+    if [ -n "${synchronous_standby_names}" ]; then
+        ocf_exit_reason "Invalid synchronous_standby_names is set in 
postgresql.conf."
+        return $OCF_ERR_CONFIGURED
+    fi
+
     change_pgsql_status "$NODENAME" "HS:alone"
     return $OCF_SUCCESS
 }
@@ -1883,6 +1893,7 @@
         PROMOTE_ME="1000"
 
         CHECK_MS_SQL="select pg_is_in_recovery()"
+        CHECK_SYNCHRONOUS_STANDBY_NAMES_SQL="show synchronous_standby_names"
         ocf_version_cmp "$version" "10"
         if [ $? -eq 1 ] || [ $? -eq 2 ]; then
             CHECK_XLOG_LOC_SQL="select 
pg_last_wal_replay_lsn(),pg_last_wal_receive_lsn()"
@@ -1914,7 +1925,7 @@
         if [ $check_config_rc -eq 0 ]; then
             rep_mode_string="include '$REP_MODE_CONF' # added by pgsql RA"
             if [ "$OCF_RESKEY_rep_mode" = "sync" ]; then
-                if ! grep -q "$rep_mode_string" $OCF_RESKEY_config; then
+                if ! grep -q "^[[:space:]]*$rep_mode_string" 
$OCF_RESKEY_config; then
                     ocf_log info "adding include directive into 
$OCF_RESKEY_config"
                     echo "$rep_mode_string" >> $OCF_RESKEY_config
                 fi
@@ -1946,7 +1957,7 @@
             return $OCF_ERR_CONFIGURED
         fi
 
-        echo "$OCF_RESKEY_replication_slot_name" | grep -q -e [^a-z0-9_]
+        echo "$OCF_RESKEY_replication_slot_name" | grep -q -e '[^a-z0-9_]'
         if [ $? -eq 0 ]; then
             ocf_exit_reason "Invalid 
replication_slot_name($OCF_RESKEY_replication_slot_name). only use lower case 
letters, numbers, and the underscore character."
             return $OCF_ERR_CONFIGURED
@@ -1978,6 +1989,43 @@
 }
 
 #
+# Check if we need to create stats temp directory in tmpfs
+#
+
+check_stat_temp_directory() {
+    local stats_temp
+
+    stats_temp=`get_pgsql_param stats_temp_directory`
+
+    if [ -z "$stats_temp" ]; then
+        return
+    fi
+
+    if [ "${stats_temp#/}" = "$stats_temp" ]; then
+        stats_temp="$OCF_RESKEY_pgdata/$stats_temp"
+    fi
+
+    if [ -d "$stats_temp" ]; then
+        return
+    fi
+
+    if ! mkdir -p "$stats_temp"; then
+        ocf_exit_reason "Can't create directory $stats_temp"
+        exit $OCF_ERR_PERM
+    fi
+
+    if ! chown $OCF_RESKEY_pgdba: "$stats_temp"; then
+        ocf_exit_reason "Can't change ownership for $stats_temp"
+        exit $OCF_ERR_PERM
+    fi
+
+    if ! chmod 700 "$stats_temp"; then
+        ocf_exit_reason "Can't change permissions for $stats_temp"
+        exit $OCF_ERR_PERM
+    fi
+}
+
+#
 # Check socket directory
 #
 check_socket_dir() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/tomcat 
new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/tomcat
--- old/resource-agents-4.1.0+git83.6c77ce7e/heartbeat/tomcat   2018-02-07 
14:30:07.000000000 +0100
+++ new/resource-agents-4.1.1+git0.5a1edf2b/heartbeat/tomcat    2018-03-05 
10:25:31.000000000 +0100
@@ -645,7 +645,7 @@
 
 if [ -z "${TOMCAT_START_SCRIPT}" ]; then
        if ocf_is_true $OCF_RESKEY_force_systemd && \
-            ps -p 1 | grep -q systemd; then
+            systemd_is_running; then
                SYSTEMD=1
        elif [ -e "$CATALINA_HOME/bin/catalina.sh" ]; then
                TOMCAT_START_SCRIPT="$CATALINA_HOME/bin/catalina.sh"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/resource-agents-4.1.0+git83.6c77ce7e/rgmanager/src/resources/nfsserver.sh 
new/resource-agents-4.1.1+git0.5a1edf2b/rgmanager/src/resources/nfsserver.sh
--- 
old/resource-agents-4.1.0+git83.6c77ce7e/rgmanager/src/resources/nfsserver.sh   
    2018-02-07 14:30:07.000000000 +0100
+++ 
new/resource-agents-4.1.1+git0.5a1edf2b/rgmanager/src/resources/nfsserver.sh    
    2018-03-05 10:25:31.000000000 +0100
@@ -17,7 +17,7 @@
 . $(dirname $0)/ocf-shellfuncs
 
 # SELinux information
-which restorecon &> /dev/null && selinuxenabled
+which restorecon &> /dev/null && selinuxenabled &> /dev/null
 export SELINUX_ENABLED=$?
 if [ $SELINUX_ENABLED ]; then
        export SELINUX_LABEL="$(ls -ldZ /var/lib/nfs/statd | cut -f4 -d' ')"


Reply via email to