Merge branch 'devel-2.6'
Add Confd client to the Haskell code base
The client queries all the master candidates in parallel, until the minimumnumber of replies, defined in the constant file, is received.A timeout prevents the waiting from being of indefinite length.
The reply to be returned to the function that made the query is decided...
Add the parseReply function to the Confd utils
This function will be used by the Haskell Confd client to parse the repliesit receives from the server.
Unit test is included as well.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Rename the Confd utils parseMessage function to parseRequest
With the upcoming implementation of the Haskell Confd client, requests willno longer be the only kind of message to be parsed, therefore the parsingfunction for requests is being renamed to be more specific, and to better fit...
Make the parseRequest function more general
The parseRequest function of the Confd utils can be used to parse both request(in the server) and reply (in the client, soon to be implemented) signedmessages.This patch changes the signature of the function to allow this, and its name...
Move Confd getCurrentTime to Utils
The Confd server implementation has a getCurrentTime function.This commit moves it to the Utils.hs file of Confd, so that it will beavailable to be used by the future Confd client as well.
Signed-off-by: Michele Tartara <mtartara@google.com>...
confd: strip newlines before logging the request
The Python confd client sends newlines in messages (due to use ofDumpSignedJson/DumpJson), so that results in ugly debug output.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Add constants for two values which we re-evaluate
Two constants which we use as Integer are defined as Int inConstants.hs (coming from constants.py), so we do the conversion everytime we use it. Let's move them to top-level names, so that theconversion is only done once....
confd: reduce noise during normal config reload
During a normal configuration update, done via write to temp file andrename, this is what confd logs (slightly edited for clarity):
2012-12-14 01:05:53: ganeti-confd INFO Loaded new config, serial 218662012-12-14 01:06:18: ganeti-confd INFO File lost, trying to re-establish notifier...
Fix typo in comment
There was a typo in the docstring of the parseMessage function of theconfd server.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
View revisions
Also available in: Atom