Testing the implementation, I realize that some instructions (e.g. cluster verify) define empty node set for the pre-hooks. From my point of view, it might be useful (e.g. for external logging) to always add master node to the node list. What do you think?
Also, I realized that current hooks implementation still doesn't work for opcodes which implementation is inherited from NoHooksLU. I'll figure out and fix this bug soon. On Tuesday, November 3, 2015 at 8:05:55 PM UTC+1, Oleg Ponomarev wrote: > > The first draft for global hooks implementation. Unfortunately, qa tests > become broken by this implementation. I hope to fix problems with the qa > tests soon, so, decide to send the draft for the review. > > Oleg Ponomarev (9): > 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 > Execute global hooks even for NoHooksLU opcodes > 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 > > Makefile.am | 3 +- > lib/hooksmaster.py | 24 ++- > lib/jqueue/__init__.py | 23 +-- > lib/jqueue/exec.py | 8 +- > lib/jqueue/post_hooks_exec.py | 116 ++++++++++++++ > lib/mcpu.py | 91 +++++++---- > src/Ganeti/Constants.hs | 14 ++ > src/Ganeti/JQScheduler.hs | 21 ++- > src/Ganeti/Path.hs | 7 + > src/Ganeti/Query/Exec.hs | 223 > +++++++++++++++++--------- > test/py/cmdlib/testsupport/cmdlib_testcase.py | 3 +- > 11 files changed, 399 insertions(+), 134 deletions(-) > create mode 100644 lib/jqueue/post_hooks_exec.py > > -- > 2.6.0.rc2.230.g3dd15c0 > >
