Statistics
| Branch: | Tag: | Revision:

root / lib @ 6396164f

# Date Author Comment
6396164f 06/01/2010 01:22 pm Guido Trotter

Move roman conversion to compat

The new TryToRoman function provides optional easy to use roman
conversion. Nunc cum demonstrationi unitati.

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

b9b5abcb 06/01/2010 11:47 am Iustin Pop

Add a new opcode timestamp field

Since the current start_timestamp opcode attribute refers to the inital
start time, before locks are acquired, it's not useful to determine the
actual execution order of two opcodes/jobs competing for the same lock.

This patch adds a new field, exec_timestamp, that is updated when the...

14aeab22 06/01/2010 11:39 am Guido Trotter

Fix IgnoreSignals on socket.error

Some confusion arose handling EINTR on this function: in python 2.6
socket.error is an IOError, and thus:
- It's an EnvironmentError
- It has an .errno member

In 2.4 and 2.5 it's not, and so its errno variable must be extracted...

2652b363 05/31/2010 08:17 pm Tom Limoncelli

RAPI client should convert urllib2.URLError to GanetiApiError

Signed-off-by: Tom Limoncelli <>
Reviewed-by: Michael Hanselmann <>

e43d4f9f 05/31/2010 03:16 pm Apollon Oikonomopoulos

KVM: Migration bandwidth and downtime control

Introduce 2 new hypervisor options, migration_bandwidth and migration_downtime
and implement KVM migration bandwidth and downtime control.

migration_bandwidth controls KVM's maximal bandwidth during migration, in...

b73360e3 05/31/2010 01:02 pm Balazs Lecz

Make utils.EnsureDirs() ignore umask

EnsureDirs() should create directories with the exact mode requested
in the arguments, but it currently applies the umask.
This patch makes it independent from the umask.

Signed-off-by: Balazs Lecz <>...

e0561198 05/27/2010 02:43 pm Iustin Pop

Fix two race conditions in reboot instance

If the instance crashes between backend.InstanceReboot checks the list
of running instances and the execution of hv_xen.RebootInstance,
ini_info will be None. And if the instance doesn't reboot fast enough,
new_info will be None. Both cases lead to “TypeError: unsubscriptable...

31d97b2a 05/25/2010 06:57 pm Guido Trotter

Support for latin friendly output in node list

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

32b1efa1 05/25/2010 01:16 pm Guido Trotter

SingleFileEventHandler: Remove try/except blocks

Since now we use the SingleFileEventHandler together with an error
handling asyncore dispatcher, we don't need the internal try/except
anymore.

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

e9c8deab 05/25/2010 01:16 pm Guido Trotter

ErrorLoggingAsyncNotifier

This mixes AsyncNotifier with GanetiBaseAsyncoreDispatcher to provide an
AsyncNotifier which will log errors, rather than bail out.

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

b11780bb 05/25/2010 01:16 pm Guido Trotter

daemon.GanetiBaseAsyncoreDispatcher

Abstract a few common functionalities between all ganeti asyncore
dispatchers:
- Handle errors by logging them, and then continue
- By default check sockets only for readability

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

f59dce3e 05/22/2010 09:58 am Guido Trotter

Mainloop: handle SIGINT as well (and terminate)

This is needed if daemons are in the foreground, and get ctrl+c-ed by
the user. Also add unittests to make sure the correct signals terminate
the mainloop.

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

d021e478 05/22/2010 09:58 am Guido Trotter

SingleFileEventHandler: update comments

The comments in the SingleFileEventHandler are still confd-specific.
Update them to make them generic for any single-file monitoring.

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

c666f1f4 05/21/2010 01:45 pm Guido Trotter

Make ConfdInotifyEventHandler a library function

Cut&Paste, plus the following changes:
- The class is renamed to SingleFileEventHandler
- The monitored filename must be passed in and doesn't default to the
ganeti cluster config file
- A small docstring is added to the class...

a2c965ea 05/21/2010 01:45 pm Guido Trotter

