Statistics
| Branch: | Tag: | Revision:

root @ 416eba57

# Date Author Comment
416eba57 10/08/2012 02:07 pm Iustin Pop

Improve the confd man page

This was a very very thin man page; this patch expands it a bit, but
it could use more help still.

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

ecebe9f6 10/08/2012 02:07 pm Iustin Pop

Split the OptComplNumeric into integer/float ones

This allows the command completion to treat them as separate option
types; this is not useful in build-bash-completion right now, but
might become so in the future.

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

f8d01158 10/08/2012 02:06 pm Iustin Pop

Enable bash completion for Haskell daemons too

This requires a few tiny changes to build-bash-completion and to
Makefile rules, but is straightforward.

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

22278fa7 10/08/2012 02:06 pm Iustin Pop

Define the actual arguments that are supported by programs

This defines the arguments supported and then modifies the
--help-completion output to include them too.

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

fad06963 10/08/2012 02:01 pm Iustin Pop

Support the new option types in build-bash-completion

Beside parsing the arguments as well, we also change the serialisation
format for choices/suggests, to make the Python code simpler.

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

a6cdfdcc 10/08/2012 02:01 pm Iustin Pop

Add support for arguments in --help-completion

This extends the current option-only support with support for
arguments too. They are serialised without a without the prefix (so
just with the type) and the min/max ranges (max="none" for unlimited).

A few new option types have been added as well....

dad26941 10/08/2012 12:52 pm Iustin Pop

A few cleanups in Makefile.am

A lot of the lists in Makefile.am were not sorted properly (or at
all); let's sort them for more sanity.

Additionally, check-local used to spew this big shell block, even
though it does emit nice messages when failing, so we don't need to...

db154319 10/08/2012 12:41 pm Iustin Pop

Add missing ipolicy field

This was missing so far…

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

6b84f036 10/08/2012 12:39 pm Iustin Pop

Fixup TAGS generation with newer GHC

Newer GHC refuses to allow "-O" with interactive mode, so let's filter
that out. Furthermore, sometimes you don't have a clean tree exactly
when you need to look up something/update the tags, so let's filter
out the "-Werror" too....

a5b270c5 10/08/2012 12:38 pm Iustin Pop

Remove qualified import of Utils.hs into its test module

This is a leftover from the times when we had a single, huge test
module; nowadays it's only an annoyance.

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

26d62e4c 10/08/2012 12:35 pm Iustin Pop

Rename Ganeti/HTools/Utils.hs to Ganeti/Utils.hs

This is, I believe, the last non-htools specific file that still lived
in the htools directory; it's already widely used in non-htools code,
so let's move it before we add more functionality to this module....

8a6dbce8 10/05/2012 11:34 pm Michael Hanselmann

bdev: Remove unnecessary empty line

My local pylint didn't complain.

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

3439fd6b 10/05/2012 07:27 pm Michael Hanselmann

Check fingerprint of file with allowed file storage paths

This makes differences show up in “gnt-cluster verify”.

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

1a770ce5 10/05/2012 07:23 pm Bernardo Dal Seno

Document the support for default iallocator

Updated the man pages for the commands that accept an iallocator: "." means
the default iallocator.

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

cc4b14f0 10/05/2012 07:23 pm Bernardo Dal Seno

Instance QA uses default iallocator

QA for recreate-disk and replace-disks now run also with the default
iallocator.

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

52ecc063 10/05/2012 07:23 pm Bernardo Dal Seno

Support for the default iallocator in replace-disks

"gnt-instance replace-disks" now behaves like the other commands, and uses
the default iallocator when "." is passed as the iallocator parameter.

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

43a8f36a 10/05/2012 07:23 pm Bernardo Dal Seno

Explicitly ask for the default iallocator in commands

Now "gnt-instance recreate-disks" uses the default iallocator when "." is
specified as the iallocator. For uniformity, the same behavior applies to
these commands:
gnt-node evacuate
gnt-instance migrate...

fbdac0d9 10/05/2012 07:22 pm Michael Hanselmann

