Statistics
| Branch: | Tag: | Revision:

root @ 031a3e57

# Date Author Comment
031a3e57 09/15/2009 02:19 pm Michael Hanselmann

Move OpCode processor callbacks into separate class

There are two major arguments for this:
- There will be more callbacks (e.g. for lock debugging) and extending the
parameter list is a lot of work.
- In the jqueue module this allows us to keep per-job or per-opcode variables in...

f60759f7 09/14/2009 03:20 pm Iustin Pop

Replace last hardcoded 'nodelist' with NV_NODELIST

LUAddNode has this usage remaining, as it's the only other LU to use
call_node_verify (beside LUVerifyCluster).

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

33f2a81a 09/14/2009 03:20 pm Iustin Pop

Treat virtual LVs as inexistent

Currently, “gnt-cluster verify” and “gnt-cluster verify-disks” use the
list of LVs as returned by backend.GetVolumeList to determine whether an
LV exists or not. However, LVs can also be ‘virtual’, which is handled
correctly (i.e. as missing) by the bdev code, but not by this function....

9216a9f7 09/14/2009 02:21 pm Michael Hanselmann

locking: Acquire SharedLock in shared mode in separate function

This is for some more symetry with
SharedLock.__exclusive_acquire.

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

fe89794e 09/14/2009 02:17 pm Michael Hanselmann

RpcResult: Fix cases where “failed” wouldn't be set to True

This broke “gnt-instance replace-disks --auto” when the instance
is down.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

ea205dbc 09/14/2009 02:16 pm Michael Hanselmann

locking: Add level name dict

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

4d5fe81b 09/14/2009 01:31 pm Michael Hanselmann

Merge commit 'origin/next' into branch-2.1

  • commit 'origin/next':
    Fix gnt-node modify online help
    Fix gnt-job info entry in gnt-job(8)
    locking: Don't swallow exceptions
    Add check for duplicate MACs in instance add
    scripts/gnt-node: fix a help string...
4a511fd0 09/14/2009 01:15 pm Guido Trotter

Fix gnt-job info entry in gnt-job(8)

It currently reports "cancel" in its syntax, which is obviously a
cut&paste error.

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

b3fd544f 09/14/2009 01:15 pm Guido Trotter

Fix gnt-node modify online help

This completes what was began in commit
862b1b2b4c698cec8ad816793172fac9aa7f4cdf

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

470ce2ee 09/11/2009 06:29 pm Michael Hanselmann

locking: Don't swallow exceptions

This is an indentation bug.

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

b757f830 09/11/2009 05:34 pm Michael Hanselmann

check-python-code: Report EOL whitespace

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

eed5c5df 09/11/2009 05:33 pm Michael Hanselmann

Check for tabs and long lines in Python code

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

88258349 09/11/2009 05:33 pm Michael Hanselmann

.gitignore: Ignore distcheck directories

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

4d4a651d 09/11/2009 05:33 pm Michael Hanselmann

Wrap lines over 80 characters

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

aa053071 09/11/2009 05:33 pm Michael Hanselmann

cmdlib: Fix typo in variable name

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

01a3a718 09/11/2009 12:43 pm Michael Hanselmann

Makefile: Move lengthy variable list to separate variable

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

e948770c 09/10/2009 07:01 pm Michael Hanselmann

Move LoadModule function to ganeti.build

It should only be used at build-time.

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

f9897b6d 09/10/2009 07:01 pm Michael Hanselmann

Add new ganeti.build namespace

This will be used to store build-time Python code.

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

53a9ecb7 09/09/2009 04:50 pm Michael Hanselmann

upload: Use more compatible regular expression

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

640b961e 09/09/2009 12:46 pm Luca Bigliardi

mcpu: formatting/indenting fix

Small fix for a mistake done by bad editor settings.

Signed-off-by: Luca Bigliardi <>

87e43988 09/08/2009 06:22 pm Iustin Pop

Add check for duplicate MACs in instance add

Currently LUAddInstance doesn't check for duplicate MACs, and it fails
during the Exec() phase when trying to add the instance to the config
(ConfigWriter checks for this). This patch copies the code from
LUModifyInstance (which already does it)....

862b1b2b 09/07/2009 06:40 pm Guido Trotter

scripts/gnt-node: fix a help string

gnt-node modify says it wants an "<instance>". Changing it to
"<node_name>" as for the other commands.

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

009e73d0 09/07/2009 04:38 pm Iustin Pop

Optimise multi-job submit

