Statistics
| Branch: | Tag: | Revision:

root / test @ 83c046a2

# Date Author Comment
83c046a2 05/08/2012 01:37 pm Iustin Pop

Correct capitalisation of two Luxi calls

Two Luxi calls have inconsistent an name/value mapping (in the Python
code):

- REQ_AUTOARCHIVE_JOBS versus AutoArchiveJobs (versus AutoarchiveJobs)
- REQ_QUEUE_SET_DRAIN_FLAG versus SetDrainFlag (no Queue)

While these are only a consistency issue, let's fix them so that the...

a0c3e726 05/04/2012 03:27 pm Michael Hanselmann

QA: Enable use of OR conditions in test checks

Until now “TestRunIf” and “TestEnabled” could only handle AND. With this
patch a new class named “Either” is added to “qa_config” and allows OR.
The name “Either” was chosen instead of “Or” as the latter is very close...

59e67682 04/27/2012 12:46 pm Iustin Pop

Fix rapi.testutils unittest

Since we use a testutils.InputTestClient(), then the actual error
expected is VerificationError, and not GanetiApiError (which is used
at real run-time).

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

1afa108c 04/26/2012 10:42 pm Michael Hanselmann

Add more RAPI test utilities

This patch adds a mock RAPI client to test input values to methods. All
methods either raise an exception if there was a problem or return None.
Third-party code can use this to test their input values to the RAPI
client.

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

d9492490 04/26/2012 10:33 pm Michael Hanselmann

rapi.testutils.FakeCurl: Add header support

With this patch headers are constructed from the PycURL options
and passed to the mock implementation.

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

f90a1ab5 04/26/2012 10:33 pm René Nussbaumer

Move _FakeCurl from tests/ganeti.rapi.client to ganeti.rapi.testutils

This is preparation for the mock system, where we need the same cURL
mock.

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

0fdf247d 04/19/2012 09:04 pm Michael Hanselmann

Convert listing exports to query2

This solves one case where locks are acquired during LUXI queries.
Pretty late into the transition I noticed that OpBackupQuery had a
“use_locking” parameter for a long time, but didn't use it. Since
most of the other changes were already and this allows exports to...

07923a3c 04/16/2012 07:30 pm Michael Hanselmann

Copy debug level, priority and set comment for LU-generated opcodes

Before this patch, a node evacuation submitted with high priority would
only compute the solution at that priority, but the actual evacuation
ran at normal priority.

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

5ad68a23 04/13/2012 04:19 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5: (29 commits)
    gnt-* {add,list,remove}-tags: Unify options
    Bump version for 2.5.0 final release
    configure.ac: Fix “too many arguments” error
    Fix extra whitespace
    Further fixes concerning drbd port release
    Fix a bug concerning TCP port release...
d6f58310 03/30/2012 04:49 pm Michael Hanselmann

Fix query unittests after converting jobs to query2

I missed these among some shelltest-related failures.

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

a06c6ae8 03/30/2012 03:03 pm Michael Hanselmann

jqueue: Convert GetInfo to query2

This rather inefficient implementation (fields are evaluated on every
call to GetInfo) is not good for WaitForJobChanges and doesn't support
filters, but that will be rectified in later patches.

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

03ec545a 03/30/2012 03:02 pm Michael Hanselmann

qlang.MakeFilter: Enable use of different name field

Jobs don't have a “name” field, so we must be able to control
the field used for simple filters.

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

26a72a48 03/30/2012 03:02 pm Michael Hanselmann

Merge cli.FormatTimestamp and utils.FormatTime

… to some degree at least. Unittests are included.

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

0b04b188 03/30/2012 03:02 pm Michael Hanselmann

constants: Don't hardcode priorities for LOCK_ATTEMPTS_TIMEOUT

Also include unittest for LOCK_ATTEMPTS_TIMEOUT.

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

c9c33a28 03/28/2012 08:24 pm Michael Hanselmann

Add whitelist for opcodes using BGL

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

bd6d1202 03/28/2012 12:27 pm René Nussbaumer

RPC: Add a new client type for DNS only

This patch moves the “call_version” to a new RPC client definition and
then adds a new runner using the DNS resolver for getting the host
address.

The standard “BootstrapRunner”, where the call was before, tries to...

30f2802f 03/26/2012 11:30 am Iustin Pop

Add trivial tests for gnt-* cli

While testing some other stuff, I realised that the gnt-* commands
could be broken (as in, the script fails with syntax errors), but make
check doesn't detect it. Since we have shelltest, we can now add
trivial tests for this case....

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

53d4cdf1 03/22/2012 04:01 pm Iustin Pop

Convert manual shell tests to shelltestrunner

This is more of a RFC… Basically most of the shell-based tests are
converted from exec+grep to shelltestrunner.

Things are not all fine and nice though:

- we have dependencies between tests, as some generate some data files...

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)

6bbd76d2 03/15/2012 06:22 pm Iustin Pop

Add new hail (shell) tests

Using some hand-crafted files (manually modified from a real cluster
running master branch), we test that hail behaves as we expect:
doesn't load obvious wrong data, can do relocations/allocations, etc.

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

55ffacfa 03/15/2012 06:22 pm Iustin Pop

Add RAPI shell-level unittest

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

9915fb20 03/15/2012 06:22 pm Iustin Pop

Add tests for custom text files

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

34700f5b 03/15/2012 04:25 pm René Nussbaumer

Rename spindle_usage to spindle_use on Ganeti side

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

553cb5f7 03/15/2012 03:53 pm René Nussbaumer

ipolicy: Keep track of spindle usage

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

81f7ea25 03/09/2012 04:46 pm Iustin Pop

Fix lint error in commit 035b33e2

Commit 035b33e2 forgot one blank space, and current pylint in Debian
Sid doesn't run on our code… so I didn't realise this until after
commit, sorry.

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

035b33e2 03/07/2012 10:59 pm Iustin Pop

Fix tempfile reset code & test on newer Python

Python 2.7.3 (rc status) and 3.2.3/3.3 (rc, respectively alpha status)
have fixed http://bugs.python.org/issue12856 which we worked around
ourselves.

This means two things:

- we don't need to manually reset the module...

7bfb3367 03/06/2012 08:58 pm Iustin Pop

Merge remote-tracking branch 'origin/devel-2.5'

Conflicts:
Makefile.am (trivial, test data files added on both branches)
lib/opcodes.py (trivial, master renamed filter→qfilter, 2.5
fixed the type of the parameter)...

48796673 02/21/2012 09:18 pm Michael Hanselmann

Add result checks for OpTags*

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

415feb2e 02/21/2012 05:34 pm René Nussbaumer

opcodes: Annotate the OP_RESULT of query operations

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

0f85ebd9 02/21/2012 04:34 pm Iustin Pop

Fix asyncnotifier unit tests

On my workstation, if I run the following two tests in this exact
order:

- TestSingleFileEventHandler.testError
- TestSingleFileEventHandler.testReplace

