As per our design, maintd shall have its configuration and state in the main ganeti configuration. Add the needed infrastructure and make the maintenance daemon use it to - have the amount of time between rounds configurable, and - properly wait for its jobs to finish.
Klaus Aehlig (16): Factor out function to delay a thread in seconds Add a constant for the default value to wait between rounds Add configuration for maintenance daemon Add an RPC to WConfD to set the maintenance delay time Extend OpClusterSetParams to allow setting maintd interval Make LUClusterSetParams honor maintd_round_delay Add an option --maintenance-interval Add --maintenance-interval to gnt-cluster modify Document --maintenance-interval in man page Add an RPC to provide the maintenance interval Get the round delay from the configuration Add an RPC to get the list of current maintenance jobs Add routines to manipulate the jobs list for maintd Add a utility function to try an RPC until it returns True Make maintd wait for its jobs and also expose them Update the ganeti-maintd man page Makefile.am | 2 + lib/bootstrap.py | 2 + lib/cli_opts.py | 6 ++ lib/client/gnt_cluster.py | 5 +- lib/cmdlib/cluster/__init__.py | 3 + lib/config/__init__.py | 5 ++ lib/objects.py | 21 ++++++- lib/tools/cfgupgrade.py | 13 ++++- man/ganeti-maintd.rst | 24 ++++++++ man/gnt-cluster.rst | 4 ++ src/Ganeti/Confd/Client.hs | 2 +- src/Ganeti/Constants.hs | 6 ++ src/Ganeti/JQScheduler.hs | 6 +- src/Ganeti/MaintD/MemoryState.hs | 95 ++++++++++++++++++++++++++++++++ src/Ganeti/MaintD/Server.hs | 58 +++++++++++++++---- src/Ganeti/Objects.hs | 3 + src/Ganeti/Objects/Lens.hs | 8 +++ src/Ganeti/Objects/Maintenance.hs | 59 ++++++++++++++++++++ src/Ganeti/OpCodes.hs | 1 + src/Ganeti/OpParams.hs | 9 ++- src/Ganeti/Utils.hs | 5 ++ src/Ganeti/WConfd/Client.hs | 18 +++++- src/Ganeti/WConfd/ConfigModifications.hs | 43 ++++++++++++++- src/Ganeti/WConfd/Core.hs | 18 +++++- test/hs/Test/Ganeti/Objects.hs | 10 +++- test/hs/Test/Ganeti/OpCodes.hs | 1 + test/py/cfgupgrade_unittest.py | 1 + 27 files changed, 400 insertions(+), 28 deletions(-) create mode 100644 src/Ganeti/MaintD/MemoryState.hs create mode 100644 src/Ganeti/Objects/Maintenance.hs -- 2.4.3.573.g4eafbef
