Browse Source

NovaEvacuate: Avoid initial useless message on stderr

When no evacuation has been done yet, we're spamming syslog with:

  Could not query value of evacuate: attribute does not exist

So let's just filter this out, since it's known to be expected on
initial setup.

As this requires a bashism, also move the script to use bash.

Change-Id: I3351919febc0ef0101e4a08ce6eb412e3c7cfc76
Vincent Untz 3 years ago
parent
commit
143864c694
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      ocf/NovaEvacuate

+ 3
- 2
ocf/NovaEvacuate View File

@@ -1,4 +1,4 @@
1
-#!/bin/sh
1
+#!/bin/bash
2 2
 #
3 3
 #
4 4
 # NovaCompute agent manages compute daemons.
@@ -220,7 +220,8 @@ evacuate_monitor() {
220 220
     fi
221 221
 
222 222
     handle_evacuations $(
223
-        attrd_updater -n evacuate -A |
223
+        attrd_updater -n evacuate -A \
224
+            2> >(grep -v "attribute does not exist" 1>&2) |
224 225
             sed 's/ value=""/ value="no"/' |
225 226
             tr '="' '  ' |
226 227
             awk '{print $4" "$6}'

Loading…
Cancel
Save