Statistics
| Branch: | Tag: | Revision:

root / lib @ 39292d3a

# Date Author Comment
39292d3a 04/07/2010 04:57 pm Iustin Pop

Fix consistency checks in ConfdFilterCallback

Commit 49b3fda added consistency checks, but these are wrongly triggered
for old responses - we need to make sure to check that we have the same
serial.

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

1b429e2a 04/07/2010 04:55 pm Iustin Pop

Fix utils.WaitForFdCondition inner retry loop

Commit dfdc4060 added WaitForFdCondition which uses utils.Retry without
handling timeout exceptions. This breaks any nested retry loops.

This patch fixes the above function, and also changes utils.Retry to
detect and warn future similar cases. In addition, we add a few small...

cc2f004d 04/07/2010 04:31 pm Michael Hanselmann

Fix bug introduced in 76e5f8b54: mkdir mode

After commit 76e5f8b54, mkdir_mode in utils.RenameFile is
no longer passed to Makedirs. This is fixed by this patch.

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

76e5f8b5 04/07/2010 04:15 pm Michael Hanselmann

utils: Move wrapper code around os.makedirs into separate function

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

95ab4de9 04/06/2010 05:37 pm David Knowles

Adding RAPI client library.

Signed-off-by: David Knowles <>
Reviewed-by: Iustin Pop <>
Signed-off-by: Iustin Pop <>
(modified slightly the unittest to account for
missing httplib2 library)

49b3fdac 04/06/2010 12:51 pm Iustin Pop

Extend ConfdFilterCallback with consistency checks

Note that users of the callback will have to manually check the
attribute.

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

5b349fd1 04/06/2010 12:27 pm Iustin Pop

Abstract the confd client creation

Most creation of confd clients will do the same steps: read MC file,
parse it, read HMAC key, etc. We abstract this functionality so that
we don't duplicate the code.

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

7ba594c0 03/31/2010 06:51 pm Guido Trotter

kvm_flag hypervisor parameter

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

cef34868 03/31/2010 05:59 pm Guido Trotter

Move the runas user at execution time

Everything still works the same way, but the user is calculated each
time we start kvm, rather than stored in the config file. This makes it
easier to implement the "pool" security model.

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

b39bf4bb 03/25/2010 02:47 pm Guido Trotter

SerializableConfigParser: Make Loads class indep

Currently SerializableConfigParser.Loads is a static method that returns
a SerializableConfigParser. With this patch we change it to a class
method that returns a member of the class. This way a subclass calling...

71834b2a 03/23/2010 06:14 pm Guido Trotter

Unbreak command line job submission

A change introduced in 5299e61f modified the contents of
JobExecutor.jobs, missing a place where this tuple was deconstructed.
This creates a traceback in gnt-* <any> --submit, fixed by this patch.

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

91e2d9ec 03/23/2010 01:04 pm Guido Trotter

Write grow support for file storage

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

2c42c5df 03/23/2010 01:04 pm Guido Trotter

Allow file storage to be grown

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

4f7a6a10 03/23/2010 12:21 pm Iustin Pop

Distribute list of enabled hypervisors in ssconf

This can be used by nodes to know which hypervisors they are supposed to
support.

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

bbcf7ad0 03/23/2010 12:21 pm Iustin Pop

Extend the hypervisor API with name-only shutdown

Currently the ShutdownInstance method of the hypervisors takes a full
instance object. However, when doing instance shutdowns from the node
only, we don't have a full object, just the name.

To handle this use case, we add a new ‘name’ argument to the method,...

728489a3 03/23/2010 11:31 am Guido Trotter

Fix burnin error when trying to grow a file volume

Abstract the growable disk types in a ganeti constants, and only run
disk grow, from burnin, on them.

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

ed904904 03/23/2010 10:35 am Iustin Pop

Fix backend.VerifyNode behaviour for VG problems

