Due to too long discussion
https://groups.google.com/forum/#!topic/ganeti-devel/9_QgaRD_zeU
which has become unmaintainable, new thread started.
Compared to the last patch series:
- fixed all the riba's remarks
- added the new IS_MASTER enviromental variable
- python tests are modified in order to check the sequences of hooks
execution
- qa tests for global hooks added
Oleg Ponomarev (10):
Add global hooks support to the HooksMaster
Run global hooks in case of succesfull opcode execution
Execute POST-phase global hooks in case of failure
Make SafeLoadJobFromDisk a @staticmethod
Divide forkJobProcess into several functions
Implement forkPostHooksProcess function
Implement python process ececuting global POST hooks
Execute global POST hooks for disappeared job processes
Update design document for global hooks
Add QA tests for global hooks
Makefile.am | 4 +-
doc/design-global-hooks.rst | 60 +++++--
lib/cmdlib/common.py | 3 +
lib/hooksmaster.py | 72 +++++++--
lib/jqueue/__init__.py | 23 +--
lib/jqueue/exec.py | 8 +-
lib/jqueue/post_hooks_exec.py | 120 ++++++++++++++
lib/mcpu.py | 91 +++++++----
qa/ganeti-qa.py | 13 ++
qa/qa-sample.json | 2 +
qa/qa_global_hooks.py | 120 ++++++++++++++
qa/qa_utils.py | 11 ++
src/Ganeti/Constants.hs | 20 +++
src/Ganeti/JQScheduler.hs | 21 ++-
src/Ganeti/Path.hs | 7 +
src/Ganeti/Query/Exec.hs | 223 +++++++++++++++++---------
test/py/cmdlib/cluster_unittest.py | 18 ++-
test/py/cmdlib/testsupport/cmdlib_testcase.py | 19 +--
test/py/cmdlib/testsupport/rpc_runner_mock.py | 23 ++-
test/py/ganeti.hooks_unittest.py | 6 +-
20 files changed, 687 insertions(+), 177 deletions(-)
create mode 100644 lib/jqueue/post_hooks_exec.py
create mode 100644 qa/qa_global_hooks.py
--
2.6.0.rc2.230.g3dd15c0