- Dec 27, 2012
-
-
Iustin Pop authored
This is the first step of the test files reorganisation: moving test/* (except test/data) to new directory test/py/. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Nov 21, 2012
-
-
Michael Hanselmann authored
Now that 2.6 is essentially finished and 2.7 going to be branched soon-ish, I thought it would be a good moment to replace some single quotes in test/*.py. Merge pains should be limited. In one place in test/ganeti.locking_unittest.py, spaces are added for assignments. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Oct 18, 2012
-
-
Michael Hanselmann authored
There might be more, but at least replace all these low-hanging fruits. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
- Sep 18, 2012
-
-
Michael Hanselmann authored
File system paths moved from constants to pathutils. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 01, 2011
-
-
Andrea Spadaccini authored
- remove any dependence on Logical Units from the HooksMaster; - add a new function parameter to the constructor, a function that is expected to convert the results of the hooks execution in a format understood by the HooksMaster; - add a factory method that builds a HooksMaster from a LU, keeping the interface of the old constructor of HooksMaster; - remove usage of Processor.hmclass from external classes, introducing the Processor.BuildHooksMaster method; - update unit tests. Reviewed-by:
Michael Hanselmann <hansmi@google.com> Signed-off-by:
Andrea Spadaccini <spadaccio@google.com>
-
Andrea Spadaccini authored
- remove any dependence on Logical Units from the HooksMaster; - add a new function parameter to the constructor, a function that is expected to convert the results of the hooks execution in a format understood by the HooksMaster; - add a factory method that builds a HooksMaster from a LU, keeping the interface of the old constructor of HooksMaster; - remove usage of Processor.hmclass from external classes, introducing the Processor.BuildHooksMaster method; - update unit tests. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 27, 2011
-
-
Andrea Spadaccini authored
In FakeHooksRpcSuccess, the data parameter of the RpcResult constructor was not enclosed in a tuple. While this does not make the test fail, it must be fixed. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Mar 18, 2011
-
-
Michael Hanselmann authored
Commit dd7f6776 added another call to BuildHooksEnv to provide post-phase status variables. Since BuildHooksEnv also built the node lists, that meant they have to be built twice. First a rather strict check was used, but it turned out to be more tricky. Commit b423c513 had to remove the strict check again. With this patch the function is split in two parts, one generating the actual environment variables, and another part returning the node lists. The former is called twice. Unittests are updated. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 17, 2011
-
-
Michael Hanselmann authored
Commit dd7f6776 added a restrictive check for the node lists returned by BuildHooksEnv, leading to errors with some LUs, one of which was fixed in commit 0dfa2c22. As it turns out, other LUs have similar issues, some not easy to fix. This patch disables the restrictive check until the BuildHooksEnv functions can be split into one part generating the actual environment and one generating the node lists. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Mar 16, 2011
-
-
Michael Hanselmann authored
When a hook is called, it is provided with a number of variables describing the status of the instance/node/etc. before the operation. Some opcodes provide extra variables to see modified values from hooks, but that's not a generic solution. This patch modifies the code calling hooks to generate the environment once before and once after an opcode has been executed. Doing so should be safe—I did not find any LU.BuildHooksEnv modifying LU instance attributes. The values collected after running the opcode are prefixed with “GANETI_POST_”, as opposed to “GANETI_” for pre-execution variables. The latter are still provided for backwards compatibility. Environment variable examples: gnt-instance start $instance: GANETI_INSTANCE_STATUS=down GANETI_POST_INSTANCE_STATUS=up gnt-instance modify -B memory=512 $instance: GANETI_INSTANCE_BE_memory=768 GANETI_POST_INSTANCE_BE_memory=512 Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 03, 2009
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Aug 24, 2009
-
-
Iustin Pop authored
The mcpu.py:HooksMaster class needs to have a proc attribute/argument to init in ordet to call its LogWarning method. However, this is available from the 'lu' attribute, so we can remove this dependency. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jun 15, 2009
-
-
Iustin Pop authored
Patch "Simplify the RPC result framework in backend.py" changed all RPCs, and thus the hooks results where also changed. This needs changes to the hooks unittests too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This also converts (and fixes) unittests and mock objects to deal with this change, and the custom hook verifier in cmdlib.LUClusterVerify. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Feb 03, 2009
-
-
Iustin Pop authored
Due to the fact that we sanitize now the output from environment scripts, the unittest needs to be adjusted. My bad for not checking it. Reviewed-by: imsnah
-
- Dec 02, 2008
-
-
Guido Trotter authored
Reviewed-by: iustinp
-
- Oct 21, 2008
-
-
Iustin Pop authored
We change some messages which are obviously intended for the user to use the proc.Log* functions instead of (only) the logging ones. We also fix some wrong uses of feedback_fn. Reviewed-by: imsnah
-
- Oct 10, 2008
-
-
Iustin Pop authored
This big patch changes the call model used in internode-rpc from standalong function calls in the rpc module to via a RpcRunner class, that holds all the methods. This can be used in the future to enable smarter processing in the RPC layer itself (some quick examples are not setting the DiskID from cmdlib code, but only once in each rpc call, etc.). There are a few RPC calls that are made outside of the LU code, and these calls are left as staticmethods, so they can be used without a class instance (which requires a ConfigWriter instance). Reviewed-by: imsnah
-
- Oct 01, 2008
-
-
Michael Hanselmann authored
Remove leftovers from ssconf. Reviewed-by: iustinp
-
- Jul 08, 2008
-
-
Guido Trotter authored
Rather than passing a ConfigWriter to the LUs we'll pass the whole context, from which a ConfigWriter can be extracted, but we can also access the GanetiLockManager. This also fixes the places where a FakeLU is created. Reviewed-by: iustinp
-
- Jun 30, 2008
-
-
Guido Trotter authored
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. Reviewed-by: iustinp
-
- Nov 09, 2007
-
-
Iustin Pop authored
Currently, an unreachable node (or one that return undetermined failure) in the hooks pre-phase will abort the curren operation. This is not good, as a down node could prevent many operation on the cluster. This patch changes a RPC-level failure (and not a hook execution failure) into a warning. It also modifies the related test cases. This fixes issue 11. Reviewed-by: ultrotter
-
- Oct 17, 2007
-
-
Alexander Schreiber authored
Reviewed-by: imsnah
-
- Sep 12, 2007
-
-
Michael Hanselmann authored
-
Michael Hanselmann authored
-
- Jul 23, 2007
-
-
Iustin Pop authored
- move the master node name from the ConfigWriter to SimpleStore (all nodes need this, and it was the only thing pulled in from the ConfigWriter on nodes) - fix mcpu.py and the testing w.r.t. this change; for testing, rename the fake_config.py to mocks.py and add a FakeSStore object - then add a ganeti-master script which can be run on any node at boot and which will not do anything if not master on start (on stop it will still try to remove the ip address) - also add a new cluster-wide variable (master_netdev) that determines on which interface we add this ip address; it's customizable at cluster init time - also remove the cluster name file which was separately handled from ssconf (not needed anymore) - remove the master init.d links from the list of config files as this is not our responsibility now
-
- Jul 16, 2007
-
-
Iustin Pop authored
-