Statistics
| Branch: | Tag: | Revision:

root / htools / Ganeti / Config.hs @ daa79414

History | View | Annotate | Download (10.6 kB)

# Date Author Comment
edc1acde 11/21/2012 03:51 pm Iustin Pop

Generalise the JSON "Container" type

Currently, we have some types that we kept as dictionaries in the
objects representation (due to inconsistent behaviour, or other
technical reasons). This should be improved in the future, but in the
meantime we can improve the Container type by allowing its keys to be...

22381768 11/21/2012 03:51 pm Iustin Pop

Move the 'Hypervisor' type from Objects to Types

This is a very basic type and 'Objects' is a heavy-weight module. By
moving it to 'types' we simplify (in the future) the import chains.

Signed-off-by: Iustin Pop <>
Reviewed-by: Adeodato Simo <>

5183e8be 10/25/2012 01:05 pm Iustin Pop

Convert query path from string errors to GanetiException

This patch converts all the call paths from 'Result' (which contains
just string errors) to 'ErrorResult', which holds
GanetiException-encoded errors. We can now return proper
OpPrereq/OpExec errors to the clients of the luxi/query socket....

90d033ef 10/11/2012 01:03 pm Iustin Pop

Add function for getting a group's merged disk params

… and use it in the Query implementation, removing the last
non-correct query field for Groups.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

0ec87781 10/10/2012 03:03 pm Iustin Pop

Fixup hypervisor queries in node query

We need to only query the default (first enabled) hypervisor, not all
hypervisors. For this, we need to add a manual check to ensure that we
don't have a corrupt config (there's no "NonEmptyList" type…).

Signed-off-by: Iustin Pop <>...

e5cb098c 09/26/2012 07:34 pm Agata Murawska

Config support for NodeGroup query

For some results in nodegroup queries we need agregation similar to
one that is done for nodes.

Signed-off-by: Agata Murawska <>
Reviewed-by: Iustin Pop <>

5b11f8db 09/05/2012 05:31 pm Iustin Pop

Further hlint fixes

Commit 2cdaf22, “Re-enable standard hlint warnings”, got it almost
right. The only problem is that (confusingly) the default set of hints
is not in HLint.Default, but in HLint.HLint (it includes Default and
some built-ins).

After changing the lint file to correctly include the defaults, we had...

f3baf5ef 09/04/2012 04:51 pm Iustin Pop

Move JSON.hs and Compat.hs out from under HTools/

These two files are not htools-specific, so let's move them out of the
HTools subdirectory/module hierarchy and directly under Ganeti.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

da45c352 09/03/2012 04:45 pm Iustin Pop

Add more node-related data types and functions

This is a simple type declaration for NodeRole, a NdParamObject type
class, and a few related helper functions for nodes and node groups.

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

b09cce64 09/03/2012 03:13 pm Iustin Pop

Expand Objects.hs definitions

This patch adds the missing parameters in the cluster/group objects,
for now as simple maps (dictionaries), without type safety. The
rationale for adding them as such is:

- we need something to enable query functionality
- since we don't modify the values, we don't risk introducing bugs...

4cd428db 08/28/2012 06:01 pm Iustin Pop

Config.hs: Add a function to lookup group

Like in the python code, this is a bit more complex since groups are
indexed by UUID, so we must fallback to lookup via the name (slow; but
the number of groups should be small).

Signed-off-by: Iustin Pop <>...

2cdaf225 08/28/2012 05:59 pm Iustin Pop

Re-enable standard hlint warnings

Commit 5a1e31b4 (Add infrastructure for, and two extra hlint rules)
was intended to add two extra hlint rules, but I didn't realise at
that time that "--hint" when first used overrides the built-in
lints. As such, since then we were basically running with just those...

84835174 08/28/2012 05:59 pm Iustin Pop

Improve the TH 'Container' type

This is the first part of the changes related to the 'Container' type.

We currently handle this type as follows: it's a simple type alias
over the Data.Map type, which means:

- it's easy to use the Data.Map functions to change the type...

d81ec8b7 07/19/2012 11:02 am Iustin Pop

Implement a node to drbd minors query function

This can be queried remotely since it's a pure configuration query.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

7b2ead5a 07/19/2012 11:01 am Iustin Pop

Add support for computing instance all/secondary nodes

This fixes an old FIXME. Since we now how actual DRBD configuration
data, we can finally compute the instance's secondary nodes.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

0fc8e521 07/19/2012 11:01 am Iustin Pop

Implement lookup of partial names in Config.hs

This uses the recently-moved functions to implement partial lookup of
names on getNode and getInstance, similar to the Python codebase.

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

eaa64cd8 03/13/2012 02:48 pm Iustin Pop

htools: add a very basic lib/config.py equivalent

This only is able to load the configuration data for now.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>