Comment on AsyncNotifier upstream's availability

Since we contributed AsyncNotifier back to the upstream pyinotify
project, we'll be able, one day, to remove the ganeti version of that
code. For now we still need it to support older distributions, but
having a note about when we'll be able to remove it is nice....

e22af31d 05/21/2010 01:45 pm Guido Trotter

Remove errors.ConfdFatalError

This exception is caught, but never thrown. It became useless when we
moved confd from on/off to enabled/disabled, but always running on all
nodes. Removing its definition and the code catching it can do no harm.

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

25942a6c 05/18/2010 02:08 pm Guido Trotter

Abstract the LUXI eom into a constant

Currently the EOM terminator is hardcoded on the server side, and is
customizable in the Transport object (with the default being the same as
the value found in the server), but not in the luxi client.

With this patch we move the value to constants, and remove the "fake"...

fbe27e2b 05/18/2010 02:08 pm Guido Trotter

KVM: vhost net acceleration support

This will only work on patched or newer (>= 2.6.34) kernels and with a
patched version of qemu-kvm.

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

5ed59e1e 05/18/2010 01:10 pm Michael Hanselmann

RAPI client: Handle urllib2.HTTPError and raise GanetiApiError

This allows users of the RAPI client to catch GanetiApiError for all HTTP
errors.

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

e8ebbd2b 05/17/2010 01:52 pm Michael Hanselmann

RAPI: /2/{nodes,instances}/$name should return 404 for unknown items

Currently they return a 500 Server Error, not really useful
for detecting nonexistent items.

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

f02fbd30 05/17/2010 01:52 pm Michael Hanselmann

Return disk_template from LUQueryInstanceData

Inter-cluster instance moves need the disk template. As they run
LUQueryInstanceData to get an instance's details, the disk template
must be returned.

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

591e5103 05/17/2010 01:52 pm Michael Hanselmann

RAPI client: Rename Get{Node,Instance}Info, add new GetInstanceInfo

GetInstanceInfo should return the resource /2/instances/$name/info,
but so far it returns /2/instances/$name. The same applies to
GetNodeInfo, which returns /2/nodes/$name. Both names are stripped...

f961e2ba 05/17/2010 01:52 pm Michael Hanselmann

RAPI client: Log request to be made

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

a3a5f850 05/17/2010 01:33 pm Iustin Pop

Add checks for master IP in cluster verify

This also updates a comment in the unittest for utils.py. We unittest
the new function for two things: correct reporting on real case (for
localhost), and correct reporting with a mocked-out TcpPing that returns...

b2efcd70 05/14/2010 07:03 pm Guido Trotter

Remove unused import from daemon.py

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

48bf6352 05/14/2010 06:46 pm Guido Trotter

Add a forgotten comment about overriding a method

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

3660fcf5 05/14/2010 06:46 pm Guido Trotter

AsyncUDPSocket.handle_error

By overriding the default asyncore handle_error (which closes the
socket) with our own version, which logs what happened but tries to
proceed, we can get rid of a couple of try/except blocks. The resulting
churn is deindentation of the internal code....

232144d0 05/14/2010 06:46 pm Guido Trotter

utils.IgnoreSignals

Remove duplicate code between a couple of asyncore related function by
having a function in charge of handling EINTR errors. Unittests included.

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

20601361 05/13/2010 07:11 pm Luca Bigliardi

Fix some pylint warnings

Disable warnings for:
- except Exception,
- use of __errno_location,
- redeclaration of handleError()

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

6ed0bbce 05/13/2010 06:48 pm Luca Bigliardi

Fix logging string format

Fix this pylint warning:
[W6501, Mlockall] Specify string format arguments as logging function parameters

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

05b35f15 05/13/2010 06:25 pm Luca Bigliardi

Fix Filehandler / FileHandler typo

Fix typo spotted by pylint:
E1101:2095:LogFileHandler.handleError: Module 'logging' has no 'Filehandler' member

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

