Browse Source

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
changes/16/254516/2
Andrew Beekhof 3 years ago
parent
commit
4f2c49d7ba
1 changed files with 2 additions and 9 deletions
  1. 2
    9
      ocf/NovaEvacuate

+ 2
- 9
ocf/NovaEvacuate View File

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

Loading…
Cancel
Save