the second test will fail, because there is no "unregister" of
previous tests (and the poll() done by asyncore will fire on the...

8930b0f0 02/21/2012 02:33 pm Iustin Pop

Add ndp/* fields to group/node query

Also change the meaning of group ndparams to mean the actual (not
custom) nd params, and add custom_ndparams for the current meaning of
ndparams.

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

432e8e2f 02/21/2012 02:32 pm Iustin Pop

Add new spindle_count node parameter

Currently this is not handled by Ganeti, just recorded.

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

202fb4e0 02/20/2012 06:57 pm Michael Hanselmann

opcodes: Add result checks for OpBackup*

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

5fa3d337 02/20/2012 02:57 pm Michael Hanselmann

Improve opcode result check test to have a whitelist

Only whitelisted opcodes may not have a result check.

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

82c54b5b 02/20/2012 01:27 pm Michael Hanselmann

config: Add check for disk's “iv_name”

This check verifies “iv_name” of all instance disks. If one is wrong
(which shouldn't happen in the first place), cluster verification will
warn:

“ERROR: cluster: Instance 'inst.example.com' has wrongly named disks:...

956631b6 02/17/2012 06:54 pm Michael Hanselmann

cli: Handle negative numbers when parsing key-value assignments

To remove the last disk, or to add a NIC to the end, one can use the
index 1. This wouldn't work as intended as “” is a special prefix.

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

5401c39d 02/17/2012 05:39 pm Michael Hanselmann

utils.text: Add function to truncate string

The function adds an ellipse if the string was actually truncated. Also
start using it in mcpu for result checks (where the message is also
slightly changed to use a colon).

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

0356a13d 02/17/2012 03:16 pm Michael Hanselmann

LUInstanceSetParams: Update disk's “iv_name”

When modifications are made, disks may not have the same index anymore.
Updating all disks fixes this.

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

35554b4f 02/17/2012 01:34 pm Michael Hanselmann

ApplyContainerMods: Fix issues with indices

When adding an item the index given to the callback function would be
incorrect under certain conditions. This patch also adds assertions and
more tests.

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

a71f835e 02/17/2012 12:52 pm Michael Hanselmann

gnt-instance modify: Support new-style NIC/disk modifications

This patch adds support for adding/removing NICs/disks at arbitrary
indices on the command line. To add a disk at a specified index, use
“--disk 3:size=16G”. To remove the second disk, use “--disk 2:remove”....

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

a8e3e009 02/15/2012 05:16 pm Michael Hanselmann

Add unittest for cmdlib._GenerateDiskTemplate

This is in preparation to de-duplicating significant chunks of code in
cmdlib._GenerateDiskTemplate.

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

a85f23fa 02/15/2012 12:20 pm Michael Hanselmann

rapi.testutils: Add exported functions to verify opcode input/result

These can be used by third-party code to verify mock code. Further work
on mocks is forthcoming, so this is only a start.

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

efcfa99d 02/13/2012 07:16 pm Michael Hanselmann

ApplyContainerMods: Return changes from callbacks

… instead of passing the list of changes as a parameter.

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

8301885b 02/13/2012 05:20 pm Michael Hanselmann

cmdlib: Add generic algorithm for modifying NICs/disks

While preparing this patch series I identified at least three different
implementations of the algorithm for adding/removing/changing
NICs/disks. These two functions and corresponding unittests provide a...

0813170b 02/13/2012 04:02 pm Michael Hanselmann

Fix unittest breakage after commit a2aadb34b

Thou shalt run “make check” before sending patches.

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

f0fd35b1 02/01/2012 10:11 am René Nussbaumer

rapi.client: Removing constants not needed anymore

They were not referenced through the whole code and were marked internal
only.

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

ddc1de7c 02/01/2012 08:24 am Michael Hanselmann

Add stricter checks for OpInstanceSetParams.{nics,disks}

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

8f227489 02/01/2012 08:24 am Michael Hanselmann

Stricter check for OS modifications passed to OpClusterSetParams

Don't just check the first element of each item, but also make sure the
OS name is a string and not empty.

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

7181fba0 01/23/2012 07:53 pm Constantinos Venetsanopoulos

Implement rbd disk template

Introduce the rbd disk template, which handles provisioning and
management of instance disks as block devices mapped to rbd volumes
on a RADOS cluster.

The rbd template is of type DTS_EXT_MIRROR, meaning rbd-based
instances can failover or migrate to any node, without...

59d81cb3 01/19/2012 03:14 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5:
    Fix wrong option names in QA and cluster-merge
    Bump version to 2.5.0~rc5, update NEWS
    Add UnescapeAndSplit unittest for multi-escapes
    Fix a bug in command line option parsing code
    cli: Disable abbreviation matching for options...
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 <>

2096d068 01/11/2012 10:13 am René Nussbaumer

cmdlib._ComputeMinMaxSpec: Add unittest for this function

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

0e68bf27 01/11/2012 10:13 am René Nussbaumer

cmdlib: Rename _CheckMinMaxSpecs to _ComputeMinMaxSpec

This is to reflect the fact that _Check functions do raise Op*Error
which is not the case for _CheckMinMaxSpec.

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

ff02b60f 01/10/2012 02:34 pm René Nussbaumer

_CheckTargetNodeIPolicy: instance.primary_node is not objects.Node

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

7e6b6f1f 01/09/2012 02:34 pm Michael Hanselmann

rpc: More unittests

- Fix: Don't check st_atime for temporary file for upload tests
- Add tests for five encoders

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

0fb81174 01/06/2012 02:45 pm René Nussbaumer

cmdlib: Adding helper for instance policy

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

c2dc025a 01/06/2012 02:36 pm Michael Hanselmann

rpc.ConfigRunner: Fix uploading file

Commit 601dfcb made some changes to the default encoders. This made
“ConfigRunner.call_upload_file” fail due to a missing encoder. This
patch applies the necessary changes to ConfigRunner and updates the
unittest for “call_upload_file”....

c668ead9 01/06/2012 01:38 pm Guido Trotter

Merge branch 'devel-2.5'

  • devel-2.5:
    KVM: support version reported by 1.0
    doc/admin: Clarify archived jobs

Conflicts:
NEWS: trivial

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

601dfcbb 01/06/2012 01:34 pm Michael Hanselmann

Add unittest for uploading file via RPC

After some preparing patches this unittest can finally be added.

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

065be3f0 01/06/2012 01:34 pm Michael Hanselmann

Add unittests for RPC client

This patch adds a number of unittests for the RPC client base class.
Some small changes were necessary in “rpc.py” to allow for better
testing.

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

120e7e77 01/06/2012 01:34 pm Michael Hanselmann

Add unittest for RPC compression

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

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

890ea4ce 01/05/2012 05:30 pm Michael Hanselmann

rpc._NodeConfigResolver: Support resolving offline nodes

This is needed to powercycle a node marked offline.

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

f863d7aa 01/05/2012 05:30 pm Michael Hanselmann

rpc._RpcProcessor: Make read timeout a non-keyword argument

It is always used and can be set to “None” if intended.

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

fce5efd1 01/05/2012 05:30 pm Michael Hanselmann

rpc: Pass resolver options to actual resolver

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

aa66c183 12/22/2011 07:16 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5:
    jqueue: Factorize checking job processor's result
    jqueue unittest: Rename simple fake-job class
    jqueue: Fix epylint errors introduced in 37d76f1e4
    jqueue: Fix deadlock between job queue and dependency manager...
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 <>

fc4498e9 12/22/2011 05:04 pm Michael Hanselmann

test/lockperf: Use a list of integers, not booleans

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

e4d452b4 12/22/2011 03:25 pm Michael Hanselmann

Add lock performance utility

I had an idea for improving locking performance. To see if it worked I
wrote this tool. Unfortunately the idea didn't quite work (broke
unittests left and right), but the tool is still handy for evaluating
future changes to the “SharedLock” class....

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

fd6eaa09 12/22/2011 03:12 pm Bernardo Dal Seno

unit tests: Add tests for file mode handling in utils.WriteFile

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

0d20cc42 12/22/2011 03:12 pm Bernardo Dal Seno

unit tests: Add tests for uid and gid handling in utils.WriteFile

These tests need fakeroot. If it's not present, they are not run (they
don't fail).

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

eea3b572 12/22/2011 03:12 pm Bernardo Dal Seno

noded: Fix /etc/hosts group ownership

When Ganeti was compiled with the option of running as a different
user/group, the group ownership of /etc/hosts was set to gnt-daemons. Now
permissions for /etc/hosts are preserved (or set correctly).

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

d9de612c 12/21/2011 06:02 pm Iustin Pop

Change internal RPC client body values

Currently, all RPC payloads sent by the client to the remote node
daemons must be identical, due to how the data is passed
internally. This is deficient in both use (from the programmer's point
of view) and from the network traffic (cluster verify/disk data...

51129a7f 12/21/2011 05:25 pm Michael Hanselmann

test/hv_kvm: Code style, additional tests

Change code style to match rest of Ganeti code and add
two tests checking for single-line messages.

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

a182a3ed 12/21/2011 04:55 pm Michael Hanselmann

serializer: Remove JSON indentation and dict key sorting

Serializing to JSON using “simplejson” is significantly slower when
indentation and/or sorting of dictionary keys is used. In simplejson 1.x
the difference isn't that big, but with simplejson 2.x the difference...

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

0f63f1f9 12/21/2011 12:04 pm Iustin Pop

Fix unittests for daemon_util with disabled confd

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

6396dc04 12/13/2011 02:00 pm Michael Hanselmann

RAPI client: Export feature constants

Users of the RAPI client may want to use feature strings too, therefore
they should be explicitely public.

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

edd49f9b 12/08/2011 07:24 pm Agata Murawska

Group query now calculates ipolicy

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

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

42a769f9 12/08/2011 11:53 am Bernardo Dal Seno

Add tests for parameter "always_failover"

Signed-off-by: Bernardo Dal Seno <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

0ba177e2 12/08/2011 10:48 am René Nussbaumer

cmdlib: Adding hv/disk state dict helper functions

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

784cd737 12/08/2011 10:48 am René Nussbaumer

cmdlib: Adding _UpdateAndVerifySubDict helper

This helps with 2 dimensional dicts.
For example the hv_state and the disk_state dicts.

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

8a69b3a8 12/06/2011 06:34 pm Andrea Spadaccini

Add DRBD barriers disk parameters

Add the disk-barriers and meta-barriers parameters described in the
design doc.

constants.py:
  • add the needed LD and DT-level parameters, use the defaults provided
    at ./configure time;
  • add constants representing which barriers should be disabled and the...
0fbedb7a 12/02/2011 06:55 pm Michael Hanselmann

objects.Cluster: Add property for primary hypervisor

This is useful for working with a node's hypervisor state, where only
the primary hypervisor will be authoritative.

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

bc5d0215 12/01/2011 01:03 pm Andrea Spadaccini

Add basic support for disk parameters

objects.py: * add disk parameters to Disk, Cluster, NodeGroup.

constants.py: * add dictionaries that will hold types and default values for disk
parameters (for now, empty).

test/ganeti.constants_unittest.py:...

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

5f06ce5e 11/30/2011 01:57 pm Michael Hanselmann

Add objects for disk/hv state

- Data objects
- Serialization/deserialization
- Unittests

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

c6a622cf 11/30/2011 12:16 pm Michael Hanselmann

locking: Allow checking if lock is owned in certain mode

With this patch the “LockSet” and “GanetiLockManager” classes have a new
function to check if a single or a group of locks (at a certain level)
have been acquired in a specific mode. This will be used for additional...

75191077 11/24/2011 12:31 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5:
    LUGroupAssignNodes: Fix node membership corruption
    LUGroupAssignNodes: Fix node membership corruption
    Fix pylint warning on unreachable code
    LUNodeEvacuate: Disallow migrating all instances at once
    Separate OpNodeEvacuate.mode from iallocator...
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...