38 lines
1.1 KiB
Diff
38 lines
1.1 KiB
Diff
From 143864c694fb3f44a28b805a17ba7a2f6bf9931f Mon Sep 17 00:00:00 2001
|
|
From: Vincent Untz <vuntz@suse.com>
|
|
Date: Sun, 07 Feb 2016 10:30:00 +0100
|
|
Subject: [PATCH] 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
|
|
---
|
|
|
|
diff --git a/heartbeat/NovaEvacuate b/heartbeat/NovaEvacuate
|
|
index 319a747..f764bde 100644
|
|
--- a/heartbeat/NovaEvacuate
|
|
+++ b/heartbeat/NovaEvacuate
|
|
@@ -1,4 +1,4 @@
|
|
-#!/bin/sh
|
|
+#!/bin/bash
|
|
#
|
|
#
|
|
# NovaCompute agent manages compute daemons.
|
|
@@ -220,7 +220,8 @@
|
|
fi
|
|
|
|
handle_evacuations $(
|
|
- attrd_updater -n evacuate -A |
|
|
+ attrd_updater -n evacuate -A \
|
|
+ 2> >(grep -v "attribute does not exist" 1>&2) |
|
|
sed 's/ value=""/ value="no"/' |
|
|
tr '="' ' ' |
|
|
awk '{print $4" "$6}'
|