Statistics
| Branch: | Tag: | Revision:

root @ aa5b2f07

# Date Author Comment
aa5b2f07 01/13/2012 03:17 pm Iustin Pop

Obey instance policy in allocation routines

This currently checks the minimum/maximum sizes and the disk
template. Unittests will come later.

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

d6eec019 01/13/2012 03:17 pm Iustin Pop

Set group policy on nodes

In order to be able to use the group policy during allocation, we have
a few choices:

- pass the group policy as a separate argument to all involved
functions, or
- add the policy as an attribute to nodes, or
- add the group (not only the group index) as an attribute to nodes...

cdbab531 01/13/2012 03:17 pm Iustin Pop

A trivial optimisation in Loader.mergeData

During loading, we can eliminate some intermediate data
structures. This only matters for big clusters, and even there it's
less than 1% less memory allocated, but still, it's a no-brainer.

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

74c35f2f 01/13/2012 03:17 pm Iustin Pop

Trivial performance optimisation

This is not in the hot-path, but still, no sense in doing O(n) instead
of O(1).

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

6cff91f5 01/13/2012 03:17 pm Iustin Pop

Add ipolicy attribute to group objects

This is straightforward; as before, so far the text and simu backends
have no way to use a non-default ipolicy.

Furthermore, we do some unit-test preparation for future changes
(these seem a no-op for now, but they are needed for later patches)....

3c3c796e 01/13/2012 03:17 pm Iustin Pop

Enable Eq instances for TH-built objects

This is needed for the next patch.

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

9fdd3d0f 01/13/2012 03:16 pm Iustin Pop

Switch hspace to read the disk template from the cluster

The default disk template is the first enabled template.

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

fc42a408 01/13/2012 03:16 pm Iustin Pop

Read the disk templates part of the ipolicy

The default value is badly defined (hardcoded defaults)…

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

89c758c6 01/13/2012 03:16 pm Iustin Pop

Move DiskTemplate definition around

This is needed since we'll need the DiskTemplate definition in the
IPolicy one.

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

2cc673a3 01/13/2012 03:16 pm Iustin Pop

Add new disk_templates parameter to instance policy

This is a bit more complex patch, as it requires changing the
assumption that all keys in the policy dict points to values that are
themselves dicts. Right now we introduce an assumption that any
non-dicts are lists, we'll see in the future if this holds or whether...

45f8b50d 01/13/2012 03:16 pm Iustin Pop

Remove extraneous check in policy creation

The values are already checked in CreateIPolicy, no need to manually
check them again.

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

0ce212e5 01/13/2012 03:16 pm Iustin Pop

Move the instance specs options to cli.py

Currently these are defined twice, instead of a single time in
cli.py. Also adds the new disk_templates option to the common block,
even though it's not yet used.

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

12c3d3f6 01/13/2012 03:16 pm Iustin Pop

Add a new disk-template ipolicy option

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

499eb088 01/13/2012 03:16 pm Iustin Pop

Add a new CLI option type 'list'

This simply splits the value in the option parser, instead of needing
to do it in the client code.

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

363c0106 01/13/2012 03:16 pm Iustin Pop

Fix handling of errors from InstancePolicy.Check...

This code raises a configuration error, but we need to transform it
into a prereq error (or possibly exec error), depending on when we
call this function.

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

be468da0 01/13/2012 03:16 pm Iustin Pop

Switch hspace defaults to the cluster policy

This changes from the current hardcoded defaults to the cluster
policy. The command line options now override the defaults from the
cluster, and the tiered spec mode is always enabled.

Also fixes a tiny typo in the man page (together with the man page...

304f9292 01/13/2012 03:16 pm Iustin Pop

Add a helper function converting ispecs to rspecs

The rspec type is simpler than the ispec one; most likely it should be
deprecated later.

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

8564fb47 01/13/2012 03:16 pm Iustin Pop

Abstract creation of instance from a spec

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

df5d5433 01/13/2012 03:16 pm Iustin Pop

Load cluster ipolicy via Rapi

This requires changing from querying the /tags resource to the /info
resource.

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

135f64a3 01/13/2012 03:16 pm Iustin Pop

Update memory/maxmem reading in Rapi backend

Recent changes to the instance beparams have replaced memory with
maxmem in Rapi bulk queries. Until this is either reverted (for
backwards compat) or we decide to go ahead with only maxmem, we change
the backend to read both; this only affects the "instance down" code...

e77bc89b 01/13/2012 03:16 pm Iustin Pop

Load cluster ipolicy via Luxi

Also show it in hbal's verbose output (helpful for debugging).

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

71375ef7 01/13/2012 03:16 pm Iustin Pop

Extend ClusterData with the cluster instance policy

This attribute is always initialised to the default, and is not (yet)
read/saved in the various backends.

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

d02f941e 01/13/2012 03:16 pm Iustin Pop

Add default ipolicy declarations

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

26fce8df 01/13/2012 03:16 pm Iustin Pop

Add support for RE patterns to convert constants

This is a trivial conversion.

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

cf57f778 01/13/2012 03:16 pm Iustin Pop

Add support for lists/frozensets in convert-constants

Unfortunately, we only support lists of simple types, and not even
lists of tuples. If we actually needed those, it would be possible to
implement them, with a bit more complexity in the converter.

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

2325bfcf 01/13/2012 03:16 pm Iustin Pop

Add support for tuples in convert-constants

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

df41d855 01/13/2012 03:16 pm Iustin Pop

More improvements to convert-constants

This prepares for tuple and other conversions.

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

8751c041 01/13/2012 03:16 pm Iustin Pop

Improve convert-constants to handle dictionaries

The two main drawbacks for convert-constants are the fact that it
can't handle sets/frozensets (mainly due to the fact that I don't know
how useful this would be to the Haskell code) and that it cannot
export dictionaries....