Currently, on multi-job submits we simply iterate over the
single-job-submit function. This means we grab a new serial, write and
replicate (and wait for the remote nodes to ack) the serial file, and
only then create the job file; this is repeated N times, once for each...

9d95c3af 09/07/2009 03:43 pm Iustin Pop

Extend gnt-debug with more debugging options

This patch extends gnt-debug to be able to submit multiple copies of the
input jobs and job contents, in order to simplify testing. It also adds
a timing mode, and splits the execution into separate submit and...

2d3ed64b 09/04/2009 06:58 pm Michael Hanselmann

Add bash completion for --node node1[:node2]

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

5b0ca9d4 09/04/2009 06:58 pm Michael Hanselmann

Add more debugging to bash completion

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

36bf7973 09/04/2009 06:11 pm Michael Hanselmann

Add simple unittest for manpages

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

4b339d4c 09/04/2009 06:11 pm Michael Hanselmann

Fix small error in gnt-job manpage

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

9725b53d 09/04/2009 06:11 pm Michael Hanselmann

Add locking doc to Ganeti documentation

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

667161b4 09/04/2009 06:11 pm Michael Hanselmann

Add ipsec hook to .gitignore

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

016d04b3 09/03/2009 08:32 pm Michael Hanselmann

Even more style fixes

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

1e37ad45 09/03/2009 08:32 pm Michael Hanselmann

KVM hypervisor: Use ReadFile

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

d73ef63f 09/03/2009 06:45 pm Michael Hanselmann

A few style fixes

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

508e9b20 09/03/2009 06:45 pm Michael Hanselmann

Add RAPI resource to redistribute config

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

bf968b7f 09/03/2009 06:45 pm Michael Hanselmann

Add simple unittest for remote API docs

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

f72542cc 09/03/2009 06:45 pm Michael Hanselmann

rapi doc: Add …/nodes/[name] and …/instances/[name]/reinstall

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

3f991867 09/03/2009 06:44 pm Michael Hanselmann

Add simple unittest for hooks documentation

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

6c6b7f8a 09/03/2009 06:44 pm Michael Hanselmann

Update hooks documentation

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

d6f5892b 09/03/2009 06:44 pm Michael Hanselmann

Move LoadModule function to utils

