- Jun 29, 2009
-
-
Guido Trotter authored
Before this case was not covered, and printed a stack trace. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
If an ident member of an IdentKeyVal relationship starts with no_ or -, handle it the same way we do for a key. Some unittests are added to check that check_ident_key_val behaves as expected. This patch also changes ForceDictType to, for now, fail on such an entry, and the same to happen when creating an instance or modifying its nics or disks. This behavior will be used later on to allow deletion of os entries in os parameters. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
If an empty string is passed to _SplitKeyVal, we should return {}, rather than {'': True}. Also test for the correct behavior. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Also, since Ganeti 2.1 will be compatible with both 10 and 15, change the OS_API_VERSION constant to be an OS_API_VERSIONS set, and update the places in the code that used that constat to use something else. In particular: - in the qa for now we just create a fake version 10 OS - in the os environment we use the highest common version (which means we need to pass in the os to OSEnvironment) - when loading an OS any common version will do Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
The api_versions list is first stripped and then converted to integer. Combining the two operations. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 26, 2009
-
-
Guido Trotter authored
A few places in the code open a file "manually" rather than using our wrapper function, because they need an array with the lines. Combining the result of utils.ReadFile with splitlines() we get rid of the exceptions. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This makes what versions we're talking about clearer. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 24, 2009
-
-
Guido Trotter authored
Making ssconf._ReadFile a wrapper over utils.ReadFile Signed-off-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 23, 2009
-
-
Iustin Pop authored
As per comments for patch “Convert node_start_master to new style result”, the ‘payload’ variable is renamed to ‘err_msgs’. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 19, 2009
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch implements dry-run mode for the operations which modify the state of the cluster. Dry-run mode is enabled by passing a 'dry-run' query argument with positive integer value. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Currently LUCreateInstance has no result; this patch changes it so that both the normal result and the dry-run result is the node list of the selected instance. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch adds support for the dry-run mode for all command line operations, and also makes use of this for commands using the SubmitOrSend function. For the ones not using it, the flag has no effect (future patches). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch adds a new (global) opcode flag 'dry_run' which, when True, causes early exit from the LU workflow, returning a special value from the LU object (initialized in the parent LogicalUnit class, and which if not overriden from child LUs will be None). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This simple patch adds to all opcodes extension of the base opcode __slots__. This way we can add slots across all opcodes, for example 'dry-run'. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 18, 2009
-
-
Guido Trotter authored
Document the new nics list, as an alternative to the one nick which you can create with the old mac, ip, mode, link/bridge keys. Also specify that 'bridge' is still accepted as well. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This is compatible with the previous version, but also allows specifying more than one nic, by giving a "nics" list of dicts. The two methods (individual fields for the first nic, and list of all nics) are incompatible with each other. The default remains one nick with no parameters specified. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Iustin Pop authored
There were multiple issues: - copy-paste resulted in wrong indentation - wrong function name - missing spaces around assignment - overriding built-in names (type, dir) or already defines ones (errors, hypervisor) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 17, 2009
-
-
Guido Trotter authored
In query we ask for nic.links, rather than nic.bridges In create we accept both "link" and "bridge" and let the opcode deal with it. Note that we still can create only one nic per instance. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Properly document the expected nic format. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This CL updates QueryInstanceData to return NICs in the new format (mac, ip, mode, link) and fixes gnt-instance info to properly display them. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Compatibility with the old parameters is maintained, by allowing to query for "bridge" "nic.bridges" and "nic.bridge/N", but None is returned in that case for routed nics. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
We're going to use this helper function for more than just hooks, so we'll give it a more generic name. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 16, 2009
-
-
Guido Trotter authored
* next: gnt-cluster(8) fix --backend-parameters opt name LUQueryInstances: fix querying for nic data Specify the object type in two docstring
-
Guido Trotter authored
It was mistakenly called --backend Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Currently we support querying for "mac" "ip" or "bridge", meaning "the one of the first nic. We are not checking that there is a first nic, though, and thus could incur in errors. This patch fixes it by returning "None" should there be no such nic, as it's done when explicitely asking for a nic via nic.<field>/<N> Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This was introduced as a typo in commit 7e66c35b while removing duplicate code from the KVM hypervisor. Signed-off-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
Commit c26a6bd2 changed GetMasterInfo not to return a tuple anymore, but didn't update its two callers in backend.py, which were trying to extract the values from the second tuple element. This causes a stack trace in node-daemon.log. Signed-off-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
* next: (22 commits) Update NEWS and version for 2.0.1 release gnt-{instance,backup}(8) --nic is actually --net Fix a wrong function name in backend.DrbdAttachNet GNT-CLUSTER(8) fix search-tags example Enable stripped LVs Add a lvm stripecount configure parameter Add more constants for DRBD and change sync tests Wait for a while in failed resyncs Assemble DRBD using the known size Fix two issues with exports and snapshot errors Set the size on new DRBDs in replace secondary Change the bdev init signatures Release 2.0.0 final watcher: automatically restart noded/rapi watcher: handle full and drained queue cases rapi: rework error handling Fix backend.OSEnvironment be/hv parameters rapi: make tags query not use jobs Change failover instance when instance is stopped Export more instance information in hooks ... Conflicts: lib/cmdlib.py test/ganeti.utils_unittest.py Signed-off-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
* master: Update NEWS and version for 2.0.1 release gnt-{instance,backup}(8) --nic is actually --net Fix a wrong function name in backend.DrbdAttachNet GNT-CLUSTER(8) fix search-tags example
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
Fix a typo in the man pages that used the wrong option name. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@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
Some indentation was wrong, and pylint rightfully complained. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Now that all results are the same, we can even more simplify the handling in cmdlib more. Almost all if result.RemoteFailMsg()… constructs are similar, and we resurect the RpcResult.Raise() function to take a message argument, which it will process and raise an appropriate exception. This means a significant reduce in boilerplate code. Only the cases which handle the error specially (e.g. by warning only) need to touch directly the failure message, which was renamed on the RpcResult object for more clarity. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Since now all functions fail via _Fail, the return True, … is redundant as all normal return paths have it, and thus the True value can be added in the ganeti-noded handler. This means that all functions can now forget about the special result type, and instead return normally, but signal all failures via _Fail(). Only a few functions must be handled specially (the recursive ones). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-