History | View | Annotate | Download (9.4 kB)
Ignore log messages in unittests
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Remove extra argument from HooksMaster class
The mcpu.py:HooksMaster class needs to have a proc attribute/argument toinit in ordet to call its LogWarning method. However, this is availablefrom the 'lu' attribute, so we can remove this dependency.
Signed-off-by: Iustin Pop <iustin@google.com>...
Fix hooks unittests after RPC result changes
Patch "Simplify the RPC result framework in backend.py" changed allRPCs, and thus the hooks results where also changed. This needs changesto the hooks unittests too.
Convert hooks_runner rpc to new style result
This also converts (and fixes) unittests and mock objects to deal withthis change, and the custom hook verifier in cmdlib.LUClusterVerify.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Fix unittest encoding breakage
Due to the fact that we sanitize now the output from environmentscripts, the unittest needs to be adjusted. My bad for not checking it.
Reviewed-by: imsnah
Fix hooks_unittest with new rpc call structure
Reviewed-by: iustinp
Move some LU logging to use proc.Log*
We change some messages which are obviously intended for the user to usethe proc.Log* functions instead of (only) the logging ones.
We also fix some wrong uses of feedback_fn.
Convert rpc module to RpcRunner
This big patch changes the call model used in internode-rpc fromstandalong function calls in the rpc module to via a RpcRunner class,that holds all the methods. This can be used in the future to enablesmarter processing in the RPC layer itself (some quick examples are not...
Get rid of ssconf
Remove leftovers from ssconf.
Pass context to LUs
Rather than passing a ConfigWriter to the LUs we'll pass the wholecontext, from which a ConfigWriter can be extracted, but we can alsoaccess the GanetiLockManager. This also fixes the places where a FakeLUis created.
Remove duplicate code in hooks unittests
All the tests there used to creare a cfg, a sstore, an opcode and a LU.Put all the duplicate code in the setUp function.
Soften the requirements for hooks execution
Currently, an unreachable node (or one that return undetermined failure)in the hooks pre-phase will abort the curren operation. This is notgood, as a down node could prevent many operation on the cluster.
This patch changes a RPC-level failure (and not a hook execution...
Fix unit tests for hooks.
Fix typo in last commit.