bdev: Add functions to verify file storage paths

- LoadAllowedFileStoragePaths: Loads a list of allowed file storage
paths from a file
- CheckFileStoragePath: Checks a path against the list of allowed paths

The unit test for “utils.IsBelowDir” is updated with cases which weren't...

04569469 10/05/2012 06:46 pm Michael Hanselmann

jqueue: Look at archived jobs when watching

First: This enables the use of “gnt-job watch $id” for archived jobs.

Now, the reason for actually making this work is that during
sufficiently large group or node evacuations jobs are archived before
the client gets to poll for their output. This led to situations where...

4ff32a35 10/05/2012 03:16 pm Bernardo Dal Seno

Design doc for partitioned Ganeti

Partitioned Ganeti allows to assign node resources in an exclusive manner,
in order to limit interference between instances running on the same nodes.

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

63a3d8f7 10/05/2012 05:17 am Michael Hanselmann

backend: Check for shared storage also

If normal file storage was disabled but shared storage enabled,
“_TransformFileStorageDir” would still throw an exception.

in “opcodes._CheckStorageType” there's also a check, but I wasn't quite
sure what the correct way of handling it was, so I added a TODO comment....

6a9b9778 10/05/2012 04:52 am Michael Hanselmann

utils.FilterEmptyLinesAndComments: Return list

We don't use generators often and lists are easier to re-use.

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

555b6cb1 10/05/2012 04:50 am Michael Hanselmann

Improve disk wipe unit test

- Don't hardcode node name in some places
- Don't define functions inside functions
- Simplify code for testing with and without offset, this is now in two
separate tests

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

fa8ef9d6 10/05/2012 04:50 am Michael Hanselmann

Wipe added space when growing disks

This patch adds code to wipe newly added disk space when growing disks
using “gnt-instance grow-disk”. “New disk space” is defined as the delta
between the old block device size (not necessarily equal to the amount
recorded in the configuration) and the new recorded size. Extra caution...

129cce69 10/05/2012 04:50 am Michael Hanselmann

Add unit tests for cmdlib._WipeDisks

This is in preparation for adding disk wipe on growing disks.

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

1be3e86c 10/04/2012 06:00 pm Michael Hanselmann

Add unit test for FilterEmptyLinesAndComments

I somehow forgot this in the previous patch.

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

461eb201 10/04/2012 05:58 pm Michael Hanselmann

cmdlib._WipeDisks: Code formatting

- LogInfo takes *args, no need to replace values right away
- Don't overwrite wipe_chunk_size right after it's been set

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

2cbe9af3 10/04/2012 04:42 pm Michael Hanselmann

Factorize removing comments and empty lines from string

This will also be used for verifying the file storage directory.

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

5506d7a9 10/04/2012 04:58 am Michael Hanselmann

ssconf: Fix mistake made in commit ee501db

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

ee501db1 10/04/2012 04:38 am Michael Hanselmann

Move a function from backend to ssconf

The “WriteSsconfFiles” function is used to write ssconf files. By moving
it we can avoid importing backend into bootstrap. The latter is imported
by CLI programs and backend doesn't have much to do with them.

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

33e26038 10/03/2012 08:00 pm Michael Hanselmann

cmdlib: Change wording of messages during disk wipe

Error messages don't need to say “please” and it's already obvious some
investigation is needed. LogWarning already logs the message using
“logging.error” internally.

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

0188611b 10/03/2012 06:03 pm Michael Hanselmann

Remove constant for disk wipe block size

It is dangerous to have this block size as a global constant as that
could give the impression of it being easily changed. Doing so without
further adjustments to how “dd” is called will lead to disks not being
wiped properly....

3d8ae327 10/03/2012 03:06 am Michael Hanselmann

LUClusterVerify: Ignore /proc/drbd if DRBD is disabled

This fixes issue 190. The problem was that the check for DRBD was
enabled if LVM storage is used and didn't depend at all on whether DRBD
is enabled.

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

d971402f 10/02/2012 10:35 pm Michael Hanselmann

cli: Exit with status 0 for --help