8a47b447 05/13/2010 04:58 pm Michael Hanselmann

RAPI client: Implement instance creation

Currently this only supports the new instance creation request data
format version 1, but support for the old version can be easily
implemented.

Most arguments are optional and documented in the RAPI documentation....

6395cebb 05/13/2010 04:58 pm Michael Hanselmann

RAPI: Add new request data format for instance creation

As mentioned in commit d975f482d, the current way of creating an
instance via RAPI is not very flexible. With this patch, a new
instance creation request data format is introduced and documented.
Support can be detected by checking the list of features returned...

5ef5cfea 05/13/2010 04:58 pm Michael Hanselmann

Mention RAPI client in documentation

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

af6433c6 05/13/2010 04:58 pm Michael Hanselmann

rapi.baserlib: Add function to check variable type

Also add a separate function to retrieve body parameters. Having
it separate (independent of a class instance) will make it easier
to unittest users of this function.

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

7eac4a4d 05/13/2010 04:57 pm Michael Hanselmann

Add new /2/features RAPI resource

The /2/features RAPI resource can be used to detect optional
features implemented by the RAPI server. This will be used
to recognize servers implementing a new request format for
instance creation requests.

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

ff917534 05/13/2010 04:32 pm Luca Bigliardi

Daemons conditionally setup console logging

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

49e60a28 05/13/2010 04:32 pm Luca Bigliardi

Use LogFileHandler conditionally in SetupLogging

Add a parameter to SetupLogging to use LogFileHandler (default is off)

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

de3b8e39 05/13/2010 04:32 pm Luca Bigliardi

Introduce LogFileHandler class

Add a log handler class which logs to /dev/console in case of logging errors.

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

481d47e8 05/13/2010 04:32 pm Luca Bigliardi

Add /dev/console constant

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

1af6ac0f 05/13/2010 04:32 pm Luca Bigliardi

Lock PowercycleNode child in memory

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

4b6fa0bf 05/13/2010 04:31 pm Luca Bigliardi

Introduce Mlockall()

Add Mlockall() utility to lock current process' virtual adress space into RAM.

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

12eff9b9 05/12/2010 05:30 pm Michael Hanselmann

Fix wrong variable name in commit d975f482

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

d975f482 05/12/2010 02:54 pm Michael Hanselmann

RAPI: Add initial support for instance creation request version

The way the resource /2/instances expects its request data (e.g.
instance name, disks, NICs) to be formatted in a dict is not
very extensible. HV and BE parameters are interleaved with all
other values. In commit 495cfdf0 a new parameter “mode” was added...

682f7601 05/12/2010 02:10 pm Guido Trotter

Convert some ReadFile calls to ReadOneLineFile

For passwords we require strict oneliners, we're a bit more lax with pid
and uid files.

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

e587b46a 05/12/2010 02:10 pm Guido Trotter

utils.ReadOneLineFile()

Read the first non-empty file line. When strict is set, abort if more
than one line is non-empty. Some unittests inspired by the reverted ones
from commit b774bb106cc28d008e790ad2666eb64c76866fa0, and some new ones.

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

582ed043 05/12/2010 02:01 pm Guido Trotter

Remove oneline= parameter from utils.ReadFile

This partially reverts commit b774bb106cc28d008e790ad2666eb64c76866fa0.
Unittests unrelated to that particular functionality but introduced in
that commit are left untouched. Since the temporary directory is now...

0d9bc5d2 05/12/2010 01:41 pm Michael Hanselmann

RAPI client: Fix SSL error reporting for real

My previous patch, commit 857705e8, helped in one particular
situation where the exception didn't contain any arguments
(pyOpenSSL reporting a WantReadError, which shouldn't occur with a
blocking socket anyway). With this patch, more common and uncommon...

857705e8 05/11/2010 08:28 pm Michael Hanselmann

RAPI client: Improve SSL error reporting

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

1068639f 05/11/2010 08:27 pm Michael Hanselmann

