From 4f2c49d7badc65aec51da6a4b75935f09c3b597d Mon Sep 17 00:00:00 2001 From: Andrew Beekhof Date: Tue, 8 Dec 2015 13:58:02 +1100 Subject: [PATCH] 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 --- ocf/NovaEvacuate | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/ocf/NovaEvacuate b/ocf/NovaEvacuate index 90b059d..b199fa5 100644 --- a/ocf/NovaEvacuate +++ b/ocf/NovaEvacuate @@ -205,15 +205,8 @@ handle_evacuations() { found=0 ocf_log notice "Initiating evacuation of $node" - for known in $(fence_compute ${fence_options} -o list | \ - tr -d ','); do - if [ ${known} = ${node} ]; then - found=1 - break - fi - done - - if [ $found = 0 ]; then + fence_compute ${fence_options} -o status -n ${node} + if [ $? = 0 ]; then ocf_log info "Nova does not know about ${node}" # Dont mark as no because perhaps nova is unavailable right now continue