In case LVM is broken, backend.GetVolumeList will raise an RPC exception
(as expected since it's a function exposed over RPC). Therefore we must
be prepared to catch any such exceptions, so that we don't fail the...

e7b61bb0 03/23/2010 10:35 am Iustin Pop

Introduce a bool CLI option type

This option type enforces its value to either True or False, relieving
the scripts from manually parsing the values in each function.

We also update the bash completion code to use the option type if
possible.

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

02c521e4 03/23/2010 10:35 am Iustin Pop

A rewrite of LUClusterVerify

Per issue 90, current cluster verify is very very brittle. It's one of
the oldest pieces of code, with only additions without cleanups over the
last years.

Among its problems:

- data initialization interspersed with verification of RPC results,...

3a488770 03/23/2010 10:35 am Iustin Pop

Some epydoc fixes

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

2263aec2 03/23/2010 10:33 am René Nussbaumer

Adding missing documentation to make the docs better

Also fixed a typo I noticed.

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

cdeefd9b 03/22/2010 08:06 pm Guido Trotter

Remove race condition in FileStorage.Create

Rather than checking that the file doesn't exist, and then creating it,
we create it with O_CREAT | O_EXCL, making sure the checking/creation is
atomic.

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

263b8de6 03/22/2010 08:06 pm Guido Trotter

KVM: Check instances for actual liveness

Currently if we find a live process with the pid we saved we assume kvm
is alive. What could happen, though, is that the pidfile has been
reused.

In order to avoid that we change the check to make sure, everywhere,...

4fbb3c60 03/22/2010 08:06 pm Guido Trotter

KVM: improve GetInstanceInfo docstring

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

284c69f0 03/22/2010 08:06 pm Guido Trotter

Revert "Only override any and all if not defined"

This reverts commit bd5617020a50bcd08269330638d64078c1b30b71.

Turns out our and python's any/all are not compatible.

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

0a37de5f 03/22/2010 05:25 pm René Nussbaumer

Adding RAPI call to deactivate-disks for an instance

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

2197b66f 03/22/2010 05:25 pm René Nussbaumer

Adding RAPI call for activate-disks on an instance

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

9d099698 03/18/2010 04:29 pm Guido Trotter

SimpleConfigReader: add docstrings

All non-oneliner functions, after this patch, have their docstring.

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

d63997b3 03/18/2010 01:39 pm Guido Trotter

Replace @keyword with @param in confd client

@keyword was used inappropriately.

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

8496d93c 03/18/2010 01:39 pm Guido Trotter

ConfdClient: add synchronous features

By sending requests with async=False, and receiving replies with
ReceiveReply we can more easily use confd from a synchronous client.

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

04cdf663 03/18/2010 01:39 pm Guido Trotter

ConfdCountingCallback

This new confd callback counts received replies for the registered
queries.

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

dcd511c8 03/18/2010 01:39 pm Guido Trotter

move http.WaitForSocketCondition to utils

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

dfdc4060 03/18/2010 01:39 pm Guido Trotter

WaitForSocketCondition: rename, handle EINTR

- Rename WaitForSocketCondition to SingleWaitForFdCondition
- Avoid potentially infinite loop, if we continue to get interrupted
- Handle eintr correctly
- Avoid the poller try/finally, as the poller object gets destroyed...

6ddf5c8f 03/18/2010 01:39 pm Guido Trotter

AsyncUDPSocket.process_next_packet

This function allows receiving socket data synchronously.

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

8216580d 03/18/2010 01:38 pm Guido Trotter

AsyncUDPSocket: abstract do_read function

This basically implements read handling, without catching all
exceptions. When using the socket in synchronous mode, it's useful to
avoid losing exception data (which, in an async daemon, can only be
logged)

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

bd561702 03/18/2010 01:38 pm Guido Trotter

Only override any and all if not defined

If any or all are already defined (because we're using a new version of
python) just link them inside "utils" rather than redefining them.

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

56569f4e 03/17/2010 06:58 pm Michael Hanselmann

backend: Two small style fixes

- Pass keyword parameter as such
- Replace “not x == y” with “x != y”

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

74adc100 03/17/2010 06:22 pm Iustin Pop

Allow cluster copy file over the replication net

This patch introduces the option “--use-replication-network” for the
cluster copyfile functionality, which is useful if the primary and
secondary network are significantly different (see issue 32).

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

e9e26bb3 03/17/2010 06:22 pm Iustin Pop

Enhance cli.GetOnlineNodes query/filtering

This patch allows GetOnlineNodes to return the secondary IPs instead of
the node names, and to provide filtering of the master node (required to
be done in this function in case we return the secondary IPs).

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

25a8792c 03/17/2010 04:11 pm Iustin Pop

Instance creation: implement --no-install mode

This is a simple patch that adds the no-install mode for instance
creation, allowing import from foreign source of the actual OS (instead
of requiring the preparation of data in a form expected by the import...

96b39bcc 03/17/2010 04:10 pm Iustin Pop

Allow OS changes without reinstallation

This patch modifies LUSetInstanceParms to allow OS name changes, without
reinstallation, in case an OS gets renamed on-disk.

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

231cd901 03/17/2010 04:10 pm Iustin Pop

cmdlib: Abstract OS checks

This patch moves the node-has-os checks to a separate function.

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

d512e84b 03/16/2010 04:05 pm Michael Hanselmann

Improve “gnt-cluster renew-crypto”

- Report exception text immediately instead of just logging it
- Remove leftover assertion from when it still used “gnt-cluster
modify”

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

8fe9239e 03/16/2010 03:29 pm Iustin Pop

Fix behaviour of gnt-node modify -C no

The current check on whether we require auto_promote or not is wrong, as
we check whether we will have exactly the correct number of master
candidates left. But it is fine if we have more (e.g. when CPS=10 and
mc_remaning=19) than the current number, and in that case we shouldn't...

168c1de2 03/15/2010 06:40 pm Michael Hanselmann

Rename SSL_CERT_FILE to NODED_CERT_FILE

To be consistent with RAPI_CERT_FILE, the rather generic named
“SSL_CERT_FILE” constant is renamed to “NODED_CERT_FILE”. The actual file
name is not changed.

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

6b7d5878 03/15/2010 06:40 pm Michael Hanselmann

Rightname confd's HMAC key

Currently, the ganeti-confd's HMAC key is called “cluster HMAC key” or
simply “HMAC key” everywhere. With the implementation of inter-cluster
instance moves, another HMAC key will be introduced for signing critical
data. They can not be the same, so this patch clarifies the purpose of the...

01b6558a 03/15/2010 06:18 pm Iustin Pop

Clarify the error message for ':' in PV names

As described in issue 93, just saying ':' is not a valid char can be
confusing.

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

2f414c48 03/15/2010 05:38 pm Iustin Pop

Implement conversion from drbd to plain

This is much simpler than the opposite, with fewer possibilities of
failures.

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

e29e9550 03/15/2010 05:38 pm Iustin Pop

Implement conversion from plain to drbd

This patch adds a new mode to instance modify, the changing of the disk
template. For now only plain to drbd conversion is supported, and the
new secondary node must be specified manually (no iallocator support).

The procedure for conversion works as follows:...

31624382 03/15/2010 05:29 pm Iustin Pop

Abstract check that an instance is down

Multiple LUs require that an instance is not running while they operate
on the instance (reinstall, rename, modify, recreate disks, deactivate
disks). The code to do this check is duplicate many times, and not very...

701384a9 03/15/2010 05:29 pm Iustin Pop

Abstract node free disk space check

Both create instance and grow disk check the free disk space on nodes
using the same, duplicate code. Since we'll need this in other places in
the future, we abstract the check into a new function.

The patch adjusts the error message to be more in-line with the one for...

5d55819e 03/15/2010 05:28 pm Iustin Pop

Abstract disk template verification

This is a simple check, but we'll need it in multiple places.

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

5029db65 03/15/2010 05:17 pm Iustin Pop

Implement disk adoption mode in gnt-instance

This patch modifies the parsing of the “--disk” argument to instance
create to accept “adopt” as a valid key, which builds the correct disk
structure for OpCreateInstance.

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

c3589cf8 03/15/2010 05:17 pm Iustin Pop

LUCreateInstance: implement disk adoption mode

This new mode, valid only for the plain template disk, allows creation
of an instance based on existing logical volumes (preserving data),
rather than creation of new volumes and OS creation.

The new mode works as follows:...

d8aee57e 03/15/2010 05:16 pm Iustin Pop

ConfigWriter: add an LV reservation manager

This patch adds an LV reservation manager to be used for LV names. Since
we now have four such managers, we create a list for easier release.

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

df4272e5 03/15/2010 05:16 pm Iustin Pop

LUCreateInstance: Move parameter init earlier

This way, the parameters are available in CheckArguments too.

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

6d4a1656 03/12/2010 05:45 pm Michael Hanselmann

Implement replacing cluster certs and keys via “gnt-cluster renew-crypto”

Recent changes to “gnt-cluster verify” made it complain on expiring SSL
certificates. While it was possible to replace the SSL certificates and
other cluster secrets manually before, doing so was cumbersome. Cluster...

7e49b6ce 03/12/2010 05:45 pm Michael Hanselmann

cli: Add helper function to stop and start whole cluster

Replacing cluster certificates and keys requires all cluster daemons to be
shut down. This might also be handy for the cluster merger tool, though
the function might need a few more extensions.

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

43575108 03/12/2010 05:44 pm Michael Hanselmann

bootstrap: Add new function to create cluster certs and keys

The code to generate cluster certificates, keys and secrets is currently
spread over several places. It makes sense to move it to a separate
function as we want to provide the user with the ability to automatically...

1d466a4f 03/12/2010 05:44 pm Michael Hanselmann

utils.CreateBackup: Use human-readable instead of seconds since Epoch

Seconds since the Epoch are not easily readable by a human. Using a
formatted timestamp makes it easier (e.g.
“….backup-2010-03-12_14_02_43.…”). This patch also makes OS logfiles use
this formatted timestamp....

b98bf262 03/12/2010 05:44 pm Michael Hanselmann

Verify cluster certificates in LUVerifyCluster

When using pyOpenSSL 0.7 or above, LUClusterVerify will start to show a
warning 30 days before a certificate expires. 7 days before the
certificate expires, the warning becomes an error. Once expired,
LUVerifyCluster will always report an error. The latter is also supported...

27e46076 03/12/2010 05:44 pm Michael Hanselmann

utils: Add function to extract X509 cert validity

X509 uses ASN1 GENERALIZEDTIME or UTCTIME to store certificate validity.
pyOpenSSL 0.7 and above allow us to retrieve both “notBefore” and
“notAfter” as strings. Parsing them turned out to be a challenge since...

d3100055 03/12/2010 05:44 pm Michael Hanselmann

Add constant with cluster X509 certificates

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

3ab991a4 03/12/2010 03:32 pm Iustin Pop

Merge branch 'stable-2.1' into devel-2.1

  • stable-2.1:
    Release version 2.1.1
    Update NEWS file for the 2.1.1 release
    Validate the os-specific hypervisor parameters

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

0cf5e7f5 03/12/2010 11:33 am Iustin Pop

Improve cluster verify with hypervisor errors

In case the hypervisor has issues on one node, currently
backend.VerifyNode will exit via an exception (two exit paths possible,
one via HypervisorError from hypervisor.Verify(), and one via RPCFail
from GetInstanceList). This is bad as it invalidates all other checks of...

c63355f2 03/11/2010 05:45 pm Iustin Pop

Fix wrong indentation

Sorry…

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

919ca415 03/11/2010 05:12 pm Iustin Pop

Extend JobExecutor to allow custom feedback_fn

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

5299e61f 03/11/2010 05:12 pm Iustin Pop

cli.JobExecutor: poll jobs in execution order

… rather than submission order. The results are still returned in the
submission order, and for this we needed to track internally the index
of the submission.

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

2de64672 03/11/2010 05:09 pm Iustin Pop

Add a partition function to split a list in two

This is similar to the Haskell function, except that the signature is
reverse to match the 'any' and 'all' Python functions.

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

92c1b5d6 03/11/2010 05:07 pm Iustin Pop

Fix cluster verify with simulate-errors

In simulate errors mode, the test "ntime_diff is not None" will be
ignored, and thus a None value will try to be formatted as %.01f. We
workaround this by formatting it before, and then only using %s, which
can format a 'None' value....

1feb39ec 03/11/2010 01:16 pm Guido Trotter

KVM: remove unused variable

We don't need the pwentry when checking if a username exists, just to be
sure the KeyError is not returned. Remove the variable, and thus shut up
lint.

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

cced4c39 03/11/2010 11:03 am Iustin Pop

Validate the os-specific hypervisor parameters

This adds a validation similar to the one for cluster-wide hypervisor
paramters.

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

d19d94db 03/10/2010 08:07 pm Guido Trotter

KVM: add security model and domain parameters

Initially we only support the "user" model (in which the user running
the virtual machine can be specified as an additional parameter).

We use usernames rather than uids in this mode, because the kvm -runas
flag doesn't support uids anyway, and we check the passed username for...

3424767f 03/10/2010 08:07 pm Guido Trotter

KVM security: add global constants

These constants add two new kvm hypervisor parameters, specifying the
security model (user/pool) and the security domain, within that model.

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

6873a52a 03/10/2010 04:02 pm Michael Hanselmann

http.auth: Disable pylint warnings

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

81196341 03/10/2010 03:56 pm Iustin Pop

Implement verify checks for node/instance names

Since we index the nodes and instances by their name, we should have
checks that the dict key to object.name mapping is correct.

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

44db3a6f 03/10/2010 02:15 pm Iustin Pop

Fix a python 2.6.5 compatibility

The upcoming python 2.6.5 release has a change that makes delattr(obj,
attr) fail for slots-enabled objects if the attr is not already set.

To prevent against this, we only run the delattr if the attribute is
already set....

84e0863d 03/10/2010 02:09 pm Guido Trotter

KVM: Remove boot restriction for paravirtual nics

Newer virtio can boot from the network perfectly well, so there's no
point in keeping this restriction in place. This will still fail on
older kernels.

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

c6a39fc2 03/10/2010 02:09 pm Guido Trotter

KVM: pass the instance name as the first kvm flag

This makes it the first argument show, for example under "ps".

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

d44ea6a3 03/10/2010 12:18 pm Michael Hanselmann

http.server: Improve request logging in debug mode

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

a8950eb7 03/10/2010 12:17 pm Michael Hanselmann

Provide unittests for http.auth

To simplify writing unittests, one data structure class in http.server is
also changed. According to the coverage utility, this provides 95%
coverage.

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

23ccba04 03/10/2010 12:17 pm Michael Hanselmann

http.auth: Fix bug with checking hashed passwords

When username and password were sent for a resource not requiring
authentication, it wouldn't be accepted if the user in question had a
hashed password. The reason was that the function GetAuthRealm used to...

4c61d894 03/09/2010 06:07 pm Iustin Pop

Add the auto_promote option to cli and gnt-node

This allows one to cleanly set a node offline and promote as needed
other nodes.

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

601908d0 03/09/2010 06:07 pm Iustin Pop

Rework the node modify for mc-demotion

The current code in LUSetNodeParms regarding the demotion from master
candidate role is complicated and duplicates the code in ConfigWriter,
where such decisions should be made. Furthermore, we still cannot demote
nodes (not even with force), if other regular nodes exist....

89e5ab02 03/09/2010 06:03 pm Iustin Pop

Fix node volumes list for stripped volumes

Currently backend.NodeVolumes() drops everything except the first PV,
thus we get a truncated result. The patch is not the nicest, as Python
doesn't have a simple `concat' function, so I had to change the list
comprehension to an explicit loop....

6d7b472a 03/09/2010 04:56 pm Iustin Pop

Fix typo that makes cluster verify to ignore hooks

The return from LUVerifyCluster should be True (or equivalent) for pass,
and False (or equivalent) for fail. The HooksCallBack function uses '1'
(= True) when a hook fails, which is exactly the opposite of what we...

6819dc49 03/09/2010 03:27 pm Iustin Pop

Fix redistribute config and offline nodes

We need to manually filter out offline nodes before using
rpc.call_upload_file and rpc.call_write_ssconf_files, since these method
are static (they work without a ConfigWriter instance) and thus do not
know which nodes are offline and which are not)....

17463d22 03/09/2010 02:27 pm René Nussbaumer

Add support for per-os-hypervisor parameters

This patch implements all modifications to support per-os-hypervisor
parameters in the framework.

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

f9faf9c3 03/09/2010 02:27 pm René Nussbaumer

cli: Add ArgOs for later use in gnt-os

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

760570a8 03/08/2010 05:50 pm Timothy Kuhlman

KVM: Fix unintended qemu-level bridging of nics

Each nic should be connected to its own qemu vlan, to avoid them all
bridging together.

Signed-off-by: Timothy Kuhlman <>
Reviewed-by: Guido Trotter <>
Signed-off-by: Guido Trotter <>...

b4478d34 03/08/2010 05:15 pm Michael Hanselmann

Support passing in file object in utils.FileLock

This way we can re-use file objects opened in other places. Also add more
unittests.

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

bdefe5dd 03/08/2010 05:15 pm Michael Hanselmann

Support arguments in utils.RunInSeparateProcess

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

cc4c9b91 03/08/2010 05:15 pm Michael Hanselmann

Convert utils.FileLock to utils.Retry

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

44caf5a8 03/08/2010 03:53 pm Iustin Pop

Validate the hostnames at creation time

This patch adds validation of new names used, i.e. at cluster init time,
node add time, and instance creation.

For instances, especially when using «--no-name-check» (which skips DNS
checks), we should validate the give name, and also normalize it...

26288e68 03/08/2010 03:53 pm Iustin Pop

Add a function to validate and normalize hostnames

This differs slightly from the specification, by allowing names to start
with digits, not checking the length of individual components, and
allowing underscores.

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

04a69a18 03/08/2010 03:53 pm Iustin Pop

ListVisibleFiles: require normalized path names

This patch changes ListVisibleFiles to raise ProgrammerError if it's
passed a non-absolute/non-normalized path name, and adds unittests for
this behaviour.

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

0411c011 03/08/2010 03:52 pm Iustin Pop

Switch more code to PathJoin

This should remove most of the remaining constructs which can be
replaced by PathJoin.

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

e51db2a6 03/08/2010 03:52 pm Iustin Pop

Add caller-validation on Disk.StaticDevPath

Since in objects we don't have access to utils.py, we add a warning that
the result value from objects.Disk.StaticDevPath might not be a valid
path, and change its only caller to validate the path.

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

30786fc9 03/08/2010 03:52 pm Iustin Pop

hv_kvm: remove hard-coded path constructs

This switches hv_kvm to PathJoin. There are still a few cases of direct
path construction, but those should be safe.

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

3b80eb2c 03/08/2010 03:51 pm Iustin Pop

hv_fake: remove hard-coded path constructs

This changes to hv_fake to PathJoin.

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