.. and while at it, format the error messages properly.
Signed-off-by: Petr Pudlak <[email protected]>
---
src/Ganeti/WConfd/Server.hs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/Ganeti/WConfd/Server.hs b/src/Ganeti/WConfd/Server.hs
index e7844d4..5b89737 100644
--- a/src/Ganeti/WConfd/Server.hs
+++ b/src/Ganeti/WConfd/Server.hs
@@ -47,12 +47,14 @@ import qualified Ganeti.Path as Path
import Ganeti.THH.RPC
import Ganeti.UDSServer
+import Ganeti.Errors (formatError)
import Ganeti.Runtime
import Ganeti.WConfd.ConfigState
import Ganeti.WConfd.ConfigWriter
import Ganeti.WConfd.Core
import Ganeti.WConfd.DeathDetection (cleanupLocksTask)
import Ganeti.WConfd.Monad
+import Ganeti.WConfd.ConfigVerify
handler :: DaemonHandle -> RpcServer WConfdMonadInt
handler ch = $( mkRpcM exportedFunctions )
@@ -82,9 +84,10 @@ prepMain _ _ = do
$ logInfo "No saved lock status; assuming all locks free"
dh <- toErrorBase
. withErrorT (strMsg . ("Initialization of the daemon failed" ++)
- . show) $ do
+ . formatError) $ do
ents <- getEnts
(cdata, cstat) <- loadConfigFromFile conf_file
+ verifyConfigErr cdata
lock <- if lock_file_present
then loadLockAllocation lock_file
else return emptyWaiting
--
2.0.0.526.g5318336