This patch is somewhat longer than was anticipated. Before, commands like
“gnt-instance --help” would exit with the status code 1 (failure). With
this patch, those commands exits with 0 (success) while unknown commands
still print the usage screen and exit with status 1....

b0dcdc10 10/02/2012 08:44 pm Iustin Pop

Remove the python confd server side code

In 2.7 we will only support the Haskell version, if enabled.

Since the original hconfd enabling was a bit hack-ish (copying over
the actual installed ganeti-confd, Python version), the Makefile.am
changes are a bit more involved than just the removal of the Python...

04520998 10/02/2012 08:44 pm Iustin Pop

Remove option to select the Python version of confd

This will need some more configure.ac checks for required libraries,
which will come later with the Haskell dependencies reorganisation.

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

ab171697 10/02/2012 08:41 pm Michael Hanselmann

Add first version of virtual cluster documentation

- Add document describing virtual clusters
- Non-root clusters are not yet described, will be done in another
patch
- Change title of design document to avoid confusion

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

d04d998b 10/02/2012 07:18 pm Michael Hanselmann

INSTALL: Typo, missing dependency

libghc-utf8-string-dev was missing.

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

7ebadeb3 10/02/2012 01:34 pm Bernardo Dal Seno

Always distribute ganeti.utils.io_unittest-runasroot.py

Tests that depend on fakeroot were not distributed in the tarball created
by "make dist" when fakeroot was missing. Now all tests are distributed,
and a warning is printed when a test requires fakeroot but fakeroot is...

a6d3644b 10/02/2012 06:12 am Michael Hanselmann

vcluster-setup: Watcher, init script

- Generate a wrapper script for ganeti-watcher
- Provide command line option to specify init script

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

1266a29b 09/28/2012 06:29 pm Michael Hanselmann

vcluster-setup: Add more parameters to "gnt-cluster init"

This patch also adds two new parameters to the vcluster-setup script to
not configure /etc/hosts and networking. Build-time variables are now
used for paths.

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

3779121c 09/28/2012 06:11 pm René Nussbaumer

Pylint cleanup

The previous commits introduced some pylint errors.

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

2f441f72 09/28/2012 04:30 pm Michael Hanselmann

Add support for GANETI_ROOTDIR in Haskell code

unsafePerformIO is required to go from the IO monad to pure code.

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

b0a8e8c2 09/28/2012 04:05 pm René Nussbaumer

Modify batch-create to use MultiAlloc

This is the CLI part of the OpInstanceMultiAlloc change. There is some
room for improvement especially with user handling, but it works for now
and the code got simplified significantly.

QA tests still needs to be written....

68b2e985 09/28/2012 04:05 pm René Nussbaumer

Make validation error message more useful

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

9bc5ac44 09/28/2012 04:05 pm René Nussbaumer

Provide a custom Validate for OpInstanceMultiAlloc

This is needed, as we're not strictly separating validation from
populating the defaults. We do this all in one function. If we now
receive a non complete OpInstanceCreate opcode in instances, we would
run into AttributeErrors on those....

2958c56e 09/28/2012 03:16 pm Michael Hanselmann

ganeti-cleaner: Separate queue cleaning code

This code does not need to run as root, therefore it's better to split
it out. It is now run with the same permissions as the master daemon.

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

052783ff 09/28/2012 03:14 pm Michael Hanselmann

Stop hardcoding root user

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

3d3f562b 09/28/2012 12:27 pm Agata Murawska

Remove explicit recursion from sanitizeDictResults

Since ERpcError is still not a monad, a simple foldr will have to
do for now.

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

70c2362e 09/28/2012 12:27 pm Agata Murawska

Pretty printing JSValue

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

0ae9ddc4 09/28/2012 12:27 pm Agata Murawska

Merge parseHttpResponse with rpcResultParse

parseHttpResponse is such a simple function that we can actually
do the entire unpacking in rpcResultParse.

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

7328a28c 09/28/2012 12:27 pm Agata Murawska

