- Sep 28, 2012
-
-
Michael Hanselmann authored
Some parts of the code still use a hardcoded user name: root. This patch replaces all with a constant specified at build time. The end goal is to make it possible to run a Ganeti cluster without any special privileges (of course this will prevent some functionality from working). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Since ERpcError is still not a monad, a simple foldr will have to do for now. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
parseHttpResponse is such a simple function that we can actually do the entire unpacking in rpcResultParse. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
For now ERpcError is still not a monad, but we can still simplify rpcResultFill implementation for different calls simply by abstracting it into two helpers. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
There is no need (at least right now) for some of the resulting types to be in additional monad, so let us just have more "normal" functions. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
As per Iustin's suggestion, this patch aligns parts of typeclass instance on "=". Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
As per Iustin's suggestion, show is not a good solution - so instead the name is now explainRpcError. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 27, 2012
-
-
Michael Hanselmann authored
Instead of having a different set in (almost) every shell script, this inserts the most commonly used variables at build time. This way the code for injecting a root directory for virtual clusters also is just needed once. I chose inserting the variables using “sed” at build time over a runtime script as the latter would need to be located from within the script and the path would be different depending on the environment (unittest vs. actual installation). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Otherwise chown(2) will fail when noded doesn't run as root. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
Missing backslash. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Bernardo Dal Seno authored
Make sure that all the nodes where a disk operation is peformed are locked. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
In case of in-place recreate-disks operation, all node locks were released before starting the actual execution. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
This utility can be used to configure an environment for a virtual cluster. It sets up entries in /etc/hosts, creates the necessary directory structure, and generates helper scripts. Documentation for virtual clusters will come in a later patch. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Tuples are data structures, not containers. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
… instead of comparing with two different values in two placse. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Commit 32683096 removed the use of a private member function. Also replace '' with "" in one place. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
It was very easy to refactor CreateInstance to repurpose some part of it for the instance multi allocation request. So we do this. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
This is needed so we can load it as an opcode. However, this information should not be available on the client, so we inject that info when we receive the request. Provided unittest to verify behaviour. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Commit 3329f4de unintentionally changed the filenames of all daemon log files. This patch reverts part of those changes. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 26, 2012
-
-
Agata Murawska authored
This patch implements single instance info call - somewhat similar to all_instances_info, except we give a specific instance name. Current implementation of reading the InstanceInfo value is somewhat counter-intuitive because when we query a node on thich there is no instance with such name, this is not considered an error - but it does produce an empty answer. Therefore the resulting type is optional. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
instance_info and all_instances_info calls had different per-instance return types, this commit fixes the mismatch. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
For storage_list call, the result type depends on the call parameters. Therefore, we have to add call as an argument for rpcResultFill - and by extension, to the typeclass. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Implementation of node version query. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Added support for NodeInfo RPC call as source of data for node query. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
We make use of the parameter added in the previous patch and add option to add live parameters to the query. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
The tests we currently have assume, that all the data required for running the query is available - once we add live data, this will no longer be the case. This patch adds boolean parameter to query function, which tells it whether to ignore live parameters gathering. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Simple conversion for queries that use live fields gathered from RPC calls. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
This is a helper function that gets the JSON encoding of the first element of the list (if possible). Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
This patch creates ResultT, a monad transformation used later in RPC <-> query integration. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
This adds tests similar to those used for node query. For now the prop_queryGroup_noUnknown is disabled and commented out, as it is fasifiable with ndparams and ipolicy. It may be removed or fixed later on. Also, prop_queryGrooup_types has one less property checked - it is not the case that number of result rows should be equal to number of nodes. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Implementation of nodegroup queries in Haskell. This is not yet complete as we are missing merged disk parameters and option want_diskparams is not implemented. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
For some results in nodegroup queries we need agregation similar to one that is done for nodes. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Previous version of RPC calls implementation in Haskell did not take into account that the actual result type for queries is a list, not a dictionary. This patch aims at fixing the problem "for now" - it is not a pretty solution, but it does work. Note that parsing of the result is now split into two parts - first, we check if server's aswer is positive, then if it is, we procede with decoding the actual result. Values and order of some fields in the result type were changed to reflect actual order of arguments from server responses. AllInstancesInfo call was particularly tricky, because it returns a dictionary where keys are instance names - and the response from a given node is correct if all the instances were deserialized, not just some. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
This was repeated a lot, so we should abstract this into a type. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Curl error messages are self contained and don't need "error" prefix; added RpcResult Error which will be used once proper deserialization of rpc response is in place. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
We now have Hypervisor type in Objects, might just as well use it. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
I assumed this was a copy-paste+forgetting to change the header comment. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
This patch adds missing Path entry and uses it in Rpc. It was not in place before due to different build settings - i.e. if curl was disabled, there were no problems. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-