RAPI client: Don't check node role in client

Only the server knows which node roles can be set via RAPI.
Constants are provided for convenience.

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

bfc2002f 05/11/2010 08:27 pm Michael Hanselmann

RAPI client: Update ReplaceInstanceDisks

- The RAPI client shouldn't check the replacement mode as only
the server knows which ones are valid (constants are still
provided for convenience)
- Disks shouldn't be a list of names, but of indexes

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

fde28316 05/11/2010 08:27 pm Michael Hanselmann

RAPI client: Fix behaviour of “allocatable” storage flag

When modifying a storage unit, the “allocatable” flag should default
to “no modification”. This replicates the behaviour of the command
line interface.

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

10f5ab6c 05/11/2010 08:27 pm Michael Hanselmann

RAPI client: Encode boolean and None query values

Boolean values must be passed as 0 or 1. None should be an empty
value ("").

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

75f53ffe 05/11/2010 08:27 pm Michael Hanselmann

RAPI client: No longer check storage type locally

Only the RAPI server (actually masterd) knows which storage types
are valid. The exception can no longer be raised as the type is
only checked in the job.

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

a198b2d9 05/11/2010 08:27 pm Michael Hanselmann

RAPI client: Add constant for RAPI version

This reverts a60e3cb0a partially by moving the RAPI version into a constant.

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

20b509de 05/11/2010 06:04 pm Michael Hanselmann

Add RAPI client utility module with RAPI PollJob function

The RAPI client module shouldn't depend on any Ganeti module, yet it's
useful to have some Ganeti-specific code, like a PollJob function for
RAPI.

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

dfc8ad25 05/11/2010 06:04 pm Michael Hanselmann

RAPI client: Don't assume job IDs to be numeric

Signed-off-by: Michael Hanselmann <>
Reviewed-by: David Knowles <>

8a019a03 05/11/2010 05:59 pm Michael Hanselmann

RAPI client: Include HTTP error code in GanetiApiError exception

Having the HTTP error code allows users of the class to act differently based
on the error code.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: David Knowles <>

d9b67f70 05/11/2010 05:31 pm Michael Hanselmann

RAPI client: Allow waiting for job changes

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

793a8f7c 05/11/2010 05:31 pm Michael Hanselmann

RAPI: Allow waiting for job changes

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

cf9ada49 05/11/2010 05:31 pm Michael Hanselmann

RAPI client: Rename “DeleteJob” to “CancelJob”

Jobs can't be deleted, but cancelled (even though the HTTP method
“DELETE” is used).

Signed-off-by: Michael Hanselmann <>
Reviewed-by: David Knowles <>

cfc03c54 05/11/2010 05:31 pm Michael Hanselmann

RAPI client: Various code style changes

- Replace hardcoded values with constants
- Code formatting
- Exception messages without periods and fixed string formatting

Signed-off-by: Michael Hanselmann <>
Reviewed-by: David Knowles <>

768747ed 05/11/2010 05:30 pm Michael Hanselmann

RAPI client: Always pass _SendRequest args as positional

Signed-off-by: Michael Hanselmann <>
Reviewed-by: David Knowles <>

ccd6b542 05/11/2010 05:29 pm Michael Hanselmann

RAPI client: Simplify URL construction

Signed-off-by: Michael Hanselmann <>
Reviewed-by: David Knowles <>

d3844674 05/11/2010 05:29 pm Michael Hanselmann

RAPI client: Instantiate JSON encoder only once

Signed-off-by: Michael Hanselmann <>
Reviewed-by: David Knowles <>

cd577680 05/11/2010 05:29 pm Michael Hanselmann

RAPI client: Always return job ID

Even removing tags returns a job ID.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: David Knowles <>

a60e3cb0 05/11/2010 05:27 pm Michael Hanselmann

RAPI client: Hardcode version in URLs

If the version changes, the API is likely to change as well. Not
having to ask for the version first makes the code simpler.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: David Knowles <>

