On Thu, Jul 23, 2015 at 07:33:49PM +0200, 'Klaus Aehlig' via ganeti-devel wrote:
If something fails in a maintenance round, log the
message describing the error at INFO level, and the
fact that the daemon is backing off at DEBUG level,
not vice versa.
Signed-off-by: Klaus Aehlig <[email protected]>
---
src/Ganeti/MaintD/Server.hs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/Ganeti/MaintD/Server.hs b/src/Ganeti/MaintD/Server.hs
index b6feede..5a9f118 100644
--- a/src/Ganeti/MaintD/Server.hs
+++ b/src/Ganeti/MaintD/Server.hs
@@ -169,8 +169,9 @@ main _ _ httpConf = do
memstate <- newIORef emptyMemoryState
void . forkIO . forever $ do
res <- runResultT $ maintenance memstate
- logDebug $ "Maintenance round done, result is " ++ show res
+ (if isBad res then logInfo else logDebug)
+ $ "Maintenance round result is " ++ show res
when (isBad res) $ do
- logInfo "Backing off after a round with internal errors"
+ logDebug "Backing off after a round with internal errors"
threadDelaySeconds C.maintdDefaultRoundDelay
httpServe httpConf $ httpInterface memstate
--
2.4.3.573.g4eafbef
LGTM