summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Beekhof <andrew@beekhof.net>2015-12-08 13:58:02 +1100
committerAndrew Beekhof <andrew@beekhof.net>2016-06-28 12:02:50 +1000
commit4f2c49d7badc65aec51da6a4b75935f09c3b597d (patch)
tree1279644679b79481bfd668d595e8e17acfe05df9
parent3d724a29a93618bfdbe293a2323a90d8d66b4da0 (diff)
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
Notes
Notes (review): Code-Review+2: Adam Spiers <aspiers@suse.com> Workflow+1: Adam Spiers <aspiers@suse.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 28 Jun 2016 10:50:15 +0000 Reviewed-on: https://review.openstack.org/254516 Project: openstack/openstack-resource-agents Branch: refs/heads/master
-rw-r--r--ocf/NovaEvacuate11
1 files 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() {
205 found=0 205 found=0
206 ocf_log notice "Initiating evacuation of $node" 206 ocf_log notice "Initiating evacuation of $node"
207 207
208 for known in $(fence_compute ${fence_options} -o list | \ 208 fence_compute ${fence_options} -o status -n ${node}
209 tr -d ','); do 209 if [ $? = 0 ]; then
210 if [ ${known} = ${node} ]; then
211 found=1
212 break
213 fi
214 done
215
216 if [ $found = 0 ]; then
217 ocf_log info "Nova does not know about ${node}" 210 ocf_log info "Nova does not know about ${node}"
218 # Dont mark as no because perhaps nova is unavailable right now 211 # Dont mark as no because perhaps nova is unavailable right now
219 continue 212 continue