Statistics
| Branch: | Tag: | Revision:

root @ 7a07475f

# Date Author Comment
7a07475f 10/25/2012 02:32 pm Iustin Pop

Add a default `.ghci' file

This options file for ghci preseeds the correct include paths, so that
interactive sessions don't need to always pass these args.

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

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....

f56fc1a6 10/25/2012 01:05 pm Iustin Pop

Add exception utility functions

In Python, formatError also returns the exit code, but I find that
splitting them leads to clearer code.

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

ef3ad027 10/25/2012 12:38 pm Iustin Pop

Add an Errors module mirroring the Python one

As described in the module doc string, while writing this it dawned
upon me that we're mixing all errors together into a single hierarchy
(well, type on the Haskell side), which is not good. Some errors are
used purely within noded, some in the CLI frontends, etc. so these...

185b5b0d 10/25/2012 12:38 pm Iustin Pop

Abstract Luxi template functionality

These are almost generic, so let's change the signatures a bit a make
them fully so.

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

2e202a9b 10/25/2012 12:38 pm Iustin Pop

Abstract a few types in THH.hs

This 'simple' way of defining objects will be used also for errors, so
let's make it less Luxi-specific.

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

9e995e4f 10/25/2012 12:03 pm Guido Trotter

Add missing empty line

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

61b9b9c6 10/25/2012 11:54 am Iustin Pop

Remove dumb-allocator code from devel/upload

The 'dumb-allocator' has been removed almost two years ago (commit
6f547f96, “Remove dumb-allocator”), let's remove this special casing
for it from devel/upload.

Signed-off-by: Iustin Pop <>
Reviewed-by: Helga Velroyen <>

23294fb0 10/25/2012 11:54 am Iustin Pop

Fix devel/upload restart of daemons

While running with a wrong --prefix/--sysconfdir, I saw that
devel/upload actually uses a hardcoded path for the init script, even
though it installs it in the correct place.

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

d55b80b0 10/24/2012 03:01 pm Guido Trotter

Add small design for Linux HA integration

This documents the status (or wanted status) of some example ocf modules
I've written for Ganeti. They are far from perfect, but they should be
shipped as a starting point for other people who want to run this to...

335ba60d 10/24/2012 10:43 am Guido Trotter

Replace LIBDIR in .in files

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

68e2ed87 10/23/2012 07:28 pm Iustin Pop

Improve devel/upload command line handling

To people not used to it, it was completely non-obvious why
"./devel/upload" didn't do anything.

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

b183c4a8 10/23/2012 07:09 pm Iustin Pop

Improve logging of AssertionErrors

Currently, when we have an assertion error raised from cmdlib, it looks like this:

[cluster] root@node4:~# gnt-instance grow-disk instance1 0 1G
Failure: command execution error:

This is very very confusing. This patch adds a bit of traceback...

1facaf11 10/23/2012 07:08 pm Michael Hanselmann

tools.prepare_node_join: Fix pep8 errors

Pep8 didn't agree with the indentation.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

d12b9f66 10/23/2012 06:32 pm Michael Hanselmann

Add initial implementation of prepare-node-join

This is a new tool as per the design document “design-ssh-setup”. It
receives a JSON data structure on its standard input and configures the
SSH daemon and root's SSH keys accordingly. Unit tests are included....

8a3c9e8a 10/23/2012 03:59 pm Michael Hanselmann

ssh.GetUserFiles: RSA support, unit tests

This patch changes “ssh.GetUserFiles” to support two different kinds of
SSH keys, RSA and DSA. Before it would always use DSA. Newly written
unit tests are included.

Signed-off-by: Michael Hanselmann <>...

986efb78 10/23/2012 11:32 am Michele Tartara

Fix typo in walkthrough document

Signed-off-by: Michele Tartara <>
Reviewed-by: Iustin Pop <>

141c8421 10/22/2012 06:42 pm Michael Hanselmann

Find coverage during configure, issue with Debian package

- Debian Squeeze and up have a package named “python-coverage”, but it
doesn't use the same binary name as upstream (“coverage”).
- Said package includes a patch to use symlinks instead of file copies...

942a9a6a 10/22/2012 06:19 pm Iustin Pop

Remove multiple uses of '.&&.' with conjoin

This is just a bit of cleanup. The (.&&.) operator is internally just:

a .&& b = conjoin [a, b]

so let's replace 'a .&&. b .&&. c .&&. d' directly with 'conjoin [a,
b, c, d]'.

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

41eb900e 10/22/2012 06:19 pm Iustin Pop

Improve message for (==?) operator

After seeing how nice HUnit formats the error message on failed
'assertEqual', I think we can do better with ==?. Currently it says
(on one line): "Expected equality, but 1 /= 2".

This patch changes the code to format it similar to HUnit:...

37519c09 10/22/2012 06:19 pm Iustin Pop

Add a new 'really-all' make target

This is used when one wants to build all binaries, including those
that are used only for testing. A handy shortcut to make sure all
binaries can be built.

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

dddb2bc9 10/22/2012 02:20 pm Helga Velroyen

Annotated inequality operator for unit test properties

This includes: * The operator (/=?), which checks for inequality and prints
an error message if it encounters equality. (Basically the
negation of the (==?) operator). * Application of this operator in the test property...

77ffd663 10/22/2012 12:31 pm Helga Velroyen

Fix setting of 'failN1' flag for corner case

This patch includes:

  • The 'failN1' flag is now only set if there is strictly less
    memory available than required for failover.
  • Unit tests for that.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Iustin Pop <>

dd77da99 10/22/2012 12:29 pm Helga Velroyen

A few unittests improvements

Small simplifications of other unit tests using the (==?)
operator when possible, and typo fixes.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Iustin Pop <>

651c1c3e 10/19/2012 06:04 pm Helga Velroyen

Corrected some commandlines in walkthrough

Signed-off-by: Helga Velroyen <>
Reviewed-by: Iustin Pop <>

98508e7f 10/19/2012 06:04 pm Dato Simó

BasicTypes.hs: fix docstring for eitherToResult

eitherToResult now converts from `Either a b` to `GenericResult`, not
necessarily from `Either String` only. Also, fix a typo.

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

06c9a9d6 10/19/2012 05:55 pm Iustin Pop

Add note about running individual test cases

This was asked a few times offline, so let's document it.

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

b07afbb3 10/19/2012 05:55 pm Iustin Pop

Add a small QA check in instance renames for tags update

We also need to change the signature for _GetInstanceInfo, since we
don't have access to the instance dictionary in the rename instance
test.

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

48e175a2 10/19/2012 05:55 pm Iustin Pop

Update blockdev's "info" at instance rename

Currently, we set "info" metadata on block devices at device creation
time, but we never update it, leading to stale data in case of
instance renames. This would not be a big problem in case of regular
renames (assuming this is a rare operation), but importing instances...

a1556cfa 10/19/2012 05:55 pm Iustin Pop

LVM: remove old tags when adding new ones

This patch adds a small helper function to clear an LV's tags, and
calls it at SetInfo time. We need this to be able to correctly track
instance renames, once we will call SetInfo at such times.

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

e398546b 10/19/2012 05:55 pm Iustin Pop

Add a small bdev helper function

I wanted to write that snippet the third time, which is too much :)

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

ded769c1 10/19/2012 05:55 pm Iustin Pop

Add a small note about tab completion and generated files

This can indeed be annoying, so let's document it.

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

f4afc16e 10/19/2012 05:31 pm Michael Hanselmann

Update for SSH design: Cluster name, ignore node daemon

While writing the initial version of this design I misunderstood what
“setup-ssh” does. It doesn't actually start the node daemon and just
configures SSH, nothing else.

This patch adds the cluster name as a field to the JSON structure and...

0232b768 10/19/2012 02:43 pm Michael Hanselmann

Compare significant fields only for simple SSH keys

For simple SSH keys, that is those without options such as
“command="…"”, only the first two parts need to be compared. The third
field is a free-form comment.

This patch changes the comparison used in...

9805aa82 10/19/2012 10:02 am Guido Trotter

Add instance uptime to monitoring info

This can be used to detect a reboot between two checks.

Signed-off-by: Guido Trotter <>
Reviewed-by: Bernardo Dal Seno <>

2f96c43c 10/18/2012 07:58 pm Michael Hanselmann

test/*.py: Replace '' with ""

There might be more, but at least replace all these low-hanging fruits.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

109e07c2 10/18/2012 02:38 pm Guido Trotter

Add cluster monitoring agent design document

This design addresses the lack of a uniform way to query ganeti nodes
for real time information that can be used by monitoring.

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

a8038349 10/18/2012 01:55 pm Iustin Pop

Remove custom OpResult type/monad

Since we now have the GeneralResult as a multi-purpose monad, we can
remove the custom OpResult monad, and just use 'GeneralResult
FailMode' as our type. This allows removal of a few bits of
specialised infrastructure, relying instead on the generic one....

a4b247f0 10/18/2012 01:52 pm Michael Hanselmann

Merge branch 'devel-2.6'

  • devel-2.6:
    ensure-dirs: Don't accept arguments
    ensure-dirs: Fix program name on usage screen
    cli: Fix small typo

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

fca74633 10/18/2012 01:43 pm Michael Hanselmann

ensure-dirs: Don't accept arguments

Before they would just be silently ignored.

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

8d77ac10 10/18/2012 01:43 pm Michael Hanselmann

ensure-dirs: Fix program name on usage screen

No string replacements are used, so doubling of the percent sign is not
necessary.

Before: Usage: %ensure-dirs [--full-run]
After: Usage: ensure-dirs [--full-run]

Signed-off-by: Michael Hanselmann <>...

29fbe62e 10/18/2012 12:14 pm Iustin Pop

Convert man page highlighting to standard RST

Instead of using the sphinx-specific highlight extension, which is not
parsed by Pandoc, let's switch to the standard RST directive, which
will be picked up and will result in slightly nicer man pages when
converted to HTML (in man output it remains the same)....

e1ff0de1 10/18/2012 12:14 pm Iustin Pop

Convert two more 'sh' highlight styles to 'shell-example'

This is straightforward; only one shell example remained, but as we
process the man pages via pandoc and not sphinx, it's not actually
used, we leave it as such for now.

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

1bf1ce3f 10/18/2012 12:11 pm Iustin Pop

Small improvements to the move-instance doc

While reading the docs, I saw that this is not converted to the shell
lexer, and that a few other small improvements can be done.

Signed-off-by: Iustin Pop <>
Reviewed-by: Helga Velroyen <>

707cd3d7 10/18/2012 12:11 pm Helga Velroyen

Use exitErr instead of explicit error message and exitWith

Furthermore, a few messages have their capitalisation changed (fixed).

Signed-off-by: Helga Velroyen <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

f9a51a21 10/18/2012 11:04 am Iustin Pop

Fix running of Haskell tests

Commit 21a5e56c forgot to rename a variable used in a conditional (of
course shell didn't complain about unused vars), so the AM_CONDITIONAL
was always false.

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

93be1ced 10/17/2012 07:53 pm Iustin Pop

Generalise the Result type

Currently, our error monad—Result—has a plain string error type. This
is not good, as we don't have structured errors, we can't pass back
proper error information to Python code, etc.

To solve this, we generalise this type as 'GenericResult a', and make...

659d769d 10/17/2012 07:45 pm Dato Simó

Merge branch 'devel-2.6' into master

  • devel-2.6:
    htools-excl.test: add test case for exclusion tags in hbal
    Instance.hs: rename 'tags' to 'exclTags', provide 'allTags'
    Group.hs: add 'allTags'; adjust loaders and test data for it
    Add hbal-excl-tags.data to Makefile.am, missed in 0397694...
90efd920 10/17/2012 06:44 pm Michael Hanselmann

cli: Fix small typo

s/it/if/

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Dato Simó <>
Reviewed-by: Helga Velroyen <>

b898de8f 10/17/2012 06:30 pm Dato Simó

Add hbal-excl-tags.data to Makefile.am, missed in 0397694

Signed-off-by: Dato Simó <>
Reviewed-by: Michael Hanselmann <>

6b6e335b 10/17/2012 04:13 pm Dato Simó

Group.hs: add 'allTags'; adjust loaders and test data for it

This commit adds a Group.allTags field to store the tags of node groups,
and teaches each loader backend in HTools to populate it (additionally, the
IAllocator class in lib/cmdlib.py now includes tags for groups too). Test...

2f907bad 10/17/2012 04:13 pm Dato Simó

Instance.hs: rename 'tags' to 'exclTags', provide 'allTags'

The mergeData function in Loader.hs included a step to filter an instance's
tags to include only the exclusion tags (as specified via the commandline,
or cluster-level tags). Later on, code in Node.hs assumed Instance.tags to...

0397694e 10/17/2012 04:13 pm Dato Simó

htools-excl.test: add test case for exclusion tags in hbal

In preparation for future modifications in the exclusion tags field, add a
test that verifies that exclusion tags are being honored: in a test cluster
with two instances of the same exclusion group in each node, hbal should...

18ccdced 10/17/2012 03:27 pm Iustin Pop

Fix small typo in NEWS file

Sorry, I didn't see this before pushing 5a7cb9d3…

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

a7862455 10/17/2012 02:56 pm Iustin Pop

Remove support for PUT in noded

This takes care of a FIXME; 2.6 already uses the new method, so we're
good during upgrades.

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

5a7cb9d3 10/17/2012 02:12 pm Iustin Pop

Ignore empty/comment lines in OS variants file

Per a conversation on :

- gnt-os diagnose ; gnt-os list take in consideration blank lines in
/etc/ganeti/instance-image/variants.list that could be confusing.

Let's fix this and also let's ignore comment lines....

e1c701e7 10/17/2012 02:12 pm Michael Hanselmann

gnt-job cancel: Confirmation and selection of jobs

New parameters, “--pending”, “--queued” and “--waiting”, are added to
select all jobs in the respective state. If one of those options is used
and “--force” is not given, the user is asked to confirm the operation....

a57b2bb7 10/17/2012 01:12 pm Michael Hanselmann

Update NEWS for file storage paths

Mention that the file is something new and should be written by
cfgupgrade.

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

7bb6e137 10/16/2012 06:13 pm Michael Hanselmann

Replace custom algorithm in constants unittest

There is no need for the “_IsUniqueSequence” function anymore, it can
easily be replaced by utils.FindDuplicates. Also, pass the message as a
keyword parameter and use the more commonly used assert* functions....

2ff01d78 10/16/2012 06:13 pm Michael Hanselmann

Design for remote command execution via RPC

This is a first design for executing commands via RPC.

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

04c998a5 10/16/2012 06:13 pm Michael Hanselmann

Makefile: Verify version of security.rst document

This document should be kept up-to-date.

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

1eaddbc6 10/16/2012 06:05 pm Michael Hanselmann

Add new constant for pending job status

This constant contains the job status' “queued”, “waiting” and
“cancelled”.

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

11f53fdb 10/16/2012 05:43 pm Michael Hanselmann

Merge branch 'devel-2.6'

  • devel-2.6:
    ensure-dirs: Fix permissions on master socket
    Update security document for version 2.6
    Update NEWS and bump version to 2.6.1
    Text.hs: update field lists in parseData comments

Conflicts:
NEWS: Trivial
lib/tools/ensure_dirs.py: constant moved to pathutils...

48e3db76 10/16/2012 05:38 pm Michael Hanselmann

ensure-dirs: Fix permissions on master socket

A socket shouldn't have its executable bit set.

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

3397d13e 10/16/2012 05:38 pm Michael Hanselmann

Update security document for version 2.6

Quite some things were out of date. Some formatting was also updated.

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

19e21a6c 10/16/2012 03:14 pm Iustin Pop

Add a very simple test rpc program

This only supports test delay for now, is not built by default (only
on demand), and is also not installed anywhere.

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

de2a5704 10/16/2012 03:14 pm Iustin Pop

confd: add the test_delay RPC call

Also add some more haddock structure to the module. The RPC call
itself is rather trivial.

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

4ab40ed5 10/16/2012 03:14 pm Iustin Pop

Add htools program code to hlint call

Currently only the libraries are added, but not the actual main binary
(usually short) code.

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

f98efa98 10/16/2012 01:06 pm Michael Hanselmann

Add design for changing node SSH setup

The goal is to remove the dependency on Paramiko.

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

ff8f0049 10/16/2012 12:47 pm Iustin Pop

confd: fix RpcVersion call

By accident, we sent the node object as call data in this rpc call,
instead the version request (i.e. nothing). This is due to the fact
that the 'call' data comes second, not first in the function argument.

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

01e52493 10/15/2012 07:56 pm Iustin Pop

Cleanup HTools.Types/BasicTypes imports

Before we reorganised the source tree, the 'Result' type was exported
from HTools/Types.hs. This changed during the reorg, but at that time
we didn't change the exports; instead, we kept re-exporting it from
the old module for compatibility....

4b945e1e 10/15/2012 05:03 pm Michael Hanselmann

Merge branch 'stable-2.6' into devel-2.6

  • stable-2.6:
    Update NEWS and bump version to 2.6.1

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

27e15be0 10/12/2012 07:17 pm Bernardo Dal Seno

Update NEWS and bump version to 2.6.1

This is a small bug-fix only release.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Guido Trotter <>

300e5450 10/12/2012 01:37 pm Michael Hanselmann

errors: Document arguments to QueryFilterParseError

Also fix one small mistake in the docstring for QuitGanetiException.

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

fc07a14e 10/12/2012 12:37 pm Michael Hanselmann

Fix distcheck after commit 7a962ec

I only ran “make check” and forgot about “distcheck”.

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

7a962ecc 10/12/2012 11:37 am Michael Hanselmann

Makefile/check-local: Ensure design document exists

This way a missing design document is detected.

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

97aac894 10/12/2012 11:37 am Michael Hanselmann

Add design document for version 2.7

- Move design document for batch instance creation into it
- Sort list of hidden files in index.rst

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

479197d5 10/11/2012 04:49 pm Bernardo Dal Seno

QA: TestAssignNodesIncludingSplit can be disabled

The test can now be enabled/disabled with the "group-rwops" flag.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Guido Trotter <>

6f058bf2 10/11/2012 04:49 pm Bernardo Dal Seno

QA: never put a master node offline

Before, it could happen that the master node was chosen to be set offline
in the "instance-remove-drbd-offline" test. Also changed a finally clause
to make sure that an exception while making the node online doesn't break...

e85be22a 10/11/2012 04:48 pm Bernardo Dal Seno

Add option to disable iallocator use in QA

By default some QA tests use iallocators. It is now possible to disable
iallocators in QA, so that QA doesn't force having iallocators set up.
The affected tests have now alternatives pathways.

Signed-off-by: Bernardo Dal Seno <>...

8bd977e9 10/11/2012 03:34 pm Sébastien Bocahu

Add support for cpu_cap and cpu_weight Xen params

This patch adds support for Xen's CPU scheduler 'cpu_cap' and
'cpu_weight' parameters.

Ganeti default values (cap: 0=unlimited, weight: 256) are Xen defaults.

cpu_cap is not validated correctly because of actual Ganeti limitation...

b0b8337a 10/11/2012 03:21 pm Dato Simó

Text.hs: update field lists in parseData comments

The comments in parseData had become out of date with the implementations
of load{Group,Node,Inst}. This commit updates the field list in comments to
match the implementations.

Signed-off-by: Dato Simó <>...

d5cc16d7 10/11/2012 01:53 pm Iustin Pop

Enable conversion of errors constants

These will be needed for the serialisation of errors.

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

47130d50 10/11/2012 01:05 pm Michael Hanselmann

LUClusterVerifyGroup: Localize virtual file paths

The check for file consistency didn't properly handle virtual paths
in case of a virtual cluster. This didn't cause any breakage as in
a standard virtual cluster setup with only one node all files are
visible for every node....

18049dad 10/11/2012 01:03 pm Iustin Pop

Cleanup haddock documentation a bit

While grepping for htools imports in the non-htools subdirectory, I
saw that our haddock prologue and title are very very old and refer to
the old htools-only state. Let's cleanup a bit…

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

4cd79ca8 10/11/2012 01:03 pm Iustin Pop

Cleanup network timeouts and htools imports

This patch removes the last HTools module imports from non-htools code
(the HTools.Types module), but it requires an associated cleanup:
using luxi-specific constants for luxi timeouts (the only effect is
that one timeout decreases from 15 to 10, the default value in the...

2d52359b 10/11/2012 01:03 pm Iustin Pop

Cleanup/expand the filter/query tests

This patch cleans up duplicate code in Test.Ganeti.Query.Filter and
then adds a test for names consistency with Python's code behaviour
(stable ordering for simple filters and otherwise niceSort'ed
ordering).

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

a2ae14e9 10/11/2012 01:03 pm Iustin Pop

Add a helper for query field checks

… and also use it to simplify 'needsLiveData'. Additionally, add an
explicit export list to Ganeti.Query.Types, since otherwise we'd
(re)export all imported symbols.

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

9fbf0098 10/11/2012 01:03 pm Iustin Pop

Enable query socket usage in gnt-node/gnt-group

This switches gnt-node/gnt-group (and their equivalent RAPI resources)
to go over the query socket.

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

cd67e337 10/11/2012 01:03 pm Iustin Pop

Add support for classic queries

This patch adds support for classic-style queries (before query2) to
the query socket server. The patch is rather trivial, since as in
Python we just piggy-back on the query2 implementation.

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

b3d17f52 10/11/2012 01:03 pm Iustin Pop

Add a makeSimpleFilter function

And associated unittests. This will be needed for classic-style
queries.

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

5227de56 10/11/2012 01:03 pm Iustin Pop

Fix the node powered field

When initially implementing the node query, I thought the 'powered'
field is a representation of the run-time powered status, which would
make its query complex.

In reality, it's a simple config query, which we can support
easily. We also add a small helper, so that we don't hardcode the...

b04dc242 10/11/2012 01:03 pm Iustin Pop

Simplify a bit queryFields

We don't add a type class for fully-generic handling, but we do
abstract the duplicate part.

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

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 <>

1fc3812c 10/11/2012 01:03 pm Iustin Pop

Switch ordering of names on query to niceSort

This makes the "all" names queries consistent with the Python
results. The change requires updating the unittests, at which point a
duplicate error message is simplified.

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

a41c337e 10/11/2012 01:03 pm Iustin Pop

Use the new name filtering behaviour in query

We do this not quite generically, which means we have to add
another layer in the call chain, and rename the current query
function, plus add special-case code for each query type. Hopefully we
will be able to improve on this in the future....

bc4cdeef 10/11/2012 01:03 pm Iustin Pop

Add functionality for checking validity of names

This replicates in the Haskell Query2 implementation the behaviour of
the Python code: if a "simple" filter is passed (one that contains
only Or aggregators and EQ binary ops on the name field), then an
failure is flagged if the given values are not known....

fe4f6dca 10/11/2012 12:56 pm Michael Hanselmann

vcluster: Don't virtualize /etc/hosts path

/etc/hosts is a bit special as it's a system-wide file and the virtual
cluster/node root doesn't apply. The modification of /etc/hosts should
be disabled in virtual clusters. If it isn't, however, the vcluster
functions would raise an exception complaining about a path outside of...

36683bad 10/11/2012 12:56 pm Michael Hanselmann

vcluster-setup: Stop hardcoding /etc/hosts

… use a constant instead.

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

48967eb0 10/11/2012 12:56 pm Michael Hanselmann

qa_utils: Stop hardcoding path to /etc/hosts

- Simplified shell command for adding hosts, too
- The exception handling is also improved by re-raising any exceptions
instead of swallowing qa_error.Error

Signed-off-by: Michael Hanselmann <>...