9279e986 05/11/2010 05:27 pm Michael Hanselmann

Remove httplib2 dependency from ganeti.rapi.client

- It's possible to implement all functionality in ganeti.rapi.client
using Python's standard modules httplib and urllib2
- By doing so, proper SSL certificate verification is implemented
- Adjust some of the code to Ganeti's code style (this is not yet...

b774bb10 05/11/2010 02:01 pm Michael Hanselmann

utils.ReadFile: Add parameter to read only one line

Reading only one line is useful for reading passwords from files. This
also adds unittests for utils.ReadFile.

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

95f84636 05/11/2010 11:48 am Iustin Pop

Fix tiny typo in cluster verify

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

4e338533 05/10/2010 05:17 pm Michael Hanselmann

cli: Make PollJob generic to support other protocols

By separating the LUXI-specific code and stdio-related code
into separate classes, we can make cli.PollJob protocol-
agnostic, allowing it to be used with RAPI.

This patch also adds unittests for cli.PollJob....

f724a702 05/10/2010 12:15 pm Balazs Lecz

Force ssh to allocate a tty

This is required to avoid the
"Pseudo-terminal will not be allocated because stdin is not a terminal."
ssh error message in case a Ganeti script is run non-interactively.

Signed-off-by: Balazs Lecz <>
Reviewed-by: Iustin Pop <>

40bc67e1 05/10/2010 11:56 am Guido Trotter

Retry{Again,Timeout}: explain reraising

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

5ef5ea45 05/10/2010 11:56 am Guido Trotter

IsProcessAlive: retry stat() a few times

On multiprocessor dom0 stat() on /proc can sometimes return EINVAL.
Before giving up, we try a few times to get a consistent answer.

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

506be7c5 05/10/2010 11:56 am Guido Trotter

utils.Retry: pass up timeout arguments

If Retry has to fail with RetryTimeout, it might be useful to pass the
Retry argument to RetryTimeout, to help debugging outside the Retry
cycle. We also define a RetryTimeout.RaiseInner() helper, to re-raise an
exception passed to RetryAgain. All served with a side of unit tests....

036c7f68 05/07/2010 05:25 pm Guido Trotter

Merge branch 'stable-2.1' into devel-2.1

  • stable-2.1:
    Bump version for 2.1.2.1 release
    Update NEWS for Ganeti 2.1.2.1
    KVM: only export instance tags if present

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

1cc831ea 05/07/2010 04:14 pm Guido Trotter

KVM: only export instance tags if present

Currently non-tagged instances fail starting with a TypeError.

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

5bae14d9 05/07/2010 02:34 pm Guido Trotter

ssh.GetUserFiles: move to EnsureDirs

We also create a generic SECURE_DIR_MODE constant, rather than
hardcoding 0700 in the code.

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

98c98ab9 05/07/2010 02:34 pm Guido Trotter

Hypervisors: use utils.EnsureDirs

Swap a few os.mkdir calls with utils.EnsureDirs

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

0a865080 05/07/2010 02:34 pm Guido Trotter

backend: remove a couple of useless mkdir calls

