- Nov 01, 2011
-
-
Michael Hanselmann authored
The unittests weren't corrected for the master branch. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Oct 31, 2011
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Stephen Shirley <diamond@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>
-
- Oct 26, 2011
-
-
Michael Hanselmann authored
Add missing “read_timeout” value. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
That's what you get for not running make lint :( Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
With this patch, only 6 RPC are left as old-style code. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This is in preparation for the definition-based RPC model, where the timeout will be stored within the definition. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
With this change we can easily reuse this functionality where it makes sense on other parts of Ganeti. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 25, 2011
-
-
Andrea Spadaccini authored
Add a function that joins two dictionaries, enforcing the constraint that the two key sets should be disjoint. Also, add unit tests for this function. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 24, 2011
-
-
Michael Hanselmann authored
Empty lines shouldn't get indented. Unittest included. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 21, 2011
-
-
Michael Hanselmann authored
We don't re-use cURL objects anymore, so there's no need to reset them. PycURL 7.19.0 has a reference counting bug leading to a crash after a certain number of performed requests. Since a unittest depended on this function for a test, it is replaced with a per-request completion callback, which could also be used by users of the HTTP client. Unittests are updated and a test for the request object's “nice name”, used by the lock monitor, is included. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
While we won't use this function in Ganeti (yet), users should be aware of the potential crashes caused by this functioni (discussed offline). If the installed version of PycURL is not affected, this test is a no-op. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Oct 20, 2011
-
-
Guido Trotter authored
Rather than just allowing files for all nodes to be optional, we allow optional files to be per-category. The way this works is that they must be included in both lists (the new code checks for this). The code also removes a duplicate assert (present both in verify and compute ancillary files) and checks the new functionality in unittests. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
The rename is not needed either, since we're not adding more code as of now. This reverts commit 57ca011e. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Guido Trotter authored
We discussed that this is not needed right now, and it breaks existing functionality and unittests. This reverts commit 6915fe26. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 18, 2011
-
-
Michael Hanselmann authored
Commit e1f23243 changed te LU and opcode for node evacuation to receive a “mode” parameter (among other things). Commit de40437a changed the RAPI code accordingly, but did so for an earlier version of the first patch. Obviously this couldn't work, so here's the fix. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Oct 17, 2011
-
-
Michael Hanselmann authored
- Split code using ctypes directly into a helper class - Don't load “libc.so.6”, but use handle for main program instead (see comment in code) - Clarify comment on errno with older ctypes versions - Rename unittest since it can't be used for other functions (modifies process environment at runtime) - Add boolean return value for “Mlockall” These changes are leftovers from some experiments with ctypes. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Renaming so that more code using ctypes could be added to the same file. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Commit d1c172de inadvertently changes the “/2/instances/[instance_name]/replace-disks” resource to use body parameters. There were no QA tests and the issue wasn't noticed. This patch re-introduces support for query parameters and adds a QA test. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Andrea Spadaccini <spadaccio@google.com>
-
- Oct 13, 2011
-
-
Michael Hanselmann authored
A separate patch will add “auto-promote” through “/2/nodes/[node_name]/role”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
The “constants” module is a bit special in the sense that we don't want to export random stuff from it. This unittest checks the naming convention and removes imported modules from the module's namespace. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This patch removes all remains of the HTTP client pool. Newly added unittests provide 96% coverage on http.client. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 12, 2011
-
-
Iustin Pop authored
We currently use 'filter' as the OpCode, QueryRequest and RAPI field name for representing a query filter. However, since 'filter' is a built-in function, we actually have to use filter_ throughout the code in order to not override the built-in function. This patch simply goes and does a global sed over the code. Due to the fact that the RAPI interface already exposed this field, we add compatibility code for now which handles both forms. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 05, 2011
-
-
Agata Murawska authored
Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Andrea Spadaccini authored
- move the cluster verify error codes from cmdlib._VerifyErrors to constants; - add to each of them the CV (Cluster Verify) prefix; - add the CV_ALL_ECODES and CV_ALL_ECODES_STRINGS constants; - wrap the lines that exceed 80 characters after changing the error code names to the new ones. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Andrea Spadaccini authored
Add the following methods to netutils.IPAddress: * ValidateNetmask * GetClassFromIpVersion * GetClassFromIpFamily Also, add related tests to the test suite. Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Oct 04, 2011
-
-
Michael Hanselmann authored
If a cluster has any non-master-candidate nodes, those don't contain all files (e.g. config.data). With commit aef59ae7 (March 31st, 2011) the logic was changed and subsequently verifying a cluster with non-mc nodes would complain. This patch fixes this issue by changing the algorithm. It also adds an additional check for files which shouldn't exist on a machine. A newly added unittest is included. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 30, 2011
-
-
Michael Hanselmann authored
When verifying a group the code would always check SSH to all nodes in the same group, as well as the first node for every other group. On big clusters this can cause issues since many nodes will try to connect to the first node of another group at the same time. This patch changes the algorithm to choose a different node every time. A unittest for the selection algorithm is included. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Andrea Spadaccini authored
lib/client/gnt_cluster.py: * Add activate-master-ip and deactivate-master-ip commands man/gnt-cluster.rst: * Document the new commands lib/opcodes.py lib/cmdlib.py * Add two opcodes and the LU that call the relevant RPCs test/docs_unittest.py * Silence an error about RAPI not implemented for the two new opcodes Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Sep 29, 2011
-
-
Andrea Spadaccini authored
Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Sep 28, 2011
-
-
Michael Hanselmann authored
Not all requests use an instance of RpcRunner yet and therefore won't show up (only instances have access to the global Ganeti context). Currently only the IP address is accessible. Another patch will add a nicer name for requests. Example output (gnt-debug locks -o name,pending): Name Pending rpc/192.0.2.18/test_delay thread:Jq12/Job683/TEST_DELAY Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Sep 27, 2011
-
-
Michael Hanselmann authored
- Clearly separate node name to IP address resolution into separate functions - Simplified code structure (one code path instead of several) - Fully unittested - Preparation for more RPC improvements Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 26, 2011
-
-
Agata Murawska authored
Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Agata Murawska authored
Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
This reverts commit fd0351ae and 9869e771. The built-in module is a lot slower in Python 2.6. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 23, 2011
-
-
Michael Hanselmann authored
JSON only supports a very restricted set of types for dictionary keys, among them strings, booleans and “null”. Integers and floats are converted to strings. Since this can cause a lot of confusion in Python, this check raises an exception if a caller tries to use such types. Since the pre-Python 2.6 “simplejson” module doesn't support overriding the function where the conversion takes place this check can only be done for the newer “json” module. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Sep 20, 2011
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 16, 2011
-
-
Michael Hanselmann authored
This was still missing from RAPI. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 14, 2011
-
-
Michael Hanselmann authored
All opcodes which are not yet covered or can't with the current design (e.g. cluster initialization) are excluded. This test is added to the docs unittest since here the code already has access to a list of all RAPI resources and does more checks on them. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-