- Jun 15, 2009
-
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Only the custom handling in rpc.py for call_node_info used this, so now it can be removed. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This patch also does some cleanup and enforces valid results (with proper type, i.e. int for memory/disk values) from remote node, otherwise we handle the result as failure. We do this so that we can remove custom processing in rpc.py which is very old and doesn't play with the new style result (and has bit me by modifying the result received from the remote node). After this change, the node_info rpc becomes a normal one. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This should actually have a function in backend, but it's fine for now. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Since backend.GetInstanceList() is used both as RPC endpoint and as internal function, it can't return (status, value). Instead it returns only valid instance info, and failures are denoted by exceptions; and the ganeti-noded function adds the (True,) status. The patch also fixes a typo. 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>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This changes from a list of booleans to «status, error messages». This means that instead knowing which disk has failed (position based), we get a list of all failures (with details how they failed). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This was a very simple (boolean) RPC, so converting it to actually have more value with the new style results was more difficult. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This doesn't have known failure modes but converting will help later. We also now call directly utils.ListVolumeGroups() instead of the backend.ListVolumeGroups() so that we don't have to undo the (status, value) result type. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This is a big change, because we need to cleanup its users too. The call and thus LUVerifyDisks LU used to differentiate between failure at node level and failure at LV level, by returning different types in the RPC result. This is way too complicated for our needs. The patch changes to new style result (easy change), and then: - changes LUVerifyDisks.Exec() to return a tuple of 3-elements instead of 4-elements; we collapse the «nodes not reachable» and «nodes with LVM errors» in a single dict - changes gnt-cluster to parse 3-element results and simplifies the different by-error handling code Note that the status is added in ganeti-noded, and not in the function itself, as the function is used in other places too. This was tested with down nodes and broken VGs. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This converts the export_remove rpc to new style result and also fixes and old TODO by adding exception handling (and conversion to failure). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This is used in multiple places, so it has a little more changes than the previous ones. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This also removes some code from ganeti-noded and rpc.py, which should not do such processing of data (and be simply glue code). (Or alternatively they could, if we had better infrastructure). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
This rpc doesn't have explicit failure modes, but once all RPCs are converted and we can catch and convert expceptions to failure in noded, we will have meaningfull error messages. 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>
-
Iustin Pop authored
This also slightly changes the code in cmdlib that uses it for more clarity. 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>
-
Guido Trotter authored
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
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
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
These values are deprecated, and not used in 2.1 anymore. The slots are still there to allow auto-upgrading from 2.0. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
In order to do that we change the way nics are espected to be passed to the _BuildInstanceHookEnv function, from (ip, bridge, mac) to (ip, mac, mode, link). To translate new nics, which have the ip, mac and nicparams fields to this new format we add an auxiliary _PreBuildNICHooksList function, which is called both in _BuildInstanceHookEnvByObject and in LUCreateInstance, where we don't have an Instance object created yet, at hooks execution time. LUSetInstanceParams hooks generation is also changed to provide the right override to the nics field, should any nics be modified. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Default bridge is now handled with nic parameters, and this function is unused. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Since default_bridge is deprecated, avoid displaying it when querying for cluster information. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
The target test cluster should have nic params, rather than a default bridge. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
And remove the -b option, as default nic parameters can be used instead. We could support the option, but that would add more code, and since cluster init is not a frequent operation, it's better to keep the code clean. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Rather than checking all bridges, we check all links for bridged nics, if any. Since this function is now slightly more complex than before, it's been split into an auxiliary function, and more parameters are used, so that it can be called from more places, rather than reimplementing the same code there. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Hooks are dealt with in a later patch in the series. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 12, 2009
-
-
Guido Trotter authored
There is some duplicated code between hv and be parameters to create the updated parameters dict. This will need to be done also for nic parameters, so we abstract this functionality in a function. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Rather than querying for the cluster multiple times, save it. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Instance creation is changed to support the new nic parameters. Hooks are dealt with in a later patch in the series. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
Also populate nicparams with a sensible default for imported instances. Unfortunately we don't know if the bridge set up in old nics is the default one or not, and we don't have access to the config cluster object here to verify, so we'll just copy it without questions. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 10, 2009
-
-
Iustin Pop authored
Commit 55efe6da "Convert instance reinstall to multi instance model" actually broke instance reinstall for single-instance cases. This one-liner fixes it. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Commit 1b54fc6c added a typo (due to copy-paste) in the error handling path of this function. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Iustin Pop authored
Commit 28eddce5 added the RedistributeAncillaryFiles, but it calls it with a wrong parameter and thus makes node add fail. This one-liner fixes it. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 09, 2009
-
-
Iustin Pop authored
This patch adds a simple failure reporting tool, similar to bdev's _ThrowError. In backend, we move towards the new-style RPC results (of type (status, payload)) and thus functions which use this style can very easily log and return the error message using this new function. The exception is declared here and not in errors.py since it's local to the node-daemon/backend combination. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 08, 2009
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-