Statistics
| Branch: | Tag: | Revision:

root / test @ c9c33a28

# Date Author Comment
c9c33a28 03/28/2012 08:24 pm Michael Hanselmann

Add whitelist for opcodes using BGL

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

a20e4768 03/22/2012 04:29 pm Michael Hanselmann

cmdlib: Stop forking in LUClusterQuery

While debugging another issue we realized that LUClusterQuery forks.
This turned out to be the “platform.architecture” function from the
Python library. It uses the “file” command to determine the architecture
of the Python binary....

8d7d8b57 03/22/2012 03:03 pm Michael Hanselmann

locking: Handle spurious notifications on lock acquire

This was already a TODO since the implementation of lock priorities in
September 2010. Under certain conditions a waiting acquire can be
notified at a time when it can't actually get the lock. In this case it...

26082b7e 03/22/2012 02:50 pm Michael Hanselmann

locking: Fix lock deletion with timeout

While working on another SharedLock fix I realized timeouts on lock
deletion don't work very well if the timeout actually expires. This
patch fixes the issue and adds a new unittest.

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

6b27f535 03/22/2012 02:50 pm Andrea Spadaccini

Move _TimeoutExpired to utils

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

(cherry picked from commit f8326fcaac87958241d78526e5868d23d78ac286)

048eeb2b 02/15/2012 05:43 pm Iustin Pop

Workaround changed LVM behaviour

The vgreduce command has changed behaviour from when we initially
wrote the code (2.02.02 versus 2.02.66, 4 years delta):

- if there are LVs which will be impacted, it requires --force
- otherwise refuses to proceed, but it still returns exit code 0...

e7f7212b 01/19/2012 02:42 pm Iustin Pop

Add UnescapeAndSplit unittest for multi-escapes

This would have caught the bug in the first place. Argh,
hand-generated test cases!

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

c52d91e6 01/06/2012 01:24 pm Guido Trotter

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    KVM: support version reported by 1.0

Signed-off-by: Guido Trotter <>
Reviewed-by: Andrea Spadaccini <>

585c8187 01/06/2012 12:27 pm Guido Trotter

KVM: support version reported by 1.0

This of course was working for all the rcs, but broke with 1.0 itself.

In addition:
- split between running kvm --version and parsing its output
- unittest parsing for various known --help outputs
- updated NEWS file...

4f44e311 12/22/2011 06:41 pm Michael Hanselmann

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    jqueue: Fix epylint errors introduced in 37d76f1e4
    jqueue: Fix deadlock between job queue and dependency manager

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

df5a5730 12/22/2011 03:19 pm Michael Hanselmann

jqueue: Factorize checking job processor's result

This allows for more unittesting.

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

1b5150ab 12/22/2011 03:19 pm Michael Hanselmann

jqueue unittest: Rename simple fake-job class

Also add a parameter for priority, to be used in an upcoming
patch.

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

37d76f1e 12/21/2011 04:35 pm Michael Hanselmann

jqueue: Fix deadlock between job queue and dependency manager

When an opcode is about to be processed its dependencies are
evaluated using “_JobDependencyManager.CheckAndRegister”. Due
to its nature that function requires a lock on the manager's
internal structures. All of this happens while the job queue...

b6522276 12/08/2011 06:21 pm Michael Hanselmann

utils.io.WritePidFile: Improve error reporting

If the PID file is already locked by another process, try to read
the content and report it as part of the error message.

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

2dbc6857 12/08/2011 12:42 pm Michael Hanselmann

utils.ListVisibleFiles: Hide “lost+found” directories

If a “lost+found” directory is found at a filesystem's root path it is
ignored. In all other cases directory entries named “lost+found” are
treated normally. Unittests are included. Fixes issue 153.

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

fbd55434 11/30/2011 03:18 pm Michael Hanselmann

Fix race condition in test for *FileID functions

In this test the “file ID” of a temporary file is compared against the
file ID gathered via an open file descriptor to the same file. For
reasons unknown to me utime(2) is called in-between to update the
inode's a- and mtime. Depending on the file system's timestamp...

2b9245ff 11/24/2011 11:04 am Michael Hanselmann

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    LUGroupAssignNodes: Fix node membership corruption
    Fix pylint warning on unreachable code
    LUNodeEvacuate: Disallow migrating all instances at once
    LUNodeEvacuate: Locking fixes
    Fix error when removing node...
