Hello community, here is the log from the commit of package resource-agents for openSUSE:Factory checked in at 2016-05-16 12:01:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2016-05-04 08:17:26.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.resource-agents.new/resource-agents.changes 2016-05-16 12:01:24.000000000 +0200 @@ -1,0 +2,13 @@ +Tue May 03 11:28:40 UTC 2016 - kgronlund@suse.com + +- Update to version 3.9.7+git.1461938976.cb7c36a: + + High: managing "Elastic IP" for EC2 instances + + High: managing "Secondary Private IP" for EC2 instances + + Low: VirtualDomain: fix unnecessary error when probing nonexistent domain + + Low: mysql: Handle non-standard mysql server port + + Low: Fix protential error for RA:nagios + + Medium: iSCSILogicalUnit: Fix when using rbd store. + + Low: iSCSILogicalUnit: Add tgt_bsopts parameter. + + Low: Don't send Inaccessible real server e-mails in fork=yes mode + +------------------------------------------------------------------- Old: ---- resource-agents-3.9.7+git.1461679689.18a78f5.tar.xz New: ---- resource-agents-3.9.7+git.1461938976.cb7c36a.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ resource-agents.spec ++++++ --- /var/tmp/diff_new_pack.ZnH7wd/_old 2016-05-16 12:01:25.000000000 +0200 +++ /var/tmp/diff_new_pack.ZnH7wd/_new 2016-05-16 12:01:25.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.7+git.1461679689.18a78f5 +Version: 3.9.7+git.1461938976.cb7c36a Release: 0 Url: http://linux-ha.org/ Source: resource-agents-%{version}.tar.xz ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.ZnH7wd/_old 2016-05-16 12:01:25.000000000 +0200 +++ /var/tmp/diff_new_pack.ZnH7wd/_new 2016-05-16 12:01:25.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">18a78f523b8ad57d4926dee45df778e623da990e</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">cb7c36abbc9a6002928d429d2492836117c056fa</param></service></servicedata> \ No newline at end of file ++++++ resource-agents-3.9.7+git.1461679689.18a78f5.tar.xz -> resource-agents-3.9.7+git.1461938976.cb7c36a.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/VirtualDomain new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/VirtualDomain --- old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/VirtualDomain 2016-04-26 17:24:19.000000000 +0200 +++ new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/VirtualDomain 2016-05-03 13:28:39.000000000 +0200 @@ -280,12 +280,6 @@ get_emulator() { local emulator="" - # An emulator is not required, so only report message in debug mode - local loglevel="debug" - - if ocf_is_probe; then - loglevel="notice" - fi emulator=$(virsh $VIRSH_OPTIONS dumpxml $DOMAIN_NAME 2>/dev/null | sed -n -e 's/^.*<emulator>(.*)</emulator>.*$/\1/p') if [ -z "$emulator" ] && [ -e "$EMULATOR_STATE" ]; then @@ -297,8 +291,6 @@ if [ -n "$emulator" ]; then basename $emulator - else - ocf_log $loglevel "Unable to determine emulator for $DOMAIN_NAME" fi } @@ -317,6 +309,12 @@ { local rc=$OCF_ERR_GENERIC local emulator=$(get_emulator) + # An emulator is not required, so only report message in debug mode + local loglevel="debug" + + if ocf_is_probe; then + loglevel="notice" + fi case "$emulator" in qemu-kvm|qemu-dm|qemu-system-*) @@ -349,6 +347,8 @@ if [ $? -eq 0 ]; then rc=$OCF_SUCCESS fi + else + ocf_log $loglevel "Unable to determine emulator for $DOMAIN_NAME" fi ;; esac diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/awseip new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/awseip --- old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/awseip 1970-01-01 01:00:00.000000000 +0100 +++ new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/awseip 2016-05-03 13:28:39.000000000 +0200 @@ -0,0 +1,219 @@ +#!/bin/sh +# +# +# Manage Elastic IP with Pacemaker +# +# +# Copyright 2016 guessi <guessi@gmail.com> +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +# +# Prerequisites: +# +# - preconfigured AWS CLI running environment (AccessKey, SecretAccessKey, etc.) +# - a reserved secondary private IP address for EC2 instances high availablity +# - IAM user role with the following permissions: +# * DescribeInstances +# * AssociateAddress +# * DisassociateAddress +# + +####################################################################### +# Initialization: + +: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat} +. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs + +####################################################################### + +# +# Defaults +# +OCF_RESKEY_awscli_default="/usr/bin/awscli" +OCF_RESKEY_api_delay_default="1" + +: ${OCF_RESKEY_awscli=${OCF_RESKEY_awscli_default}} +: ${OCF_RESKEY_api_delay=${OCF_RESKEY_api_delay_default}} + +meta_data() { + cat <<END +<?xml version="1.0"?> +<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"> +<resource-agent name="awseip" version="0.9"> +<version>1.0</version> + +<longdesc lang="en"> +description +</longdesc> +<shortdesc lang="en"></shortdesc> + +<parameters> + +<parameter name="awscli" unique="0"> +<longdesc lang="en"> +command line tools for aws services +</longdesc> +<shortdesc lang="en">aws cli tools</shortdesc> +<content type="string" default="${OCF_RESKEY_awscli_default}" /> +</parameter> + +<parameter name="elastic_ip" unique="1" required="1"> +<longdesc lang="en"> +reserved elastic ip for ec2 instance +</longdesc> +<shortdesc lang="en">reserved elastic ip for ec2 instance</shortdesc> +<content type="string" default="" /> +</parameter> + +<parameter name="api_delay" unique="0"> +<longdesc lang="en"> +a short delay between API calls, to avoid sending API too quick +</longdesc> +<shortdesc lang="en">a short delay between API calls</shortdesc> +<content type="integer" default="${OCF_RESKEY_api_delay_default}" /> +</parameter> + +</parameters> + +<actions> +<action name="start" timeout="10" /> +<action name="stop" timeout="10" /> +<action name="monitor" timeout="10" interval="20" depth="0" /> +<action name="reload" timeout="10" /> +<action name="migrate_to" timeout="10" /> +<action name="migrate_from" timeout="10" /> +<action name="meta-data" timeout="5" /> +<action name="validate" timeout="10" /> +<action name="validate-all" timeout="10" /> +</actions> +</resource-agent> +END +} + +####################################################################### + +awseip_usage() { + cat <<END +usage: $0 {start|stop|monitor|migrate_to|migrate_from|validate|validate-all|meta-data} + +Expects to have a fully populated OCF RA-compliant environment set. +END +} + +awseip_start() { + awseip_monitor && return $OCF_SUCCESS + + $AWSCLI ec2 associate-address \ + --instance-id ${INSTANCE_ID} \ + --public-ip ${ELASTIC_IP} + RET=$? + + # delay to avoid sending request too fast + sleep ${OCF_RESKEY_api_delay} + + if [ $RET -ne 0 ]; then + return $OCF_NOT_RUNNING + fi + + ocf_log info "elastic_ip have been successfully bring up (${ELASTIC_IP})" + return $OCF_SUCCESS +} + +awseip_stop() { + awseip_monitor || return $OCF_SUCCESS + + $AWSCLI ec2 disassociate-address \ + --public-ip ${ELASTIC_IP} + RET=$? + + # delay to avoid sending request too fast + sleep ${OCF_RESKEY_api_delay} + + if [ $RET -ne 0 ]; then + return $OCF_NOT_RUNNING + fi + + ocf_log info "elastic_ip have been successfully bring down (${ELASTIC_IP})" + return $OCF_SUCCESS +} + +awseip_monitor() { + $AWSCLI ec2 describe-instances --instance-id "${INSTANCE_ID}" | grep -q "${ELASTIC_IP}" + RET=$? + + if [ $RET -ne 0 ]; then + return $OCF_NOT_RUNNING + fi + return $OCF_SUCCESS +} + +awseip_validate() { + check_binary ${AWSCLI} + + if [ -z "${INSTANCE_ID}" ]; then + ocf_log info "instant_id could not been found, is this EC2 instance?" + return $OCF_GENERIC + fi + + return $OCF_SUCCESS +} + +: ${OCF_RESKEY_awscli="/usr/bin/aws"} +AWSCLI="${OCF_RESKEY_awscli}" +ELASTIC_IP="${OCF_RESKEY_elastic_ip}" +INSTANCE_ID="$(curl -s http://169.254.169.254/latest/meta-data/instance-id)" + +case $__OCF_ACTION in + meta-data) + meta_data + exit $OCF_SUCCESS + ;; + start) + awseip_start + ;; + stop) + awseip_stop + ;; + monitor) + awseip_monitor + ;; + migrate_to) + ocf_log info "Migrating ${OCF_RESOURCE_INSTANCE} to ${OCF_RESKEY_CRM_meta_migrate_target}." + awseip_stop + ;; + migrate_from) + ocf_log info "Migrating ${OCF_RESOURCE_INSTANCE} from ${OCF_RESKEY_CRM_meta_migrate_source}." + awseip_start + ;; + reload) + ocf_log info "Reloading ${OCF_RESOURCE_INSTANCE} ..." + ;; + validate|validate-all) + awseip_validate + ;; + usage|help) + awseip_usage + exit $OCF_SUCCESS + ;; + *) + awseip_usage + exit $OCF_ERR_UNIMPLEMENTED + ;; +esac + +rc=$? +ocf_log debug "${OCF_RESOURCE_INSTANCE} $__OCF_ACTION : $rc" +exit $rc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/awsvip new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/awsvip --- old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/awsvip 1970-01-01 01:00:00.000000000 +0100 +++ new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/awsvip 2016-05-03 13:28:39.000000000 +0200 @@ -0,0 +1,222 @@ +#!/bin/sh +# +# +# Manage Secondary Private IP with Pacemaker +# +# +# Copyright 2016 guessi <guessi@gmail.com> +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +# +# Prerequisites: +# +# - preconfigured AWS CLI running environment (AccessKey, SecretAccessKey, etc.) +# - a reserved secondary private IP address for EC2 instances high availablity +# - IAM user role with the following permissions: +# * DescribeInstances +# * AssignPrivateIpAddresses +# * UnassignPrivateIpAddresses +# + +####################################################################### +# Initialization: + +: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat} +. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs + +####################################################################### + +# +# Defaults +# +OCF_RESKEY_awscli_default="/usr/bin/awscli" +OCF_RESKEY_api_delay_default="1" + +: ${OCF_RESKEY_awscli=${OCF_RESKEY_awscli_default}} +: ${OCF_RESKEY_api_delay=${OCF_RESKEY_api_delay_default}} + +meta_data() { + cat <<END +<?xml version="1.0"?> +<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"> +<resource-agent name="awsvip" version="0.9"> +<version>1.0</version> + +<longdesc lang="en"> +description +</longdesc> +<shortdesc lang="en"></shortdesc> + +<parameters> + +<parameter name="awscli" unique="0"> +<longdesc lang="en"> +command line tools for aws services +</longdesc> +<shortdesc lang="en">aws cli tools</shortdesc> +<content type="string" default="${OCF_RESKEY_awscli_default}" /> +</parameter> + +<parameter name="secondary_private_ip" unique="1" required="1"> +<longdesc lang="en"> +reserved secondary private ip for ec2 instance +</longdesc> +<shortdesc lang="en">reserved secondary private ip for ec2 instance</shortdesc> +<content type="string" default="" /> +</parameter> + +<parameter name="api_delay" unique="0"> +<longdesc lang="en"> +a short delay between API calls, to avoid sending API too quick +</longdesc> +<shortdesc lang="en">a short delay between API calls</shortdesc> +<content type="integer" default="${OCF_RESKEY_api_delay_default}" /> +</parameter> + +</parameters> + +<actions> +<action name="start" timeout="10" /> +<action name="stop" timeout="10" /> +<action name="monitor" timeout="10" interval="20" depth="0" /> +<action name="reload" timeout="10" /> +<action name="migrate_to" timeout="10" /> +<action name="migrate_from" timeout="10" /> +<action name="meta-data" timeout="5" /> +<action name="validate" timeout="10" /> +<action name="validate-all" timeout="10" /> +</actions> +</resource-agent> +END +} + +####################################################################### + +awsvip_usage() { + cat <<END +usage: $0 {start|stop|monitor|migrate_to|migrate_from|validate|validate-all|meta-data} + +Expects to have a fully populated OCF RA-compliant environment set. +END +} + +awsvip_start() { + awsvip_monitor && return $OCF_SUCCESS + + $AWSCLI ec2 assign-private-ip-addresses \ + --network-interface-id ${NETWORK_ID} \ + --private-ip-addresses ${SECONDARY_PRIVATE_IP} \ + --allow-reassignment + RET=$? + + # delay to avoid sending request too fast + sleep ${OCF_RESKEY_api_delay} + + if [ $RET -ne 0 ]; then + return $OCF_NOT_RUNNING + fi + + ocf_log info "secondary_private_ip have been successfully bring up (${SECONDARY_PRIVATE_IP})" + return $OCF_SUCCESS +} + +awsvip_stop() { + awsvip_monitor || return $OCF_SUCCESS + + $AWSCLI ec2 unassign-private-ip-addresses \ + --network-interface-id ${NETWORK_ID} \ + --private-ip-addresses ${SECONDARY_PRIVATE_IP} + RET=$? + + # delay to avoid sending request too fast + sleep ${OCF_RESKEY_api_delay} + + if [ $RET -ne 0 ]; then + return $OCF_NOT_RUNNING + fi + + ocf_log info "secondary_private_ip have been successfully bring down (${SECONDARY_PRIVATE_IP})" + return $OCF_SUCCESS +} + +awsvip_monitor() { + $AWSCLI ec2 describe-instances --instance-id "${INSTANCE_ID}" | grep -q "${SECONDARY_PRIVATE_IP}" + RET=$? + + if [ $RET -ne 0 ]; then + return $OCF_NOT_RUNNING + fi + return $OCF_SUCCESS +} + +awsvip_validate() { + check_binary ${AWSCLI} + + if [ -z "${INSTANCE_ID}" ]; then + ocf_log info "instant_id could not been found, is this EC2 instance?" + return $OCF_GENERIC + fi + + return $OCF_SUCCESS +} + +: ${OCF_RESKEY_awscli="/usr/bin/aws"} +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}')" + +case $__OCF_ACTION in + meta-data) + meta_data + exit $OCF_SUCCESS + ;; + start) + awsvip_start + ;; + stop) + awsvip_stop + ;; + monitor) + awsvip_monitor + ;; + migrate_to) + ocf_log info "Migrating ${OCF_RESOURCE_INSTANCE} to ${OCF_RESKEY_CRM_meta_migrate_target}." + awsvip_stop + ;; + migrate_from) + ocf_log info "Migrating ${OCF_RESOURCE_INSTANCE} from ${OCF_RESKEY_CRM_meta_migrate_source}." + awsvip_start + ;; + reload) + ocf_log info "Reloading ${OCF_RESOURCE_INSTANCE} ..." + ;; + validate|validate-all) + awsvip_validate + ;; + usage|help) + awsvip_usage + exit $OCF_SUCCESS + ;; + *) + awsvip_usage + exit $OCF_ERR_UNIMPLEMENTED + ;; +esac + +rc=$? +ocf_log debug "${OCF_RESOURCE_INSTANCE} $__OCF_ACTION : $rc" +exit $rc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/iSCSILogicalUnit new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/iSCSILogicalUnit --- old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/iSCSILogicalUnit 2016-04-26 17:24:19.000000000 +0200 +++ new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/iSCSILogicalUnit 2016-05-03 13:28:39.000000000 +0200 @@ -72,6 +72,7 @@ # # OCF_RESKEY_tgt_bstype # OCF_RESKEY_tgt_bsoflags +# OCF_RESKEY_tgt_bsopts # OCF_RESKEY_tgt_device_type ####################################################################### @@ -179,6 +180,15 @@ <content type="string" /> </parameter> +<parameter name="tgt_bsopts" required="0" unique="0"> +<longdesc lang="en"> +TGT specific backing store options. +See tgtadm(8). +</longdesc> +<shortdesc lang="en">TGT backing store options</shortdesc> +<content type="string" /> +</parameter> + <parameter name="tgt_device_type" required="0" unique="0"> <longdesc lang="en"> TGT specific device type. @@ -303,6 +313,7 @@ tgt_args="" [[ $OCF_RESKEY_tgt_bstype ]] && tgt_args="$tgt_args --bstype=$OCF_RESKEY_tgt_bstype" [[ $OCF_RESKEY_tgt_bsoflags ]] && tgt_args="$tgt_args --bsoflags=$OCF_RESKEY_tgt_bsoflags" + [[ $OCF_RESKEY_tgt_bsopts ]] && tgt_args="$tgt_args --bsopts=$OCF_RESKEY_tgt_bsopts" [[ $OCF_RESKEY_tgt_device_type ]] && tgt_args="$tgt_args --device-type=$OCF_RESKEY_tgt_device_type" ocf_run tgtadm --lld iscsi --op new --mode logicalunit \ @@ -452,8 +463,10 @@ } iSCSILogicalUnit_monitor() { - # If our backing device (or file) doesn't even exist, we're not running - [ -e ${OCF_RESKEY_path} ] || return $OCF_NOT_RUNNING + if [ x"${OCF_RESKEY_tgt_bstype}" != x"rbd" ]; then + # If our backing device (or file) doesn't even exist, we're not running + [ -e ${OCF_RESKEY_path} ] || return $OCF_NOT_RUNNING + fi case $OCF_RESKEY_implementation in iet) @@ -581,16 +594,16 @@ iet) # IET does not support setting the vendor and product ID # (it always uses "IET" and "VIRTUAL-DISK") - unsupported_params="vendor_id product_id allowed_initiators lio_iblock tgt_bstype tgt_bsoflags tgt_device_type" + unsupported_params="vendor_id product_id allowed_initiators lio_iblock tgt_bstype tgt_bsoflags tgt_bsopts tgt_device_type" ;; tgt) unsupported_params="allowed_initiators lio_iblock" ;; lio) - unsupported_params="scsi_id vendor_id product_id tgt_bstype tgt_bsoflags tgt_device_type" + unsupported_params="scsi_id vendor_id product_id tgt_bstype tgt_bsoflags tgt_bsopts tgt_device_type" ;; lio-t) - unsupported_params="scsi_id vendor_id product_id tgt_bstype tgt_bsoflags tgt_device_type lio_iblock" + unsupported_params="scsi_id vendor_id product_id tgt_bstype tgt_bsoflags tgt_bsopts tgt_device_type lio_iblock" ;; esac diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/mysql new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/mysql --- old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/mysql 2016-04-26 17:24:19.000000000 +0200 +++ new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/mysql 2016-05-03 13:28:39.000000000 +0200 @@ -549,6 +549,7 @@ ocf_run $MYSQL $MYSQL_OPTIONS_REPL \ -e "CHANGE MASTER TO MASTER_HOST='$new_master', \ + MASTER_PORT=$OCF_RESKEY_replication_port, \ MASTER_USER='$OCF_RESKEY_replication_user', \ MASTER_PASSWORD='$OCF_RESKEY_replication_passwd' $master_params" rm -f $tmpfile diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/nagios new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/nagios --- old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/nagios 2016-04-26 17:24:19.000000000 +0200 +++ new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/nagios 2016-05-03 13:28:39.000000000 +0200 @@ -130,7 +130,6 @@ return $rc fi - # if resource is already running,no need to continue code after this. if nagios_monitor; then ocf_log info "Nagios is already running" @@ -138,11 +137,12 @@ fi # Remove ${OCF_RESKEY_pid} if it exists - rm -f ${OCF_RESKEY_pid} + rm -f "${OCF_RESKEY_pid}" ocf_run -q touch ${OCF_RESKEY_log} ${OCF_RESKEY_retention} ${OCF_RESKEY_pid} chown ${OCF_RESKEY_user}:${OCF_RESKEY_group} ${OCF_RESKEY_log} ${OCF_RESKEY_retention} ${OCF_RESKEY_pid} - rm -f ${OCF_RESKEY_command} + rm -f "${OCF_RESKEY_command}" + [ -x /sbin/restorecon ] && /sbin/restorecon ${OCF_RESKEY_pid} ocf_run -q ${OCF_RESKEY_binary} -d ${OCF_RESKEY_config} @@ -150,7 +150,7 @@ sleep 1 done - if [ $? -eq "0" ]; then + if [ $? -eq 0 ]; then ocf_log info "Nagios started" return ${OCF_SUCCESS} fi @@ -160,7 +160,7 @@ nagios_stop() { nagios_monitor - if [ "$?" -ne "$OCF_SUCCESS" ]; then + if [ $? -ne $OCF_SUCCESS ]; then # Currently not running. Nothing to do. ocf_log info "Resource is already stopped" rm -f ${OCF_RESKEY_pid} @@ -174,7 +174,7 @@ while nagios_monitor; do sleep 1 done - + return $OCF_SUCCESS } @@ -195,15 +195,15 @@ } nagios_validate_all(){ - check_binary ${OCF_RESKEY_binary} - - if [ ! -f ${OCF_RESKEY_config} ]; then + check_binary "${OCF_RESKEY_binary}" + + if [ ! -f "${OCF_RESKEY_config}" ]; then ocf_exit_reason "Configuration file ${OCF_RESKEY_config} not found" return ${OCF_ERR_INSTALLED} fi - - ${OCF_RESKEY_binary} -v ${OCF_RESKEY_config} > /dev/null 2>&1; - if [ $? -ne "0" ]; then + + ${OCF_RESKEY_binary} -v ${OCF_RESKEY_config} >/dev/null 2>&1 + if [ $? -ne 0 ]; then ocf_exit_reason "Configuration check failed" return ${OCF_ERR_INSTALLED} fi @@ -242,5 +242,5 @@ rc=$? exit $rc - + # End of this script diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/rabbitmq-cluster new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/rabbitmq-cluster --- old/resource-agents-3.9.7+git.1461679689.18a78f5/heartbeat/rabbitmq-cluster 2016-04-26 17:24:19.000000000 +0200 +++ new/resource-agents-3.9.7+git.1461938976.cb7c36a/heartbeat/rabbitmq-cluster 2016-05-03 13:28:39.000000000 +0200 @@ -156,7 +156,7 @@ return $OCF_NOT_RUNNING ;; *) - ocf_log err "Unexpected return code from '$RMQ_CTL cluster status' exit code: $rc" + ocf_log err "Unexpected return code from '$RMQ_CTL cluster_status' exit code: $rc" rmq_delete_nodename return $OCF_ERR_GENERIC ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.7+git.1461679689.18a78f5/ldirectord/ldirectord.in new/resource-agents-3.9.7+git.1461938976.cb7c36a/ldirectord/ldirectord.in --- old/resource-agents-3.9.7+git.1461679689.18a78f5/ldirectord/ldirectord.in 2016-04-26 17:24:19.000000000 +0200 +++ new/resource-agents-3.9.7+git.1461938976.cb7c36a/ldirectord/ldirectord.in 2016-05-03 13:28:39.000000000 +0200 @@ -2718,6 +2718,18 @@ my $real = $$v{real}; my $virtual_id = get_virtual_id_str($v); my $checkinterval = $$v{checkinterval} || $CHECKINTERVAL; + + # delete any entries in EMAILSTATUS that don't belong to this child + my %myservices = (); + foreach my $r (@$real) { + my $virtual_str = &get_virtual($v); + my $id = $r->{server} . ":" . $r->{port} . " ($virtual_str)"; + $myservices{$id} = 1; + } + foreach my $id (keys %EMAILSTATUS) { + delete $EMAILSTATUS{$id} unless defined $myservices{$id}; + } + $0 = "ldirectord $virtual_id"; while (1) { foreach my $r (@$real) {