a07343b2 01/13/2012 03:16 pm Iustin Pop

Add object definitions for the ispec and ipolicy

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

b69be409 01/13/2012 03:16 pm Iustin Pop

Stop exporting JSON functionality from Utils.hs

This completes the Utils/JSON split started in commit f047f90f. The
import graph should be cleaner now.

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

f3f76ccc 01/13/2012 03:16 pm Iustin Pop

More reshuffling of code

Following the split Types/BasicTypes, we can remove the last
JSON-related stuff from Utils.hs, and do some more cleanup.

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

0c37d1e4 01/13/2012 03:15 pm Iustin Pop

htools: split parts of HTools/Types.hs into BasicTypes.hs

The 'Result' type is common and:

- might be used outside of HTools-specific code too
- is better split as we need these basic types for building the more
complex ones in Types.hs

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

50761ebd 01/12/2012 02:31 pm Constantinos Venetsanopoulos

Fix acquisition of node lock in LUInstanceGrowDisk

Ensure node level locks are recalculated properly
in LUInstanceGrowDisk.

Signed-off-by: Constantinos Venetsanopoulos <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

4b97458c 01/11/2012 01:13 pm Iustin Pop

Fix cluster ispecs on upgrade

Cluster-level parameters must not be empty. Plus two more minor
changes.

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

b32f3c0c 01/11/2012 01:12 pm Iustin Pop

Better max ispec defaults

Instead of being equal to the minimum ones, these are reusing current
constants.

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

410a8a76 01/11/2012 01:12 pm Iustin Pop

Rename optISpec to optStdSpec

More consistency with the tiered allocation mode.

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

294bb337 01/11/2012 01:12 pm Iustin Pop

Change how hspace reads cmdline args for std specs

For the standard specs, hspace currently takes separate options for
the memory, disk and VCPUs. For the tiered specs, which were
introduced later, it takes a single option with all three values
combined....

7da760ca 01/11/2012 12:59 pm Iustin Pop

Abstract tiered specs command line parsing

This will be used in the future for the standard specs too, so let's
abstract it away.

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

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

89e8508e 01/11/2012 10:13 am René Nussbaumer

cmdlib: _VerifyInstancePolicy has been replaced and is dead code

This removes this method

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

380bb53a 01/10/2012 05:16 pm Michael Hanselmann

utils.ResetTempfileModule: Improve performance

This function is called for after every fork (e.g. for handling an RPC
request). With the changes in this patch generating the next random
filename is about 30% faster.

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

20875652 01/10/2012 03:09 pm Michael Hanselmann

LUInstanceCreate: Release node resource lock

… after running iallocator. Otherwise an assertion later in the code
would fail (for a good reason).

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

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

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

cmdlib: node.group is not a nodegroup object

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

26ece371 01/10/2012 02:34 pm René Nussbaumer

LUInstanceCreate: self.disks is a dict not a disk object

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

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

qa-sample.json: Fix a typo

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

c20a19ed 01/10/2012 02:06 pm Iustin Pop

Fix wrong variable name

Commit bc5d0215 added support for disk params, but due to copy-paste
it tries to enforce the hvparams into disk params values, leading to:

$ gnt-cluster modify -H kvm:initrd_path=/boot/initrd-2.6-kvmU
Parameter Error: Unknown parameter 'initrd_path'...

922c57bf 01/09/2012 07:27 pm Guido Trotter

InstanceStartup: use overridden beparams in prereq

Without doing this memory checks happen on instance default parameters
rather than any overridden ones.

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

da775218 01/09/2012 06:04 pm Michael Hanselmann

gen-coverage: Change filter

It is not necessary to run a Python script to generate the filter, which
didn't work very well anyway on systems with modules in
/usr/share/pyshared.

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

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