54c31fd3 11/24/2011 10:39 am Michael Hanselmann

LUGroupAssignNodes: Fix node membership corruption

Note: This bug only manifests itself in Ganeti 2.5, but since the
problematic code also exists in 2.4, I decided to fix it there.

If a node was assigned to a new group using “gnt-group assign-nodes” the...

cb92e7a1 11/23/2011 03:03 pm Michael Hanselmann

Separate OpNodeEvacuate.mode from iallocator

Until now the iallocator constants for node evacuation
(IALLOCATOR_NEVAC_*) were also used for the opcode. However, it turned
out this was due to a misunderstanding and is incorrect. This patch adds
new constants (with the same values) and changes the affected places....

0c1441eb 11/18/2011 12:41 pm Michael Hanselmann

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    htools: rework message display construction
    hbal: handle empty node groups
    Document OpNodeMigrate's result for RAPI
    Fail if node/group evacuation can't evacuate instances
    LUInstanceRename: Compare name with name...
d755483c 11/08/2011 04:06 pm Michael Hanselmann

Fail if node/group evacuation can't evacuate instances

If an instance can't be evacuated, only a message would be printed. With
this change the operation always aborts. Newly added unittests check for
this behaviour.

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

da124e89 11/01/2011 09:07 pm Andrea Spadaccini

Generalize HooksMaster

- remove any dependence on Logical Units from the HooksMaster;
- add a new function parameter to the constructor, a function that is
expected to convert the results of the hooks execution in a format
understood by the HooksMaster;...

fd7b69c0 10/31/2011 04:36 pm Michael Hanselmann

Fix wrong headers and licences

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Stephen Shirley <>

3fc210de 10/27/2011 12:31 pm Andrea Spadaccini

Fix parameters of RpcResult in hooks unit tests

In FakeHooksRpcSuccess, the data parameter of the RpcResult constructor
was not enclosed in a tuple. While this does not make the test fail, it
must be fixed.

Signed-off-by: Andrea Spadaccini <>...

b355affb 10/26/2011 12:06 pm René Nussbaumer

Fix a too long line.

That's what you get for not running make lint :(

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

9c2b3a70 10/26/2011 11:42 am René Nussbaumer

Move RenameFile to the new functions

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

b81b3c96 10/26/2011 11:42 am René Nussbaumer

ensure_dirs: Move some useful functions into utils.

With this change we can easily reuse this functionality where it makes
sense on other parts of Ganeti.

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

cdf71b12 10/25/2011 05:05 pm Andrea Spadaccini

Add the JoinDisjointDicts function to utils.algo

Add a function that joins two dictionaries, enforcing the constraint
that the two key sets should be disjoint. Also, add unit tests for this
function.

Signed-off-by: Andrea Spadaccini <>...

97298dc9 10/21/2011 04:16 pm René Nussbaumer

Merge branch 'stable-2.5' into devel-2.5

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

0ad1ea40 10/20/2011 03:04 pm Guido Trotter

Allow per-hypervisor optional files

Rather than just allowing files for all nodes to be optional, we allow
optional files to be per-category. The way this works is that they must
be included in both lists (the new code checks for this).