Simplify and generalize rpcResultFill

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 <>
Reviewed-by: Iustin Pop <>

a93b711b 09/28/2012 12:27 pm Agata Murawska

Remove monadic results wherever possible

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 <>
Reviewed-by: Iustin Pop <>

274366e5 09/28/2012 12:27 pm Agata Murawska

Realign instances of typeclasses

As per Iustin's suggestion, this patch aligns parts of typeclass
instance on "=".

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

60443f61 09/28/2012 12:27 pm Agata Murawska

Rename RpcError -> String function

As per Iustin's suggestion, show is not a good solution - so instead
the name is now explainRpcError.

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

6e3bf290 09/27/2012 07:10 pm Michael Hanselmann

Cleanup of build-time shell variable replacements

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

6a5e841d 09/27/2012 07:10 pm Michael Hanselmann

ensure-dirs: Don't hardcode ssconf file group

Otherwise chown(2) will fail when noded doesn't run as root.

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

e5afb848 09/27/2012 07:09 pm Michael Hanselmann

Fix distcheck after commit 29386d3ee

Missing backslash.

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

ec944cc0 09/27/2012 06:36 pm Bernardo Dal Seno

InstanceRecreateDisks: new assertion for node locks

Make sure that all the nodes where a disk operation is peformed are locked.

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

cf8adf26 09/27/2012 06:36 pm Bernardo Dal Seno

Fix missing locks in InstanceRecreateDisks

In case of in-place recreate-disks operation, all node locks were released
before starting the actual execution.

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

29386d3e 09/27/2012 06:26 pm Michael Hanselmann

Add vcluster-setup utility

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

39b8cd94 09/27/2012 05:46 pm Michael Hanselmann

ensure-dirs: Don't convert list to tuple

Tuples are data structures, not containers.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

bb514a22 09/27/2012 05:43 pm Michael Hanselmann

daemon-util: Use function to determine if confd is enabled

… instead of comparing with two different values in two placse.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

370f2768 09/27/2012 04:02 pm Michael Hanselmann

cfgshell: Remove pylint disable line

Commit 326830963 removed the use of a private member function. Also
replace '' with "" in one place.

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

915faf72 09/27/2012 02:42 pm René Nussbaumer

Adding RAPI client for instance multi allocation

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 <>
Reviewed-by: Michael Hanselmann <>

e5ff1a47 09/27/2012 02:42 pm René Nussbaumer

Populate the instance dict with opcode infos

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

3a6a89d7 09/27/2012 01:46 pm Michael Hanselmann

Revert unintentional change of daemon log file names

Commit 3329f4dea6 unintentionally changed the filenames of all daemon
log files. This patch reverts part of those changes.

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

e8ae48e2 09/27/2012 01:06 pm Michael Hanselmann

Fix bad wording in 2.3 design document

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

5188fdb7 09/26/2012 07:35 pm Agata Murawska

InstanceInfo RPC call

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

1cb97324 09/26/2012 07:35 pm Agata Murawska

instance_info now returns vcpus

instance_info and all_instances_info calls had different per-instance
return types, this commit fixes the mismatch.

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

47163f0f 09/26/2012 07:35 pm Agata Murawska

Change RpcResult typeclass

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

8779d21a 09/26/2012 07:35 pm Agata Murawska

Version RPC call

Implementation of node version query.

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

cca4e6fe 09/26/2012 07:35 pm Agata Murawska

Node query now uses live data

Added support for NodeInfo RPC call as source of data for node query.

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

7f0fd838 09/26/2012 07:35 pm Agata Murawska

Node query now collects live fields

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 <>
Reviewed-by: Iustin Pop <>

fa2c927c 09/26/2012 07:35 pm Agata Murawska

Add live parameter to query

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

4393e075 09/26/2012 07:35 pm Agata Murawska

Conversion from RPC error to query status

Simple conversion for queries that use live fields gathered from
RPC calls.

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

77cab679 09/26/2012 07:34 pm Agata Murawska

Json helper for node query

This is a helper function that gets the JSON encoding of the first
element of the list (if possible).

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

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

