From 4efcdb3d4de8306178aeb6d420a8e86e5996155c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Feb 16 2016 10:52:56 +0000 Subject: import resource-agents-3.9.5-54.el7_2.6 --- diff --git a/SOURCES/bz1293355-novacompute-novaevacuate-fix-evacute-typo.patch b/SOURCES/bz1293355-novacompute-novaevacuate-fix-evacute-typo.patch new file mode 100644 index 0000000..7a8feb7 --- /dev/null +++ b/SOURCES/bz1293355-novacompute-novaevacuate-fix-evacute-typo.patch @@ -0,0 +1,47 @@ +diff -uNr a/heartbeat/NovaCompute b/heartbeat/NovaCompute +--- a/heartbeat/NovaCompute 2015-11-17 10:13:13.403119585 +0100 ++++ b/heartbeat/NovaCompute 2015-11-17 10:20:49.632620122 +0100 +@@ -159,7 +159,7 @@ + return $OCF_SUCCESS + fi + +- state=$(attrd_updater -p -n evacute -N ${NOVA_HOST} | sed -e 's/.*value=//' | tr -d '"' ) ++ state=$(attrd_updater -p -n evacuate -N ${NOVA_HOST} | sed -e 's/.*value=//' | tr -d '"' ) + if [ "x$state" = x ]; then + : never been fenced + +@@ -171,7 +171,7 @@ + else + ocf_log info "Waiting for pending evacuations from ${NOVA_HOST}" + while [ "x$state" != "xno" ]; do +- state=$(attrd_updater -p -n evacute -N ${NOVA_HOST} | sed -e 's/.*value=//' | tr -d '"' ) ++ state=$(attrd_updater -p -n evacuate -N ${NOVA_HOST} | sed -e 's/.*value=//' | tr -d '"' ) + sleep 5 + done + +diff -uNr a/heartbeat/NovaEvacuate b/heartbeat/NovaEvacuate +--- a/heartbeat/NovaEvacuate 2015-11-17 10:13:13.403119585 +0100 ++++ b/heartbeat/NovaEvacuate 2015-11-17 10:38:14.424846295 +0100 +@@ -141,7 +141,7 @@ + } + + update_evacuation() { +- attrd_updater -p -n evacute -Q -N ${1} -v ${2} ++ attrd_updater -p -n evacuate -Q -N ${1} -v ${2} + arc=$? + if [ ${arc} != 0 ]; then + ocf_log warn "Can not set evacuation state of ${1} to ${2}: ${arc}" +@@ -219,7 +219,12 @@ + return $OCF_NOT_RUNNING + fi + +- handle_evacuations $(attrd_updater -n evacute -A | tr '="' ' ' | awk '{print $4" "$6}') ++ handle_evacuations $( ++ attrd_updater -n evacuate -A | ++ sed 's/ value=""/ value="no"/' | ++ tr '="' ' ' | ++ awk '{print $4" "$6}' ++ ) + return $OCF_SUCCESS + } + diff --git a/SOURCES/bz1304019-novaevacuate-invoke-off-action.patch b/SOURCES/bz1304019-novaevacuate-invoke-off-action.patch new file mode 100644 index 0000000..99699bc --- /dev/null +++ b/SOURCES/bz1304019-novaevacuate-invoke-off-action.patch @@ -0,0 +1,31 @@ +From 5e9310bbbcd5086ea9a3edf85d523c4c2a57f1c3 Mon Sep 17 00:00:00 2001 +From: Andrew Beekhof +Date: Tue, 8 Dec 2015 13:54:12 +1100 +Subject: [PATCH] NovaEvacuate should invoke fence_compute with action 'off' + +Conceptually we are resurrecting in one direction only (off) and not +bringing it back to the current host afterwards (on) + +Also it will overwrite the attrd variable too soon. + +Change-Id: I9694945ca7eedae4f5cb6758fe1e8ce7f72ae808 +--- + ocf/NovaEvacuate | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/heartbeat/NovaEvacuate b/heartbeat/NovaEvacuate +index a17a159..0e22d7e 100644 +--- a/heartbeat/NovaEvacuate ++++ b/heartbeat/NovaEvacuate +@@ -198,7 +198,7 @@ handle_evacuations() { + return $OCF_SUCCESS + fi + +- fence_compute ${fence_options} -o reboot -n $node ++ fence_compute ${fence_options} -o off -n $node + rc=$? + + if [ $rc = 0 ]; then +-- +1.9.1 + diff --git a/SOURCES/bz1304370-nfsserver-fix-systemd-status-detection.patch b/SOURCES/bz1304370-nfsserver-fix-systemd-status-detection.patch new file mode 100644 index 0000000..7e2d3b9 --- /dev/null +++ b/SOURCES/bz1304370-nfsserver-fix-systemd-status-detection.patch @@ -0,0 +1,474 @@ +diff -uNr a/heartbeat/nfsserver b/heartbeat/nfsserver +--- a/heartbeat/nfsserver 2016-02-05 09:04:19.350003826 +0100 ++++ b/heartbeat/nfsserver 2016-02-05 09:04:58.463395839 +0100 +@@ -208,9 +208,9 @@ + + + +- +- +- ++ ++ ++ + + + +@@ -327,11 +327,12 @@ + nfs_exec() + { + local cmd=$1 ++ local svc=$2 + set_exec_mode + + case $EXEC_MODE in + 1) ${OCF_RESKEY_nfs_init_script} $cmd;; +- 2) systemctl $cmd nfs-server.service ;; ++ 2) systemctl $cmd ${svc}.service ;; + esac + } + +@@ -353,21 +354,117 @@ + + nfsserver_monitor () + { ++ # Skip trying to start processes once before failing ++ # when run from nfsserver_start () ++ if [ "$1" == "fromstart" ]; then ++ ocf_log info "fromstart" ++ fromstart=1 ++ else ++ tries=1 ++ fi ++ ++ # systemd ++ if [ "$EXEC_MODE" -eq "2" ]; then ++ ocf_log info "Status: rpcbind" ++ rpcinfo &> /dev/null ++ rc=$? ++ if [ "$rc" -ne "0" ]; then ++ if [ ! "$fromstart" ] && [ "$tries" -gt "0" ]; then ++ nfsserver_start frommonitor ++ rc=$? ++ let tries=$tries-1 ++ fi ++ if [ "$rc" -ne "0" ]; then ++ ocf_exit_reason "rpcbind is not running" ++ return $OCF_NOT_RUNNING ++ fi ++ fi ++ ++ ocf_log info "Status: nfs-mountd" ++ rpcinfo -t localhost 100005 &> /dev/null ++ rc=$? ++ if [ "$rc" -ne "0" ]; then ++ if [ ! "$fromstart" ] && [ "$tries" -gt "0" ]; then ++ nfsserver_start frommonitor ++ rc=$? ++ let tries=$tries-1 ++ fi ++ if [ "$rc" -ne "0" ]; then ++ ocf_exit_reason "nfs-mountd is not running" ++ return $OCF_NOT_RUNNING ++ fi ++ fi ++ ++ ocf_log info "Status: nfs-idmapd" ++ fn=`mktemp` ++ nfs_exec status nfs-idmapd > $fn 2>&1 ++ rc=$? ++ ocf_log debug "$(cat $fn)" ++ rm -f $fn ++ if [ "$rc" -ne "0" ]; then ++ if [ ! "$fromstart" ] && [ "$tries" -gt "0" ]; then ++ nfsserver_start frommonitor ++ rc=$? ++ ocf_log info "Tried to start services: rc: $rc" ++ let tries=$tries-1 ++ fi ++ if [ "$rc" -ne "0" ]; then ++ ocf_exit_reason "nfs-idmapd is not running" ++ return $OCF_NOT_RUNNING ++ fi ++ fi ++ ++ ocf_log info "Status: rpc-statd" ++ rpcinfo -t localhost 100024 &> /dev/null ++ rc=$? ++ if [ "$rc" -ne "0" ]; then ++ if [ ! "$fromstart" ] && [ "$tries" -gt "0" ]; then ++ nfsserver_start frommonitor ++ rc=$? ++ let tries=$tries-1 ++ fi ++ if [ "$rc" -ne "0" ]; then ++ ocf_exit_reason "rpc-statd is not running" ++ return $OCF_NOT_RUNNING ++ fi ++ fi ++ fi ++ + fn=`mktemp` +- nfs_exec status > $fn 2>&1 ++ nfs_exec status nfs-server > $fn 2>&1 + rc=$? + ocf_log debug "$(cat $fn)" + rm -f $fn + +- #Adapte LSB status code to OCF return code ++ tfn="/proc/fs/nfsd/threads" ++ if [ ! -f "$tfn" ] || [ "$(cat $tfn)" -le "0" ]; then ++ if [ ! "$fromstart" ] && [ "$tries" -gt "0" ]; then ++ nfsserver_start frommonitor ++ rc=$? ++ let tries=$tries-1 ++ fi ++ if [ "$rc" -ne "0" ]; then ++ ocf_exit_reason "NFS server not running: /proc/fs/nfsd/threads" ++ return $OCF_NOT_RUNNING ++ fi ++ fi ++ ++ #Adapt LSB status code to OCF return code + if [ $rc -eq 0 ]; then + # don't report success if nfs servers are up + # without locking daemons. + v3locking_exec "status" + rc=$? + if [ $rc -ne 0 ]; then +- ocf_exit_reason "NFS server is up, but the locking daemons are down" +- rc=$OCF_ERR_GENERIC ++ if [ ! "$fromstart" ] && [ $tries -gt "0" ]; then ++ nfsserver_start frommonitor ++ rc=$? ++ let tries=$tries-1 ++ fi ++ if [ "$rc" -ne "0" ]; then ++ ocf_exit_reason "NFS server is up, but the locking daemons are down" ++ rc=$OCF_ERR_GENERIC ++ fi + fi + return $rc + elif [ $rc -eq 3 ]; then +@@ -391,12 +488,7 @@ + # only write to the tmp /etc/sysconfig/nfs if sysconfig exists. + # otherwise this distro does not support setting these options. + if [ -d "/etc/sysconfig" ]; then +- # replace if the value exists, append otherwise +- if grep "^\s*${key}=" $file ; then +- sed -i "s/\s*${key}=.*$/${key}=\"${value}\"/" $file +- else +- echo "${key}=\"${value}\"" >> $file +- fi ++ echo "${key}=\"${value}\"" >> $file + elif [ "$requires_sysconfig" = "true" ]; then + ocf_log warn "/etc/sysconfig/nfs not found, unable to set port and nfsd args." + fi +@@ -409,11 +501,6 @@ + local tmpconfig=$(mktemp ${HA_RSCTMP}/nfsserver-tmp-XXXXX) + local statd_args + +- if [ -f "$NFS_SYSCONFIG" ]; then +- ## Take the $NFS_SYSCONFIG file as our skeleton +- cp $NFS_SYSCONFIG $tmpconfig +- fi +- + # nfsd args + set_arg "RPCNFSDARGS" "$OCF_RESKEY_nfsd_args" "$tmpconfig" "true" + +@@ -444,20 +531,14 @@ + + # override local nfs config. preserve previous local config though. + if [ -s $tmpconfig ]; then +- cat $NFS_SYSCONFIG | grep -q -e "$NFS_SYSCONFIG_AUTOGEN_TAG" > /dev/null 2>&1 ++ cat $NFS_SYSCONFIG | grep -e "$NFS_SYSCONFIG_AUTOGEN_TAG" + if [ $? -ne 0 ]; then + # backup local nfs config if it doesn't have our HA autogen tag in it. + mv -f $NFS_SYSCONFIG $NFS_SYSCONFIG_LOCAL_BACKUP + fi +- +- cat $tmpconfig | grep -q -e "$NFS_SYSCONFIG_AUTOGEN_TAG" > /dev/null 2>&1 +- if [ $? -ne 0 ]; then +- echo "# $NFS_SYSCONFIG_AUTOGEN_TAG" > $NFS_SYSCONFIG +- echo "# local config backup stored here, '$NFS_SYSCONFIG_LOCAL_BACKUP'" >> $NFS_SYSCONFIG +- cat $tmpconfig >> $NFS_SYSCONFIG +- else +- cat $tmpconfig > $NFS_SYSCONFIG +- fi ++ echo "# $NFS_SYSCONFIG_AUTOGEN_TAG" > $NFS_SYSCONFIG ++ echo "# local config backup stored here, '$NFS_SYSCONFIG_LOCAL_BACKUP'" >> $NFS_SYSCONFIG ++ cat $tmpconfig >> $NFS_SYSCONFIG + fi + rm -f $tmpconfig + } +@@ -476,14 +557,13 @@ + [ -d "$fp/$STATD_DIR/sm" ] || mkdir -p "$fp/$STATD_DIR/sm" + [ -d "$fp/$STATD_DIR/sm.ha" ] || mkdir -p "$fp/$STATD_DIR/sm.ha" + [ -d "$fp/$STATD_DIR/sm.bak" ] || mkdir -p "$fp/$STATD_DIR/sm.bak" +- [ -n "`id -u rpcuser 2>/dev/null`" -a "`id -g rpcuser 2>/dev/null`" ] && +- chown -R rpcuser.rpcuser "$fp/$STATD_DIR" ++ [ -n "`id -u rpcuser`" -a "`id -g rpcuser`" ] && chown -R rpcuser.rpcuser "$fp/$STATD_DIR" + + [ -f "$fp/etab" ] || touch "$fp/etab" + [ -f "$fp/xtab" ] || touch "$fp/xtab" + [ -f "$fp/rmtab" ] || touch "$fp/rmtab" + +- dd if=/dev/urandom of=$fp/$STATD_DIR/state bs=1 count=4 >/dev/null 2>&1 ++ dd if=/dev/urandom of=$fp/$STATD_DIR/state bs=1 count=4 &> /dev/null + [ -n "`id -u rpcuser`" -a "`id -g rpcuser`" ] && chown rpcuser.rpcuser "$fp/$STATD_DIR/state" + [ $SELINUX_ENABLED -eq 0 ] && chcon -R "$SELINUX_LABEL" "$fp" + } +@@ -563,15 +643,15 @@ + + terminate() + { +- local pids +- local i=0 ++ declare pids ++ declare i=0 + + while : ; do + pids=$(binary_status $1) + [ -z "$pids" ] && return 0 + kill $pids + sleep 1 +- i=$((i + 1)) ++ ((i++)) + [ $i -gt 3 ] && return 1 + done + } +@@ -579,22 +659,22 @@ + + killkill() + { +- local pids +- local i=0 ++ declare pids ++ declare i=0 + + while : ; do + pids=$(binary_status $1) + [ -z "$pids" ] && return 0 + kill -9 $pids + sleep 1 +- i=$((i + 1)) ++ ((i++)) + [ $i -gt 3 ] && return 1 + done + } + + stop_process() + { +- local process=$1 ++ declare process=$1 + + ocf_log info "Stopping $process" + if terminate $process; then +@@ -665,9 +745,14 @@ + + nfsserver_start () + { ++ # Skip monitor check when run from nfsserver_monitor () ++ if [ "$1" == "frommonitor" ]; then ++ frommonitor=1 ++ fi ++ + local rc; + +- if nfsserver_monitor; then ++ if [ ! "$frommonitor" ] && nfsserver_monitor fromstart; then + ocf_log debug "NFS server is already started" + return $OCF_SUCCESS + fi +@@ -693,11 +778,32 @@ + modprobe nfsd + fi + ++ # systemd ++ if [ "$EXEC_MODE" -eq "2" ]; then ++ nfs_exec start rpcbind ++ local i=10 ++ while [ "$i" -gt 0 ]; do ++ ocf_log info "Start: rpcbind i: $i" ++ rpcinfo &> /dev/null ++ rc=$? ++ if [ "$rc" -eq "0" ]; then ++ break; ++ fi ++ sleep 1 ++ let i=$i-1 ++ done ++ if [ "$i" -eq 0 ]; then ++ ocf_exit_reason "Failed to start rpcbind" ++ return $OCF_ERR_GENERIC ++ fi ++ fi ++ + # check to see if we need to start rpc.statd + v3locking_exec "status" + if [ $? -ne $OCF_SUCCESS ]; then + v3locking_exec "start" + rc=$? ++ ocf_log info "Start: v3locking: $rc" + if [ $rc -ne 0 ]; then + ocf_exit_reason "Failed to start NFS server locking daemons" + return $rc +@@ -706,8 +812,65 @@ + ocf_log info "rpc.statd already up" + fi + ++ # systemd ++ if [ "$EXEC_MODE" -eq "2" ]; then ++ nfs_exec start nfs-mountd ++ local i=10 ++ while [ "$i" -gt 0 ]; do ++ ocf_log info "Start: nfs-mountd i: $i" ++ rpcinfo -t localhost 100005 &> /dev/null ++ rc=$? ++ if [ "$rc" -eq "0" ]; then ++ break; ++ fi ++ sleep 1 ++ let i=$i-1 ++ done ++ if [ "$i" -eq 0 ]; then ++ ocf_exit_reason "Failed to start nfs-mountd" ++ return $OCF_ERR_GENERIC ++ fi ++ ++ nfs_exec start nfs-idmapd ++ local i=10 ++ while [ "$i" -gt 0 ]; do ++ ocf_log info "Start: nfs-idmapd i: $i" ++ fn=`mktemp` ++ nfs_exec status nfs-idmapd > $fn 2>&1 ++ rc=$? ++ ocf_log debug "$(cat $fn)" ++ rm -f $fn ++ if [ "$rc" -eq "0" ]; then ++ break; ++ fi ++ sleep 1 ++ let i=$i-1 ++ done ++ if [ "$i" -eq 0 ]; then ++ ocf_exit_reason "Failed to start nfs-idmapd" ++ return $OCF_ERR_GENERIC ++ fi ++ ++ nfs_exec start rpc-statd ++ local i=10 ++ while [ "$i" -gt 0 ]; do ++ ocf_log info "Start: rpc-statd i: $i" ++ rpcinfo -t localhost 100024 &> /dev/null ++ rc=$? ++ if [ "$rc" -eq "0" ]; then ++ break; ++ fi ++ sleep 1 ++ let i=$i-1 ++ done ++ if [ "$i" -eq 0 ]; then ++ ocf_exit_reason "Failed to start rpc-statd" ++ return $OCF_ERR_GENERIC ++ fi ++ fi ++ + fn=`mktemp` +- nfs_exec start > $fn 2>&1 ++ nfs_exec start nfs-server > $fn 2>&1 + rc=$? + ocf_log debug "$(cat $fn)" + rm -f $fn +@@ -717,6 +880,12 @@ + return $rc + fi + ++ tfn="/proc/fs/nfsd/threads" ++ if [ ! -f "$tfn" ] || [ "$(cat $tfn)" -le "0" ]; then ++ ocf_exit_reason "Failed to start NFS server: /proc/fs/nfsd/threads" ++ return $OCF_ERR_GENERIC ++ fi ++ + notify_locks + + ocf_log info "NFS server started" +@@ -733,24 +902,71 @@ + cp -rpf $STATD_PATH/sm $STATD_PATH/sm.bak /var/lib/nfs/state $STATD_PATH/sm.ha > /dev/null 2>&1 + + fn=`mktemp` +- nfs_exec stop > $fn 2>&1 ++ nfs_exec stop nfs-server > $fn 2>&1 + rc=$? + ocf_log debug "$(cat $fn)" + rm -f $fn + ++ if [ $rc -ne 0 ]; then ++ ocf_exit_reason "Failed to stop NFS server" ++ return $rc ++ fi ++ ++ # systemd ++ if [ "$EXEC_MODE" -eq "2" ]; then ++ ocf_log info "Stop: threads" ++ tfn="/proc/fs/nfsd/threads" ++ if [ -f "$tfn" ] && [ "$(cat $tfn)" -gt "0" ]; then ++ ocf_exit_reason "NFS server failed to stop: /proc/fs/nfsd/threads" ++ return $OCF_ERR_GENERIC ++ fi ++ ++ nfs_exec stop rpc-statd &> /dev/null ++ ocf_log info "Stop: rpc-statd" ++ rpcinfo -t localhost 100024 &> /dev/null ++ rc=$? ++ if [ "$rc" -eq "0" ]; then ++ ocf_exit_reason "Failed to stop rpc-statd" ++ return $OCF_ERR_GENERIC ++ fi ++ ++ nfs_exec stop nfs-idmapd &> /dev/null ++ ocf_log info "Stop: nfs-idmapd" ++ fn=`mktemp` ++ nfs_exec status nfs-idmapd > $fn 2>&1 ++ rc=$? ++ ocf_log debug "$(cat $fn)" ++ rm -f $fn ++ if [ "$rc" -eq "0" ]; then ++ ocf_exit_reason "Failed to stop nfs-idmapd" ++ return $OCF_ERR_GENERIC ++ fi ++ ++ nfs_exec stop nfs-mountd &> /dev/null ++ ocf_log info "Stop: nfs-mountd" ++ rpcinfo -t localhost 100005 &> /dev/null ++ rc=$? ++ if [ "$rc" -eq "0" ]; then ++ ocf_exit_reason "Failed to stop nfs-mountd" ++ return $OCF_ERR_GENERIC ++ fi ++ fi ++ + v3locking_exec "stop" + if [ $? -ne 0 ]; then + ocf_exit_reason "Failed to stop NFS locking daemons" + rc=$OCF_ERR_GENERIC + fi + +- if [ $rc -eq 0 ]; then +- unbind_tree +- ocf_log info "NFS server stopped" +- else +- ocf_exit_reason "Failed to stop NFS server" ++ # systemd ++ if [ "$EXEC_MODE" -eq "2" ]; then ++ nfs_exec stop rpcbind &> /dev/null ++ ocf_log info "Stop: rpcbind" + fi +- return $rc ++ ++ unbind_tree ++ ocf_log info "NFS server stopped" ++ return 0 + } + + nfsserver_validate () diff --git a/SOURCES/bz1304711-galera-custom-host-port.patch b/SOURCES/bz1304711-galera-custom-host-port.patch new file mode 100644 index 0000000..fc3b901 --- /dev/null +++ b/SOURCES/bz1304711-galera-custom-host-port.patch @@ -0,0 +1,33 @@ +From cbccff5ed9b1fc5641063f05ad531f897d366fa4 Mon Sep 17 00:00:00 2001 +From: Mike Bayer +Date: Tue, 15 Sep 2015 14:54:05 -0400 +Subject: [PATCH] galera: add support for MYSQL_HOST and MYSQL_PORT from + clustercheck + +--- + heartbeat/galera | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/heartbeat/galera b/heartbeat/galera +index 920507b..1a1a4ce 100755 +--- a/heartbeat/galera ++++ b/heartbeat/galera +@@ -704,6 +704,18 @@ if [ -n "${OCF_RESKEY_check_passwd}" ]; then + 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 --git a/SOURCES/bz1304811-replace-novacompute-with-nova-compute-wait.patch b/SOURCES/bz1304811-replace-novacompute-with-nova-compute-wait.patch new file mode 100644 index 0000000..55c2676 --- /dev/null +++ b/SOURCES/bz1304811-replace-novacompute-with-nova-compute-wait.patch @@ -0,0 +1,702 @@ +diff -uNr a/doc/man/Makefile.am b/doc/man/Makefile.am +--- a/doc/man/Makefile.am 2016-01-13 09:03:39.443177797 +0100 ++++ b/doc/man/Makefile.am 2016-01-13 09:12:15.932795618 +0100 +@@ -73,7 +73,7 @@ + ocf_heartbeat_MailTo.7 \ + ocf_heartbeat_ManageRAID.7 \ + ocf_heartbeat_ManageVE.7 \ +- ocf_heartbeat_NovaCompute.7 \ ++ ocf_heartbeat_nova-compute-wait.7 \ + ocf_heartbeat_NovaEvacuate.7 \ + ocf_heartbeat_Pure-FTPd.7 \ + ocf_heartbeat_Raid1.7 \ +diff -uNr a/heartbeat/Makefile.am b/heartbeat/Makefile.am +--- a/heartbeat/Makefile.am 2016-01-13 09:03:39.443177797 +0100 ++++ b/heartbeat/Makefile.am 2016-01-13 09:11:11.085604509 +0100 +@@ -52,7 +52,7 @@ + IPv6addr_LDADD = -lplumb $(LIBNETLIBS) + send_ua_LDADD = $(LIBNETLIBS) + +-osp_SCRIPTS = NovaCompute \ ++osp_SCRIPTS = nova-compute-wait \ + NovaEvacuate + + ocf_SCRIPTS = ClusterMon \ +diff -uNr a/heartbeat/NovaCompute b/heartbeat/NovaCompute +--- a/heartbeat/NovaCompute 2016-01-13 09:03:39.439177858 +0100 ++++ b/heartbeat/NovaCompute 1970-01-01 01:00:00.000000000 +0100 +@@ -1,366 +0,0 @@ +-#!/bin/sh +-# +-# +-# NovaCompute agent manages compute daemons. +-# +-# Copyright (c) 2015 +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of version 2 of the GNU General Public License as +-# published by the Free Software Foundation. +-# +-# This program is distributed in the hope that it would be useful, but +-# WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +-# +-# Further, this software is distributed without any warranty that it is +-# free of the rightful claim of any third person regarding infringement +-# or the like. Any license provided herein, whether implied or +-# otherwise, applies only to this software file. Patent licenses, if +-# any, provided herein do not apply to combinations of this program with +-# other software, or any other product whatsoever. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write the Free Software Foundation, +-# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +-# +- +-####################################################################### +-# Initialization: +- +-### +-: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat} +-. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs +-### +- +-: ${__OCF_ACTION=$1} +- +-####################################################################### +- +-meta_data() { +- cat < +- +- +-1.0 +- +- +-OpenStack Nova Compute Server. +- +-OpenStack Nova Compute Server +- +- +- +- +- +-Authorization URL for connecting to keystone in admin context +- +-Authorization URL +- +- +- +- +- +-Username for connecting to keystone in admin context +- +-Username +- +- +- +- +-Password for connecting to keystone in admin context +- +-Password +- +- +- +- +- +-Tenant name for connecting to keystone in admin context. +-Note that with Keystone V3 tenant names are only unique within a domain. +- +-Tenant name +- +- +- +- +- +-DNS domain in which hosts live, useful when the cluster uses short names and nova uses FQDN +- +-DNS domain +- +- +- +- +- +-Nova API location (internal, public or admin URL) +- +-Nova API location (internal, public or admin URL) +- +- +- +- +- +-Disable shared storage recovery for instances. Use at your own risk! +- +-Disable shared storage recovery for instances +- +- +- +- +- +-How long to wait for nova to finish evacuating instances elsewhere +-before starting nova-compute. Only used when the agent detects +-evacuations might be in progress. +- +-You may need to increase the start timeout when increasing this value. +- +-Delay to allow evacuations time to complete +- +- +- +- +- +- +- +- +- +- +- +- +- +-END +-} +- +-####################################################################### +- +-# don't exit on TERM, to test that lrmd makes sure that we do exit +-trap sigterm_handler TERM +-sigterm_handler() { +- ocf_log info "They use TERM to bring us down. No such luck." +- return +-} +- +-nova_usage() { +- cat </dev/null) +- if [ $? = 1 ]; then +- if [ "x${OCF_RESKEY_domain}" != x ]; then +- NOVA_HOST=$(uname -n | awk -F. '{print $1}') +- else +- NOVA_HOST=$(uname -n) +- fi +- fi +- +- # We only need to check a configured value, calculated ones are fine +- openstack-config --get /etc/nova/nova.conf DEFAULT host 2>/dev/null +- if [ $? = 0 ]; then +- if [ "x${OCF_RESKEY_domain}" != x ]; then +- short_host=$(uname -n | awk -F. '{print $1}') +- if [ "x$NOVA_HOST" != "x${short_host}" ]; then +- ocf_exit_reason "Invalid Nova host name, must be ${short_host} in order for instance recovery to function" +- rc=$OCF_ERR_CONFIGURED +- fi +- +- elif [ "x$NOVA_HOST" != "x$(uname -n)" ]; then +- ocf_exit_reason "Invalid Nova host name, must be $(uname -n) in order for instance recovery to function" +- rc=$OCF_ERR_CONFIGURED +- fi +- fi +- +- if [ $rc != $OCF_SUCCESS ]; then +- exit $rc +- fi +- return $rc +-} +- +-: ${OCF_RESKEY_evacuation_delay=120} +-case $__OCF_ACTION in +-meta-data) meta_data +- exit $OCF_SUCCESS +- ;; +-usage|help) nova_usage +- exit $OCF_SUCCESS +- ;; +-esac +- +-case $__OCF_ACTION in +-start) nova_validate; nova_start;; +-stop) nova_stop;; +-monitor) nova_validate; nova_monitor;; +-notify) nova_notify;; +-validate-all) exit $OCF_SUCCESS;; +-*) nova_usage +- exit $OCF_ERR_UNIMPLEMENTED +- ;; +-esac +-rc=$? +-ocf_log debug "${OCF_RESOURCE_INSTANCE} $__OCF_ACTION : $rc" +-exit $rc +diff -uNr a/heartbeat/nova-compute-wait b/heartbeat/nova-compute-wait +--- a/heartbeat/nova-compute-wait 1970-01-01 01:00:00.000000000 +0100 ++++ b/heartbeat/nova-compute-wait 2016-01-12 16:09:20.863425170 +0100 +@@ -0,0 +1,304 @@ ++#!/bin/sh ++# ++# ++# nova-compute-wait agent manages compute daemons. ++# ++# Copyright (c) 2015 ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of version 2 of the GNU General Public License as ++# published by the Free Software Foundation. ++# ++# This program is distributed in the hope that it would be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ++# ++# Further, this software is distributed without any warranty that it is ++# free of the rightful claim of any third person regarding infringement ++# or the like. Any license provided herein, whether implied or ++# otherwise, applies only to this software file. Patent licenses, if ++# any, provided herein do not apply to combinations of this program with ++# other software, or any other product whatsoever. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write the Free Software Foundation, ++# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. ++# ++ ++####################################################################### ++# Initialization: ++ ++### ++: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat} ++. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs ++### ++ ++: ${__OCF_ACTION=$1} ++ ++####################################################################### ++ ++meta_data() { ++ cat < ++ ++ ++1.0 ++ ++ ++OpenStack Nova Compute Server. ++ ++OpenStack Nova Compute Server ++ ++ ++ ++ ++ ++Authorization URL for connecting to keystone in admin context ++ ++Authorization URL ++ ++ ++ ++ ++ ++Username for connecting to keystone in admin context ++ ++Username ++ ++ ++ ++ ++Password for connecting to keystone in admin context ++ ++Password ++ ++ ++ ++ ++ ++Tenant name for connecting to keystone in admin context. ++Note that with Keystone V3 tenant names are only unique within a domain. ++ ++Tenant name ++ ++ ++ ++ ++ ++DNS domain in which hosts live, useful when the cluster uses short names and nova uses FQDN ++ ++DNS domain ++ ++ ++ ++ ++ ++Nova API location (internal, public or admin URL) ++ ++Nova API location (internal, public or admin URL) ++ ++ ++ ++ ++ ++Disable shared storage recovery for instances. Use at your own risk! ++ ++Disable shared storage recovery for instances ++ ++ ++ ++ ++ ++How long to wait for nova to finish evacuating instances elsewhere ++before starting nova-compute. Only used when the agent detects ++evacuations might be in progress. ++ ++You may need to increase the start timeout when increasing this value. ++ ++Delay to allow evacuations time to complete ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++END ++} ++ ++####################################################################### ++ ++# don't exit on TERM, to test that lrmd makes sure that we do exit ++trap sigterm_handler TERM ++sigterm_handler() { ++ ocf_log info "They use TERM to bring us down. No such luck." ++ return ++} ++ ++nova_usage() { ++ cat </dev/null) ++ if [ $? = 1 ]; then ++ if [ "x${OCF_RESKEY_domain}" != x ]; then ++ NOVA_HOST=$(uname -n | awk -F. '{print $1}') ++ else ++ NOVA_HOST=$(uname -n) ++ fi ++ fi ++ ++ # We only need to check a configured value, calculated ones are fine ++ openstack-config --get /etc/nova/nova.conf DEFAULT host 2>/dev/null ++ if [ $? = 0 ]; then ++ if [ "x${OCF_RESKEY_domain}" != x ]; then ++ short_host=$(uname -n | awk -F. '{print $1}') ++ if [ "x$NOVA_HOST" != "x${short_host}" ]; then ++ ocf_exit_reason "Invalid Nova host name, must be ${short_host} in order for instance recovery to function" ++ rc=$OCF_ERR_CONFIGURED ++ fi ++ ++ elif [ "x$NOVA_HOST" != "x$(uname -n)" ]; then ++ ocf_exit_reason "Invalid Nova host name, must be $(uname -n) in order for instance recovery to function" ++ rc=$OCF_ERR_CONFIGURED ++ fi ++ fi ++ ++ if [ $rc != $OCF_SUCCESS ]; then ++ exit $rc ++ fi ++ return $rc ++} ++ ++: ${OCF_RESKEY_evacuation_delay=120} ++case $__OCF_ACTION in ++meta-data) meta_data ++ exit $OCF_SUCCESS ++ ;; ++usage|help) nova_usage ++ exit $OCF_SUCCESS ++ ;; ++esac ++ ++case $__OCF_ACTION in ++start) nova_validate; nova_start;; ++stop) nova_stop;; ++monitor) nova_validate; nova_monitor;; ++notify) nova_notify;; ++validate-all) exit $OCF_SUCCESS;; ++*) nova_usage ++ exit $OCF_ERR_UNIMPLEMENTED ++ ;; ++esac ++rc=$? ++ocf_log debug "${OCF_RESOURCE_INSTANCE} $__OCF_ACTION : $rc" ++exit $rc diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec index 76e65d5..9d44a9e 100644 --- a/SPECS/resource-agents.spec +++ b/SPECS/resource-agents.spec @@ -32,7 +32,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 3.9.5 -Release: 54%{?dist}.1 +Release: 54%{?dist}.6 License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} @@ -126,6 +126,11 @@ Patch81: bz1168251-SAPHana-agents-update3.patch Patch82: bz1168251-SAPHana-agents_update4.patch Patch83: bz1251484-redis-client-passwd-support.patch Patch84: bz1283877-virtualdomain-may-remove-config-file.patch +Patch85: bz1293355-novacompute-novaevacuate-fix-evacute-typo.patch +Patch86: bz1304019-novaevacuate-invoke-off-action.patch +Patch87: bz1304370-nfsserver-fix-systemd-status-detection.patch +Patch88: bz1304711-galera-custom-host-port.patch +Patch89: bz1304811-replace-novacompute-with-nova-compute-wait.patch Obsoletes: heartbeat-resources <= %{version} Provides: heartbeat-resources = %{version} @@ -315,6 +320,11 @@ exit 1 %patch82 -p1 %patch83 -p1 %patch84 -p1 +%patch85 -p1 +%patch86 -p1 +%patch87 -p1 +%patch88 -p1 +%patch89 -p1 %build if [ ! -f configure ]; then @@ -328,7 +338,7 @@ chmod 755 heartbeat/docker chmod 755 heartbeat/rabbitmq-cluster chmod 755 heartbeat/redis chmod 755 heartbeat/iface-vlan -chmod 755 heartbeat/NovaCompute +chmod 755 heartbeat/nova-compute-wait chmod 755 heartbeat/NovaEvacuate chmod 755 heartbeat/SAPHana chmod 755 heartbeat/SAPHanaTopology @@ -567,6 +577,25 @@ ccs_update_schema > /dev/null 2>&1 ||: %endif %changelog +* Fri Feb 5 2016 Oyvind Albrigtsen - 3.9.5-54.6 +- nfsserver: fix systemd status detection +- Replace NovaCompute with nova-compute-wait which lets systemd + manage the nova-compute process + + Resolves: rhbz#1304370 + Resolves: rhbz#1304811 + +* Thu Feb 4 2016 Oyvind Albrigtsen - 3.9.5-54.4 +- NovaEvacuate: invoke off action +- galera: add custom host/port support + + Resolves: rhbz#1304019 + Resolves: rhbz#1304711 + +* Wed Jan 20 2016 Oyvind Albrigtsen - 3.9.5-54.3 +- NovaCompute/NovaEvacuate: Fix 'evacute' typo + Resolves: rhbz#1293355 + * Fri Nov 20 2015 Oyvind Albrigtsen - 3.9.5-54.1 - Fix VirtualDomain may remove config file Resolves: rhbz#1283877