NovaEvacuate: Support the new split-out IHA fence agents with backwards compatibility
Change-Id: Ib43294fa1fe3e814d041167aabbfe46140032e24
This commit is contained in:
parent
7d61c3b0b2
commit
d46f78fda4
|
@ -202,10 +202,15 @@ handle_evacuations() {
|
|||
esac
|
||||
|
||||
if [ $need_evacuate = 1 ]; then
|
||||
found=0
|
||||
ocf_log notice "Initiating evacuation of $node"
|
||||
fence_agent="fence_compute"
|
||||
|
||||
fence_compute ${fence_options} -o status -n ${node}
|
||||
if have_binary fence_evacuate
|
||||
then
|
||||
fence_agent="fence_evacuate"
|
||||
fi
|
||||
|
||||
ocf_log notice "Initiating evacuation of $node with $fence_agent"
|
||||
$fence_agent ${fence_options} -o status -n ${node}
|
||||
if [ $? = 1 ]; then
|
||||
ocf_log info "Nova does not know about ${node}"
|
||||
# Dont mark as no because perhaps nova is unavailable right now
|
||||
|
@ -217,7 +222,7 @@ handle_evacuations() {
|
|||
return $OCF_SUCCESS
|
||||
fi
|
||||
|
||||
fence_compute ${fence_options} -o off -n $node
|
||||
$fence_agent ${fence_options} -o off -n $node
|
||||
rc=$?
|
||||
|
||||
if [ $rc = 0 ]; then
|
||||
|
@ -252,7 +257,9 @@ evacuate_validate() {
|
|||
rc=$OCF_SUCCESS
|
||||
fence_options=""
|
||||
|
||||
if ! have_binary fence_evacuate
|
||||
check_binary fence_compute
|
||||
fi
|
||||
|
||||
# Is the state directory writable?
|
||||
state_dir=$(dirname $statefile)
|
||||
|
|
Loading…
Reference in New Issue