Create ResulT for monad transformations

This patch creates ResultT, a monad transformation used later in
RPC <-> query integration.

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

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

Tests for NodeGroup query

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

40246fa0 09/26/2012 07:34 pm Agata Murawska

NodeGroup query in Haskell

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

9b09c0be 09/26/2012 07:34 pm Agata Murawska

Fix RPC call and result (de)serialization

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

599239ad 09/26/2012 07:34 pm Agata Murawska

Add alias for Either RpcError a

This was repeated a lot, so we should abstract this into a type.

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

6fddde87 09/26/2012 07:34 pm Agata Murawska

Cleanup for RPC errors

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 <>
Reviewed-by: Iustin Pop <>

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

Change cluster's hypervisors type

We now have Hypervisor type in Objects, might just as well use it.

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

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

Correct top comment in Query/Server

I assumed this was a copy-paste+forgetting to change the header comment.

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

7766de33 09/26/2012 07:34 pm Agata Murawska

Add nodedCertFile to Path

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 <>
Reviewed-by: Iustin Pop <>

579f4ee5 09/26/2012 03:57 pm René Nussbaumer

Verify the node count just if the allocation was successful

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

ada0e680 09/26/2012 02:19 pm Iustin Pop

Enable bash completion for htools scripts

This patch ties together the previous commits, by extending
build-bash-completion to call all htools scripts and get their
completion information, then use that to build fake cli_options
representing them and finally generate the bash completion...

097ad7ee 09/26/2012 02:18 pm Iustin Pop

Add option for displaying completion information

This patch adds support for a --help-completion option, which will
display the defined options and their completion information, in a
format designed to be parsed easily from Python, for integration into
build-bash-completion....

ce207617 09/26/2012 02:18 pm Iustin Pop

Annotate options with completion information

This is a quite boring patch, just adding annotation information to
all existing options. Some of the annotations are not very good; but
we don't have support for more precise completion in
build-bash-completion, so this is good enough....

f5af3409 09/26/2012 02:18 pm Iustin Pop

Add a data type for completion information

This can be used for either option or argument completion (although
OptComplNone doesn't make sense for an argument :).

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

42834645 09/26/2012 02:18 pm Iustin Pop

Remove generic options from individual programs

Currently, we test and require that each individual program (hbal,
etc.) defines/supports the generic options (currently --help and
--version). Even with the test, this is not optimal, since it requires
changes in many places whenever we modify the list of generic options,...

d1da5a45 09/26/2012 12:46 pm Iustin Pop

Add printing of group score in hinfo

The global cluster score is less interesting than individual group
scores, for multi-group allocation purposes.

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

da28218d 09/26/2012 12:46 pm Iustin Pop

Replace a big tuple with a custom data type

This will make it easier to add new parameters.

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

cffbbae7 09/25/2012 05:28 pm Michael Hanselmann

Implement virtual cluster support in Python code

- pathutils: Prepend node-specific prefix path
- RPC: Use virtual paths (see vcluster.py)
- SSH: Pass environment variables, use destination's node directory when
copying files using scp, use GANETI_HOSTNAME to determine hostname...

9340cc2b 09/25/2012 05:20 pm Michael Hanselmann

vcluster: Add more details to docstrings

As requested by René Nussbaumer. Hopefully things are more clear now.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

92886204 09/25/2012 03:19 pm Michael Hanselmann

Add tests for bash completion

Given the number of settings that need to be controlled a plain bash
script was a better choice over shelltestrunner. Just a few completions
are attempted, but among them should be the most critical ones (e.g.
“gnt-instance add --node …”....

fe19a355 09/25/2012 02:14 pm Michael Hanselmann

Fix shelltests for ganeti-*

They were never run.

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

893ad76d 09/25/2012 02:14 pm Michael Hanselmann

bash_completion: Enable extglob while parsing file

In older versions of GNU Bash extended patterns, such as “@(…)”, are only
available with the “extglob” shell option. As pointed out in [1] and [2],
“extglob” must be enabled while parsing the code. Therefore the flag must be...