The code also removes a duplicate assert (present both in verify and...

0b58db81 10/18/2011 06:29 pm Michael Hanselmann

RAPI: Make node evacuation actually work

Commit e1f23243 changed te LU and opcode for node evacuation to receive
a “mode” parameter (among other things). Commit de40437a changed the
RAPI code accordingly, but did so for an earlier version of the first
patch. Obviously this couldn't work, so here's the fix....

539d65ba 10/17/2011 04:58 pm Michael Hanselmann

RAPI: Fix resource for replacing disks

Commit d1c172deb4f inadvertently changes the
“/2/instances/[instance_name]/replace-disks” resource to use body
parameters. There were no QA tests and the issue wasn't noticed.

This patch re-introduces support for query parameters and adds a QA...

94497dd1 10/13/2011 05:40 pm Michael Hanselmann

rapi: Add resource for modifying node

A separate patch will add “auto-promote” through
“/2/nodes/[node_name]/role”.

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

a080bab8 10/04/2011 09:32 pm Andrea Spadaccini

Merge branch 'stable-2.5' into devel-2.5

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: René Nussbaumer <>

170b02b7 10/04/2011 11:33 am Michael Hanselmann

Fix issue when verifying cluster files

If a cluster has any non-master-candidate nodes, those don't contain all
files (e.g. config.data). With commit aef59ae764dc (March 31st, 2011)
the logic was changed and subsequently verifying a cluster with non-mc
nodes would complain....

64c7b383 09/30/2011 07:04 pm Michael Hanselmann

LUClusterVerifyGroup: Spread SSH checks over more nodes

When verifying a group the code would always check SSH to all nodes in
the same group, as well as the first node for every other group. On big
clusters this can cause issues since many nodes will try to connect to...

4d2cdb5a 09/13/2011 03:29 pm Andrea Spadaccini

Add SPICE support to gnt-instance console

Also update related unit tests.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

fb17bebd 09/05/2011 05:30 pm René Nussbaumer

utils: Introduce IsBelowDir

This is mainly a wrapper to overcome the limitation of commonprefix
which makes a string by string comparisation and reports the common
prefix in both strings. However this is bad for directory handling.

IsBelowDir works around this limitation and should be used in favour of...

91c10532 09/03/2011 01:03 pm Andrea Spadaccini

Draft implementation of QMP connection

Basic implementation of the QMP connection and related tests.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

72ce3463 08/26/2011 05:53 pm René Nussbaumer

Merge branch 'devel-2.4' into devel-2.5

Conflicts:
NEWS (trivial)
configure.ac (trivial)
daemons/ensure-dirs.in (deleted)

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

e4a48c7b 08/26/2011 03:53 pm Michael Hanselmann

utils: Fix UnescapeAndSplit parsing bug

If a value passed to UnescapeAndSplit ended with a backslash an
exception would be raised:

$ gnt-instance modify -H mem=x\\ inst1.example.com
[…]
e2 = slist.pop(0)
IndexError: pop from empty list

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

8b046709 08/23/2011 12:08 pm René Nussbaumer

Adding missing test data for commit 7a380ddfc

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

7a380ddf 08/23/2011 12:01 pm René Nussbaumer

Fix a parsing issue with DRBD 8.3.11 in the Linux Kernel

In the Linux kernel commit 4b0715f096 introduced a display bug into
/proc/drbd which broke our regex.

The bug was first introduced into Linux 2.6.39-rc1. This bug is still
unfixed as of today.

This patch adapt the regular expression to workaround this bug for the...

c3f54085 08/19/2011 03:11 pm Michael Hanselmann

ensure-dirs: Check mode and owner before changing

This avoids many calls to chmod(2) and chown(2), and thereby ctime
updates.

Since I had to update the unittests anyway I untangled the code a bit,
split it into more separate functions and added some more tests....

d00a730d 08/19/2011 03:11 pm Michael Hanselmann

ensure-dirs: Refine error handling on stat(2)

The “_stat_fn” function is renamed to “_lstat_fn” to reflect its
function. The try/except block just wraps calling lstat(2) and nothing
else.

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

bdfd7802 08/12/2011 03:12 pm Michael Hanselmann

Clarify job ID-related type checks, add unittests

Instead of a rather complicated expression only “JobId” is output. Job
ID lists (like generated by “SubmitManyJobs”) are limited to two-item
lists. Unittests are added.

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

37531236 08/11/2011 03:18 pm Andrea Spadaccini

Added helper functions in netutils and related constants

Added the following functions to netutils:
- IsValidInterface
- GetInterfaceIpAddresses
- _GetIpAddressesFromIpOutput

Added the following static methods to netutils.IPAddress:
- GetAddressFamilyFromVersion...

f4e86448 08/09/2011 03:33 pm Michael Hanselmann

rlib: Expose node group tags

Commit 1ffd26739d3 added support for tagging node groups. Also add a
check for exposed fields.

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

f8638e28 08/08/2011 06:42 pm Michael Hanselmann

Detect globbing patterns as query arguments

Short: this patch enables the use of “gnt-instance list '*.site'”.

Detailed description: This patch changes the command line interface code
to try to deduce the kind of filter from the arguments to a “list”
command. If it's a list of plain names an old-style name filter is used....

16629d10 08/05/2011 05:16 pm Michael Hanselmann

Implement globbing operator for filters

The operators “=*” and “!*” do globbing in filters, e.g.:

$ gnt-instance list --no-headers -o name 'name =* "*.site"'
inst1.site.example.com

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

9f604ab8 08/05/2011 02:11 pm Michael Hanselmann

Bump version to 2.5.0~beta1

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

0e5084ee 08/05/2011 02:06 pm Michael Hanselmann

utils.ReadFile: Add pre-read callback

This will be used by the watcher to store the file's fstat(2). It must
be done from the filehandle.

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

6890cf2e 08/05/2011 02:06 pm Michael Hanselmann

cleaner: Remove watcher's instance status file after 21 days

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

e8906f7d 08/04/2011 05:26 pm Iustin Pop

Fix unittest failure after list_owned changes

We just need an object that has a list_owned method.

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

7b642c49 08/04/2011 01:28 pm Michael Hanselmann

ganeti-cleaner: Remove old watcher state files

Watcher state files can stay around if node groups are removed. With
this patch they're removed after 21 days.

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

fab9573b 08/02/2011 12:08 pm Michael Hanselmann

Add primary/second nodes' group as query fields

These will be very useful for ganeti-watcher as it needs to retrieve
instances by group.

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

1ce03fb1 07/26/2011 02:19 pm Michael Hanselmann

Add ht-based result checks to opcodes

This adds the infrastructure necessary to check opcode results using
ht-based functions. Checks are added for two opcodes.

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

0fa044e7 07/25/2011 04:06 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4:
    Reopen daemon's stdio on SIGHUP
    Reopen log file only once after SIGHUP
    Don't leak file descriptors when setting up daemon output
    Fix aliases in bash completion

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

ad88650c 07/25/2011 04:01 pm Michael Hanselmann

Reopen log file only once after SIGHUP

Commit b6fa9a44 added a re-openable log handler. The log file is
reopened when a daemon is sent a HUP signal. Due to a bug in the code,
fixed by this patch, the log file would be reopened for every single log
message thereafter....

c0a146a1 07/21/2011 04:25 pm Michael Hanselmann

Implement instance failover via RAPI

No idea why this was missed before.

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

44b4eddc 07/21/2011 02:55 pm Michael Hanselmann

Make lock monitor more versatile

With this change it'll be possible to register other lock information
providers. One usecase for this are job dependencies, which can be shown
in the output of “gnt-debug locks”, too.

The lock monitor is changed to accept more than one return value from...

fcb21ad7 07/21/2011 02:55 pm Michael Hanselmann

Export job dependencies through lock monitor

This makes them visible to the user. Example:

$ gnt-debug locks -o name,pending
Name Pending
job/890 job:891,892
job/892 job:894

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

47099cd1 07/21/2011 02:20 pm Michael Hanselmann

Rename *_STATUS_WAITLOCK to …_WAITING

This patch renames the {JOB,OP}_STATUS_WAITLOCK constants to {JOB,OP}_STATUS_WAITING, as per design document for chained jobs.

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

75d81fc8 07/21/2011 11:58 am Michael Hanselmann

Fix locking issue with job dependencies

When jobs waiting for a dependency are notified, they're re-added to the
queue. This would require owning the queue lock in exclusive mode, but
since the function doing so is called from within the job/opcode
processor, it only holds the lock in shared mode....

b247c6fc 07/21/2011 08:33 am Michael Hanselmann

jqueue: Implement submitting multiple jobs with dependencies

With this change users of the “SubmitManyJobs” interface can use
relative job dependencies. Relative job IDs in dependencies are resolved
before handing the job off to the workerpool.

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

c0f6d0d8 07/20/2011 03:11 pm Michael Hanselmann

jqueue: Add “writable” flag to memory objects

Basically only one instance of the job, the one being processed,
should be serialized to disk and replicated to other nodes. With
this flag assertions can be added in various places.

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

b95479a5 07/20/2011 03:11 pm Michael Hanselmann

Implement chained jobs

An overview is available in the design document for this change,
doc/design-chained-jobs.rst.

When a job enters the job processor, the current opcode's dependencies
are evaluated. If a referenced job has not yet reached the desired...

2f4c951e 07/15/2011 12:27 pm Stephen Shirley

Adding a wrapper around connecting to kvm console

The wrapper will connect to the console, and check in the background if
the instance is paused, unpausing it as necessary.

Signed-off-by: Stephen Shirley <>
Reviewed-by: Michael Hanselmann <>

05484a24 07/12/2011 06:23 pm Michael Hanselmann

cli.GetOnlineNodes: Support node group filter, use query2

This patc changes cli.GetOnlineNodes to use query2, which does the
filtering in the master daemon, and adds a new parameter to filter by
node group.

Unittests were added for the old implementation and then adopted to...

b795a775 07/11/2011 05:53 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4:
    ht: Add new check for numbers
    Fix off-by-one bug in job serial generation
    Shorten some unbreakable lines in man pages
    Correct some spelling mistakes
    Fix bug in recreate-disks for DRBD instances
    Fix a lint warning...
697f49d5 07/11/2011 05:28 pm Michael Hanselmann

ht: Add new check for numbers

Places which receive floats can usually also deal with integers, e.g.
OpTestDelay. Tests are added and the new check function is used for the
aforementioned opcode and verifying query results.

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

de40437a 07/06/2011 12:31 am Michael Hanselmann

Change RAPI for new node evacuation opcode

The change is not backwards compatible, see the updated NEWS file.

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

13699e58 06/10/2011 05:50 pm René Nussbaumer

Adding basic abstraction layer for caching

This includes an own simple cache implementation and an
interface to a memcache instance.

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

ecc760ce 06/09/2011 04:04 pm Guido Trotter

Fix _checkRsaPrivateKey for newer key generation

Keys generated under debian sid just read "BEGIN PRIVATE KEY" rather
than "BEGIN RSA PRIVATE KEY".

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

1e6d5750 06/03/2011 02:10 pm Iustin Pop

Fix incomplete merge

Commit 66bd7445 changed the semantics of _JobProcessor on finished
jobs, and updated the related unittests in the 2.4 branch. It was then
merged to master, however on master there was an additional test for
this case, which was not updated....

07346f28 06/01/2011 08:08 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4:
    jqueue: Fix potential race condition when cancelling queued jobs
    Fix argument order in ReserveLV and ReserveMAC

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

66bd7445 05/31/2011 07:17 pm Michael Hanselmann

jqueue: Fix potential race condition when cancelling queued jobs

When a job was cancelled, its status would be changed and the file
written again. Since this was a final status, the job file could be
moved anytime for archival. If the job was still in the queue, however,...

b7a1c816 05/30/2011 06:07 pm Michael Hanselmann

gnt-node migrate: Use LU-generated jobs

Until now LUNodeMigrate used multiple tasklets to evacuate all primary
instances on a node. In some cases it would acquire all node locks,
which isn't good on big clusters. With upcoming improvements to the LUs
for instance failover and migration, switching to separate jobs looks...

8620f50e 05/27/2011 03:14 pm Michael Hanselmann

ht: Add checks for anything, regexp, job ID, container items

The check for container items is useful for tuples and/or lists with
non-uniform values. The “anything” check can be used when any value
should be accepted for an item.

The job ID check, which uses the regexp check, will be used for...

bd614fa4 05/24/2011 07:40 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4:
    RPC/Backend: Make UploadFile uid and gid agnostic
    Resolve uid/gid upon mainloop run
    GetEntResolver: Make it possible to resolve uid/gid to name
    utils.algo: Add InvertDict to invert a dict
    autotools: Add noded group...
44fbd23b 05/24/2011 12:37 pm René Nussbaumer

GetEntResolver: Make it possible to resolve uid/gid to name

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

0a9a0e5a 05/24/2011 12:37 pm René Nussbaumer

utils.algo: Add InvertDict to invert a dict

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

83a2da0f 05/20/2011 07:44 pm Michael Hanselmann

Improve hooks documentation unittest

Also check for the opcode ID.

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

bf93ae69 05/20/2011 01:37 pm Adeodato Simo

Split LUClusterVerify into LUClusterVerify{Config,Group}

With this change, LUClusterVerifyConfig becomes a "light" LU that only
verifies the global config and other, master-only settings, and the bulk of
node/instance verification is done by LUClusterVerifyGroup, which only acts...

a464ce71 05/17/2011 06:05 pm Michael Hanselmann

ht: Add strict check for dictionaries

This allows checking specific dictionary items, unlike TDict
or TDictOf.

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

3dbe3ddf 05/13/2011 03:57 pm Michael Hanselmann

SharedLock: Implement downgrade from exclusive to shared mode

If a job needs to modify a resource and then wait for a result, it must
acquire the resource lock in exclusive mode. In some cases it would be
possible to only have a shared lock for waiting. Until now it was not...

2d91e6ae 05/10/2011 02:03 pm Michael Hanselmann

Re-indent test/mocks.py using two spaces

No idea where those four spaces came from, but they must've been there
for a while.

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

0d5a0b96 05/10/2011 02:03 pm Michael Hanselmann

cmdlib: Remove acquired_locks attribute from LUs

The “acquired_locks” attribute in LUs is used to keep a list of acquired
locks at each lock level. This information is already known in the lock
manager, which also happens to be the authoritative source. Removing the...

3ce9a5e7 05/09/2011 06:49 pm Michael Hanselmann

opcodes: Add function for compact summary

Depending on the opcode and its parameters, the existing “Summary”
function can give a rater long summary. For displaying the summary in
logs and in the lock monitor, it should be shorter. Hence this new
function is added to just use the opcode ID with common prefixes...

83f2d5f6 05/09/2011 06:33 pm Michael Hanselmann

locking: Make parameter to condition's wait() positional

It is always used in the locking code. Unittests are updated.

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

580c971e 04/29/2011 03:38 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4: (24 commits)
    mlock: fail gracefully if libc.so.6 cannot be loaded
    Allow creating the DRBD metadev in a different VG
    Make _GenerateDRBD8Branch accept different VG names
    Fix WriteFile with unicode data
    Replace disks: keep the meta device in the same VG...
8f9a87c5 04/28/2011 01:06 pm Iustin Pop

SetEtcHostsEntry: maintain existing ordering

Currently RemoveEtcHostsEntry keeps the ordering, but SetEtcHostsEntry
not, as it will always write the new entry at the end of file. I
personally dislike this as it "uglifies" my custom host files, so this
patch makes it update the record instead in-place so to say instead of...

1d39e245 04/28/2011 01:02 pm Iustin Pop

Fix WriteFile with unicode data

Unicode is fun, indeed:

len(buffer("abc"))

3

len(buffer(u"abc"))

12

So we can't pass unicode data to buffer(), as the result will be to
write the in-memory (usually UTF-32) representation to disk.

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

414ebaf1 04/21/2011 04:08 pm Michael Hanselmann

RAPI: Add support for tagging node groups

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

3f2f55bb 04/18/2011 06:55 pm Michael Hanselmann

qlang: Add function to distinguish filters from names

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

7578ab0a 04/18/2011 06:55 pm Michael Hanselmann

qlang: Add parser for query filter language

With this parser, command line utilities will be able to provide filters
through query2 in a simplistic language. Example filters:

name  "node3.example.com" 
master or (name "node4.example.com")
be/memory == 128 and name =~ /^web/i...
7c670076 04/18/2011 11:56 am Michael Hanselmann

Add instance query field for OS parameters

These were not available as a query field before. Update unittests
and description text for the other “..params” fields.

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

a9d68e40 04/13/2011 01:01 pm Michael Hanselmann

utils.WriteFile: Close file before renaming

Issue 154 (http://code.google.com/p/ganeti/issues/detail?id=154)
reported an “Operation not supported” error when writing instance
exports to a mounted CIFS filesystem. Experimentation showed the error
to only occur when using rename(2) on an opened file. Various references...

af7b6689 04/07/2011 01:24 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4:
    LUInstanceQueryData: Don't acquire locks unless requested
    Increase the lock timeouts before we block-acquire
    daemon.py: move startup log message before prep_fn
    Display the actual memory values in N+1 failures...
76ae1d65 04/07/2011 12:46 pm Michael Hanselmann

Merge branch 'stable-2.4' into devel-2.4

  • stable-2.4:
    Add error checking and merging for cluster params
    Clarify --force-join parameter message
    Treat empty oob_program param as default
    Fix bug in instance listing with orphan instances
    Fix bug related to log opening failures...