Those directories must exist for the node daemon to run (it's in the
node daemon's list of ensured directories) and those functions are only
called by the node daemon, so there's no point in those checks+mkdir...

5a062513 05/07/2010 02:34 pm Guido Trotter

daemon.GenericMain: fix docstring

The docstring reports a wrong type for the "dirs" argument. Fixing.

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

c33549ef 05/07/2010 02:34 pm Guido Trotter

jstore: use EnsureDirs, and add more constants

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

f2f88abf 05/04/2010 08:13 pm David Knowles

Small fixes for RAPI client

- Always check SSL certificate for validity
- Actually JSON-encode HTTP content

Signed-off-by: David Knowles <>
Signed-off-by: Michael Hanselmann <>
Reviewed-by: Michael Hanselmann <>

58385fad 05/03/2010 06:27 pm Iustin Pop

verify cluster: check /etc/hosts consistency

If we are told to modify /etc/hosts, then verify its consistency during
cluster verify.

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

7672a621 05/03/2010 06:27 pm Iustin Pop

Cleanup /etc/hosts during node removal

It seems that commit d8470559 dropped the cleanup of /etc/hosts when a
node is removed from the cluster. I don't know for sure, but it seems
accidental. As long as we add it to /etc/hosts, we should clean it up
too....

87e510fd 04/28/2010 02:57 pm Apollon Oikonomopoulos

KVM: make tags available in KVM_NET_SCRIPT

Make instance tags available as a space-separated list during the execution of
the network setup script. This allows tag-based control of things like firewall
rules and/or networking setup.

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

1c69ad80 04/28/2010 02:57 pm Guido Trotter

Remove "ssconf.CheckMasterCandidate"

This function is not used anymore, so there's no point in keeping it
around.

This reverts commit 3f71b464ad5cdd1f1b53f2a31a4eef4e2a5550cc, apart from
a one empty line conflict in ssconf.py

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

f93f2016 04/23/2010 06:07 pm Michael Hanselmann

masterd: Log PID, UID and GID of connected client

This can be very useful if client programs run as non-root.

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

e311ed53 04/22/2010 05:55 pm Michael Hanselmann

Factorize LUExportInstance

Apart from moving parts of the code to separate functions, error handling
is also improved by making sure snapshots are always removed.

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

c7e4b037 04/22/2010 04:20 pm Balazs Lecz

Use ints instead of strings to represent user-ids

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

14b3f969 04/22/2010 02:32 pm Iustin Pop

Fix broken commit 9e302a8

Commit 9e302a8 split the StopInstance function in two without properly
duplicating the local variables.

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

2892a4c9 04/22/2010 02:32 pm Iustin Pop

ssh: make quiet configurable

Currently both CopyFileToNode and BuildCmd hardcode "-q" in the options.
This patch moves this setting as a configurable option to
_BuildSshOptions.

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

b427788e 04/22/2010 12:11 pm Iustin Pop

SSH: do not check IPs

Since we use the cluster name for the SSH known_hosts file, ssh will
always detect a changed IP (since we never connect to the cluster master
name, but the node names), and will complain about it/try to update the
user known hosts file (since that is /dev/null, it doesn't matter, but...

cea881e5 04/21/2010 08:48 pm Michael Hanselmann

Add separate module for backported language functionality

utils.py, where they were before, is already huge.

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

9e302a8c 04/21/2010 08:22 pm Iustin Pop

hv_chroot: move unmount to CleanupInstance()

This allows cleanup to be done properly if the "instance" wasn't running
at all (based on the CleanupInstance framework, instead of the retry in
hypervisor).

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

96d1a0c5 04/21/2010 08:22 pm Iustin Pop

LUSetClusterParams: initialize needed parameters

… since the opcode doesn't auto-initialize to None.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

d271c6fd 04/21/2010 08:22 pm Iustin Pop

Add a hypervisor constant for migration support

This variable can be used by other tools to determine in a generic way
whether a given hypervisor supports migration or not.

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

74a4c11b 04/21/2010 08:01 pm Guido Trotter

Fix indentation error

Commit 9cf4321fc39ec36359d9c90b22b36d33b6adc2f4 indented some lines by
4 spaces rather than 2, and was git-amed without noticing. Fixing.

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

fde0203b 04/21/2010 07:26 pm Michael Hanselmann

utils: Add function for partial application of function arguments

The function's code was mostly copied from Python's documentation
and it's equivalent to “functools.partial” in Python 2.5 and above.

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

9cf4321f 04/21/2010 05:48 pm Apollon Oikonomopoulos

Only use boot=on on non-ide disks only (KVM)

boot=on implies that KVM boots using extboot. This is only required
to boot non-IDE disks and has the side-effect that there is at most
one bootable device. This behaviour breaks some operating systems,
most notably the windows installer that tries to chainload the hard-disk...