Hs2Py constants: add 'Ganeti.Confd' types
Hs2Py constants: add 'Ganeti.Confd' types.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Update reference to proper module
Update reference to constant 'confdMagicFourcc' to fetch its valuefrom 'Ganeti.Constants' instead of the re-export from module'Ganeti.Confd.Types'.
Move confd request constants to 'Ganeti.ConstantUtils'
Let ReqNodeInstances work with node UUIDs
The "primaryNode" and "secondaryNode" fields of "Instance" entities in thecluster configuration where changed to use UUIDs instead of names. TheReqNodeInstances query inside Confd was not upgraded yet, and was thus...
Add debug logging to Confd
Knowing the replies actually sent helps tracking down problems much moreefficiently.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Merge branch 'stable-2.8' into stable-2.9
Add queryd daemon (split from confd)
queryd is added as a new daemon which handles configuration queries overLUXI. This functionality was removed from confd, which now only queriesover the network.
The queryd user is added to the master group such that it can access...
Extract ConfigReader from Confd/Server.hs
Confd's functionality to watch the Ganeti configuration file isextracted to the ConfigReader module. No functional changes areintroduced.
This extraction makes will enable us to split queryd from confd, asqueryd will have to use the same functionality....
Factor out the getInstances function
The getInstances function can be useful in general, but is defined insidethe InstStatus data collector. This commit takes it out and adds it toa proper (newly created) library.
Signed-off-by: Michele Tartara <mtartara@google.com>...
Index nodes by their UUID
No longer index nodes by their name but by their UUID in the clusterconfig. This change changes large parts of the code, as the followingadjustments were necessary: * Change the index key to UUID in the configuration and the ConfigWriter, including all methods....
Make HS ConfD client IPv6 compatible
The Haskell ConfD client was assuming internet addresses to be IPv4. Thispatch modifies the client so that it is able to automatically detect theprotocol it should use by analyzing the address it is told to connect to....
Make Confd client usable for testing
Allow the Confd client to be able to connect to an arbitrary serverinstead of just the real one running on a cluster.
This is meant to be used for testing.
If a data collector using the Confd client is tested with shelltest, it will...
Add request type to Confd server for getting instance list
Add to Confd server a new request type (and its implementation) to ask forthe list of instances in a node.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Renames and cleanup of variable names in confd
The current names are quite confusing; this patch cleans up theconfusion by making sure we use different terms for the two threads,etc.
No actual code changes besides the renames.
Signed-off-by: Iustin Pop <iustin@google.com>...
First part of confd timer changes
This patch changes the resolution of the timers: the watcher timergoes from 60s to 17s, and the polling-mode timer goes from 2 secondsto 250ms. The code changes a bit more due to the changes in the unitsof the various constants....
Change the polling thread sleep behaviour
Currently, the polling thread sleeps at the end of its body; theoriginal reason was that when the thread initially starts, we want toload the config immediately (in the old-style config load model).
However, now we explicitly load the config, so we can make this thread...
Start confd in notify mode if we can
This patch changes the default model—where confd is always started inpolling mode—to a model where if possible we enable inotify modebefore starting any of the background threads.
There are some tricky details here: if we enable inotify, we should...
Explicitly load the config at confd startup
Currently, confd main function doesn't load the config, but simplyforks the individual timer threads, which will—as a side effect-alsoload the configuration as soon as they start.
However, this makes codes to the startup more complex, so let's...
Move getCurrentTime from Confd.Utils to Utils
The getCurrentTime function is of wide interest, so its moved to a moreappropriate position.
Improve the reception of replies in the confd client
If a received reply is valid and there is still no valid reply,keep it, no matter how new it is.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Rename htools/ to src/
Per offline discussions, this is the first patch of therenames. Tested with "make distcheck", seems to work fine.
The only change outside of the renaming is a bit of simplification inthe .gitignore rules; otherwise, simply s/htools/src/....