729ed537 01/09/2012 01:56 pm Bernardo Dal Seno

Document "gnt-node add" behavior in case of failure

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

9fa567b3 01/06/2012 02:47 pm René Nussbaumer

gnt-node: Add instance policy to migrate

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

43f52ae3 01/06/2012 02:47 pm René Nussbaumer

cmdlib: Adapt LUClusterVerifyGroup for instance policy

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

2a84b7d3 01/06/2012 02:46 pm René Nussbaumer

gnt-backup: Adding force option to import

This makes it possible to bypass the instance policy

Signed-off-by: René Nussbaumer <>
Reviewed-by: Guido Trotter <>

10889e0c 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding instance policy to add

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

1559e1e7 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding verification of instance policy to modify

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

92cf62e3 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding instance policy to move

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

3ed23330 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding instance policy to migrate

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

b6aaf437 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding instance policy to failover

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

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

30a83755 01/06/2012 01:49 pm Guido Trotter

Update GrowDisk docstring

It forgot about one argument.

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

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

2635bb04 01/06/2012 01:34 pm Michael Hanselmann

Move helper class from watcher to utils.io

“FileStatHelper” can be used together with “ReadFile” to a file's status
while it's opened. This avoids certain race conditions.

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

2ce40421 01/06/2012 01:34 pm Michael Hanselmann

rpc._PrepareFileUpload: Use FileStatHelper

Use fstat(2) on the file handle instead of doing a separate stat(2).

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

d5ea30e8 01/06/2012 01:34 pm Michael Hanselmann

rpc: Change signature of RpcRunner

Instead of receiving the whole masterd context, it only gets the
configuration and the lock monitor callback. This simplifies
unittesting.

Additionaly, two new arguments for testing are added.

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

e78667fe 01/06/2012 01:34 pm Michael Hanselmann

rpc._RpcClientBase: Add check for number of arguments

Just an additional check, useful in unittests.

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

f00170e2 01/06/2012 01:34 pm Michael Hanselmann

runtime: Style fix in docstring

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

764ff2eb 01/06/2012 01:34 pm Michael Hanselmann

rpc: Style fix

“assert” is a statement, not a function.

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

51ef5fe0 01/06/2012 12:55 pm Guido Trotter

check-news/NEWS: impose more standards

- Always two empty lines before a version.
- Standardize how version names should be called.

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

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

92cb4940 01/05/2012 07:12 pm Andrea Spadaccini

qa: fix disk parameters tests

Fix an error in the disk parameters tests (the arguments to gnt-cluster
were not passed correctly) and move them to separate functions.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Iustin Pop <>

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

68a856ef 01/05/2012 05:30 pm Michael Hanselmann

rpc_defs: Enable “node_powercycle” for offline nodes

With this change it's possible to powercycle nodes marked as offline. Of
course the node might not be running the node daemon anymore.

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

9f2c2103 01/05/2012 05:30 pm Michael Hanselmann

man/gnt-node: Improve powercycle documentation

Reword a bit, capitalize “SSH”.

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

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

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

rpc: Add support for resolver options callback

This adds support for a callback returning name resolver options. This
is required for powercycling offline nodes. While it would be possible
to implement this using a separate RPC client class, doing so would...

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

20286f7c 01/05/2012 03:27 pm René Nussbaumer

QA: Make the ispec values configurable

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

995736c6 01/04/2012 03:21 pm René Nussbaumer

Update the resource model DD with current state

On my work for instance policies we decided not to overload --force
more, instead we go with a new flag --ignore-ipolicy. This is just a
small patch to reflect this decision.

Signed-off-by: René Nussbaumer <>...

df69e0a0 12/22/2011 09:09 pm Bernardo Dal Seno

Fix failure in distcheck and coverage tests

autotools/testrunner was missing in distcheck. Now some changes from
7004106119c5c56c93085ccfb1250b3561b5b6ad have been reverted, and testrunner
is not built anymore. coverage now uses fakeroot when needed.

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

96a7481d 12/22/2011 08:34 pm Michael Hanselmann

Makefile: Fix parallel distcheck

Running “make -jN distcheck” for any N > 1 would reliably break when
building the RPC client wrappers. This was due to wrong dependencies in
Makefile.am, fixed by this patch.

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

89907375 12/22/2011 07:19 pm Michael Hanselmann

doc/admin: Clarify archived jobs

Also mention that archived jobs can be viewed using “gnt-job info”.

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

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

unit tests: added fakeroot support

Tests ending in "-runasroot" or "-runasroot.py" are run through fakeroot,
so activity that needs root privileges can be tested.

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

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

utils.WriteFile: Add new parameter to preserve file permissions

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

1316ebc2 12/21/2011 06:04 pm Michael Hanselmann

jqueue: Fix epylint errors introduced in 37d76f1e4

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