It can be used by unittests for daemons/* or scripts/*.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

2a887df9 09/03/2009 06:44 pm Michael Hanselmann

utils.CalculateDirectorySize: Don't redefine builtin

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

13998ef2 09/03/2009 06:43 pm Michael Hanselmann

Use ReadFile/WriteFile in more places

This survived QA, burnin and unittests.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

a2442bf9 09/02/2009 02:05 pm Luca Bigliardi

Makefile: add IPsec hook

Enable creation and dist for IPsec hook.

Signed-off-by: Luca Bigliardi <>

d1e95dde 09/02/2009 02:05 pm Luca Bigliardi

Example IPsec hook

This hook is a simple example which automatically configures a basic IPsec link
among all the nodes of a cluster.

Signed-off-by: Luca Bigliardi <>

28b498cd 08/31/2009 07:23 pm Michael Hanselmann

gnt-cluster watcher: Show more information

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

48166551 08/31/2009 06:43 pm Guido Trotter

confd: add cluster master query

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

0bc8432b 08/31/2009 06:43 pm Guido Trotter

confd/querylib: fix docstrings

They were cut&paste from the first example queries, rather than
documenting the current ones.

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

a544f755 08/31/2009 06:43 pm Guido Trotter

confd: avoid spamming the logfile

When confd is disabled we don't want to be noticed every timer interval.

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

73a465ee 08/31/2009 06:43 pm Guido Trotter

Remove SimpleConfigReader.GetHypervisorType

We haven't had that config file entry for a while.

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

a4913296 08/31/2009 04:57 pm Michael Hanselmann

Merge commit 'origin/next' into branch-2.1

  • commit 'origin/next':
    Return cluster tags from LUQueryClusterInfo

Conflicts:
lib/cmdlib.py: Trivial

7a2ba406 08/31/2009 04:05 pm Luca Bigliardi

Replace BINDIR variable as well

Add bindir to the list of variables replaced at make time.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Michael Hanselmann <>

c118d1f4 08/31/2009 01:32 pm Michael Hanselmann

Return cluster tags from LUQueryClusterInfo

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

1bc6ab94 08/31/2009 12:57 pm Michael Hanselmann

devel/upload: Build in parallel

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

5c566e17 08/28/2009 06:35 pm Michael Hanselmann

Merge branch 'next' into branch-2.1

  • next:
    Add script to clean archived jobs after 21 days
    rapi: export more static node information
    Pass the correct signal to handlers
    cli: Use ToStdout/ToStderr instead of print
    Fix small typo in gnt-node
    Simplify handling of boolean args in rapi...
a52ba89d 08/28/2009 06:24 pm Michael Hanselmann

Add more bash completion metadata for options

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

63d44c55 08/28/2009 06:24 pm Michael Hanselmann

Bash completion: Implement dynamic option value completion

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

30d44392 08/28/2009 06:24 pm Michael Hanselmann

Bash completion: Add function to get all iallocators

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

d4b94fe8 08/28/2009 06:24 pm Michael Hanselmann

Bash completion: Simplify option completion

This makes the output file quite a bit smaller and is needed
in preparation for non-static option completion (e.g. list of
nodes).

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

632d5090 08/28/2009 06:24 pm Michael Hanselmann

Bash completion: Support for --foo=bar option format

That is with the equal sign.

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

580ef58d 08/28/2009 06:24 pm Michael Hanselmann

Bash completion: Small optimizations

$2 doesn't contain the correct value when completing something like
"--disk-template=…". Getting it via COMP_WORDS is better.

Short options (e.g. -I) can't have an equal sign.

Also add useful debugging commands for development....

aca55e15 08/28/2009 06:24 pm Michael Hanselmann

Fix QA test for “gnt-node evacuate”

Before the arguments weren't valid.

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

05f1ebf3 08/28/2009 05:44 pm Guido Trotter

Move SimpleConfigReader creation to ConfdProcessor

This will be useful to make ConfdProcessor aware of a config failure,
without quitting confd.

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

e369f21d 08/28/2009 05:44 pm Guido Trotter

ConfdProcessor: add disabled state

This is a state the processor will get in, if it fails to load the
config.

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

c6259dbc 08/28/2009 05:44 pm Guido Trotter

confd: start in polling mode

This allows us not to enable the inotify handler immediately, and thus
to make it easier for us should the config file not exist at all.

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

22d3e184 08/28/2009 05:44 pm Guido Trotter

Confd: don't fail if the config doesn't load

Rather than quitting we'll just continue to poll the config at a slow
rate, hoping that sooner or later we'll get it back. This allows also
working on non-MC nodes, and smoothly transitioning from MC to non-MC,...

176d3122 08/28/2009 05:44 pm Guido Trotter

confd: s/confd_event_handler/inotify_handler/

In a case we don't encounter frequently (file modified but not
overwritten) the notify handler we use is called with a wrong name.

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

fc3fd894 08/28/2009 05:43 pm Michael Hanselmann

Add script to clean archived jobs after 21 days

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

e2be81cf 08/28/2009 02:17 pm Guido Trotter

Implement timers in confd

Timers are used both for checking for inotify failures, and for polling,
should inotify notices become too frequent.

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

84c3ab28 08/28/2009 02:08 pm Guido Trotter

constants: add confd reload and rate limit times

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

ef4ca33b 08/28/2009 02:08 pm Guido Trotter

ConfdInotifyEventHandler.enable: use InotifyError

Rather than raising ConfdFatalError directly
ConfdInotifyEventHandler.enable raises InotifyError should it not be
able to configure inotify, allowing the caller to decide what to do.

Signed-off-by: Guido Trotter <>...

589dee9a 08/28/2009 02:07 pm Guido Trotter

Add errors.InotifyError

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

4afe249b 08/28/2009 02:07 pm Guido Trotter

ConfdInotifyEventHandler, move to a callback

ConfdInotifyEventHandler used to reload the config whenever a
notification arrived. Moving to a callback system, so that
ConfdConfigurationReloader can be responsible for that functionality.

Additionally the inotify class no longer reenables itself automatically,...

562bee4d 08/28/2009 02:07 pm Guido Trotter

Move creation of inotify handler to a new class

This class will be responsible for managing inotify notifications,
timers, and rate-limiting reloads. For now none of these features is
implemented. :)

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

46c9b31d 08/28/2009 02:06 pm Guido Trotter

ConfdInotifyEventHandler: add enable/disable

Make possible to enable and disable the inotify event handler. The
inotify handler will remain enabled, unless explicitely told to disable
itself.

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

d4c1bd12 08/28/2009 02:06 pm Guido Trotter

SimpleConfigReader: handle stat() errors

Also, catch EnvironmentError, rather than IOError, when trying to read
the file.

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

bcb66fca 08/27/2009 06:21 pm Iustin Pop

Encode the actual exception raised by LU execution

Currently, the actual exception raised during an LU execution (one of
OpPrereqError, OpExecError, HooksError, etc.) is lost because the
jqueue.py code simply sets that to a str(err), and the code in cli.py...

6956e9cd 08/27/2009 06:21 pm Iustin Pop

Move the luxi error handling into errors.py

Currently the luxi error handling is hardcoded as special encoding on
the masterd-side and special decoding on the client side. This patch
moves it to errors.py such that other parts of the code can reuse the
same encoding....

5cbe43a5 08/26/2009 08:05 pm Michael Hanselmann

Remove watcher pause file 1h past end time

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

3753b2cb 08/26/2009 07:09 pm Michael Hanselmann

ganeti-watcher: Don't run if paused

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

95b2e626 08/26/2009 07:09 pm Michael Hanselmann

gnt-cluster: Add CLI for watcher pause

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

05e50653 08/26/2009 07:09 pm Michael Hanselmann

Add file to pause watcher for a certain duration

This can be used during maintenance work.

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

dff85078 08/26/2009 07:09 pm Michael Hanselmann

cli._Argument: Remove unused, optional “suggest” parameter

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

5431eff1 08/26/2009 07:08 pm Michael Hanselmann

bash completion: Allow arguments with min < max arguments

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

ed0efaa5 08/26/2009 06:34 pm Michael Hanselmann

ganeti-masterd: Master voting in separate process

One shouldn't fork a Python process after using threads. Master
voting is done before forking (utils.Daemonize), but it also uses
threads. Hence it's now called from a separate process.

This patch also fixes the check function to actually exit if...

8a20c732 08/26/2009 06:34 pm Michael Hanselmann

ganeti-masterd: Add helper to run function in separate process

This will be used to do the master voting.

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

ec2c2bc4 08/26/2009 03:46 pm Luca Bigliardi

GenerateSecret: specify the length of the secret

Add a parameter to specify the length of the bytes sequence represented by the
returned hex string. Defaulting to 20 so it's compatible with previous SHA1
hash.

Signed-off-by: Luca Bigliardi <>...

37972df0 08/26/2009 03:14 pm Michael Hanselmann

cmdlib: Add some messages to LUExportInstance

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

6c948699 08/25/2009 07:00 pm Michael Hanselmann

Style fixes for ganeti-*

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

bcb1a39e 08/25/2009 06:53 pm Michael Hanselmann

ganeti-noded: Close listening socket in child

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

b2c750a4 08/25/2009 06:51 pm Luca Bigliardi

LUDestroyCluster: hooks support

We're going to call hooks from its Exec method so LUDestroyCluster has to
support them.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Michael Hanselmann <>

3141ad3b 08/25/2009 06:51 pm Luca Bigliardi

LUDestroyCluster: run hooks

Run post hooks on master node before it's removed.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>

d87e1814 08/25/2009 06:51 pm Luca Bigliardi

Document cluster destroy hook

Add documentation about new cluster-destroy-post hook.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>

f848ac00 08/25/2009 06:39 pm Michael Hanselmann

Run unittests in a temporary directory

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

bb46a96c 08/25/2009 06:38 pm Michael Hanselmann

Fix building in a different directory

Also add build-bash-completion to EXTRA_DIST.

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

b959138f 08/25/2009 06:38 pm Michael Hanselmann

Add script to run build commands in temporary directory

Python always compiles imported modules. By running these targets
in a temporary directory we don't pollute the source tree.

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

dc7d2c49 08/25/2009 06:38 pm Michael Hanselmann

Makefile: Use BUILT_SOURCES

These are always built before anything else.

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

434c34a5 08/25/2009 06:38 pm Michael Hanselmann

Simplify manpage building

This eliminates one temporary directory in the process.

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

33b0062b 08/25/2009 06:38 pm Michael Hanselmann

Makefile: Fix docbook2man error message

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

5a78e2e7 08/25/2009 06:38 pm Michael Hanselmann

Handle more errors in bash completion

Don't print error messages if cluster hasn't been initialized yet.

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

d763bed0 08/25/2009 06:17 pm Luca Bigliardi

HooksMaster: fix RunPhase logging

In case of complete failure results is empty, return immediately
(tnx unittests).

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>

3cb5c1e3 08/25/2009 05:40 pm Luca Bigliardi

LURemoveNode: no logs running post on removed node

Do not log results from hooks ran on the removed node as now it's done by
RunPhase.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>