NovaEvacuate should use the existing status operation

No need to duplicate the same logic, plus it is slower than looking up
one specific host

Change-Id: I3ae432a8f42da80f8f235f689d5162d87ad2df5f
This commit is contained in:
Andrew Beekhof 2015-12-08 13:58:02 +11:00
parent 3d724a29a9
commit 4f2c49d7ba

View File

@ -205,15 +205,8 @@ handle_evacuations() {
found=0 found=0
ocf_log notice "Initiating evacuation of $node" ocf_log notice "Initiating evacuation of $node"
for known in $(fence_compute ${fence_options} -o list | \ fence_compute ${fence_options} -o status -n ${node}
tr -d ','); do if [ $? = 0 ]; then
if [ ${known} = ${node} ]; then
found=1
break
fi
done
if [ $found = 0 ]; then
ocf_log info "Nova does not know about ${node}" ocf_log info "Nova does not know about ${node}"
# Dont mark as no because perhaps nova is unavailable right now # Dont mark as no because perhaps nova is unavailable right now
continue continue