Statistics
| Branch: | Tag: | Revision:

root / lib @ 7e3c1da6

# Date Author Comment
7e3c1da6 05/21/2010 06:16 pm Michael Hanselmann

import-export daemon: Allow changing compression method

For example, exports on the same node shouldn't be compressed.

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

39019f91 05/21/2010 02:24 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    Add asyncnotifier unittests
    Make ConfdInotifyEventHandler a library function
    Comment on AsyncNotifier upstream's availability
    Remove errors.ConfdFatalError
    TestMainloop: test scheduler priorities as well
    Fix race condition in mainloop unittest...
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 <>...

ebeb600f 05/18/2010 06:53 pm Michael Hanselmann

RAPI changes for instance moves

Two new resources are added:
- /2/instances/$name/prepare-export
- /2/instances/$name/export

The documentation for the existing resource for creating instances is updated
for remote imports. The RAPI client is extended for the new resources....

9bf56d77 05/18/2010 06:53 pm Michael Hanselmann

Implement opcode changes for remote-import

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

4a96f1d1 05/18/2010 06:53 pm Michael Hanselmann

Implement opcode changes for remote-export

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

1410fa8d 05/18/2010 06:53 pm Michael Hanselmann

Add opcode to prepare export

To prepare a remote export, the X509 key and certificate need to be generated.
A handshake value is also returned for an easier check whether both clusters
share the same cluster domain secret.

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

b38599d8 05/18/2010 05:14 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    Abstract the LUXI eom into a constant
    KVM: vhost net acceleration support

Conflicts:
lib/luxi.py
- trivial

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

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

e9f637cb 05/18/2010 02:06 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1:
    ganeti-cleaner: Write log file with removed files
    RAPI client: Handle urllib2.HTTPError and raise GanetiApiError

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

dfb34028 05/18/2010 01:30 pm Michael Hanselmann

Add function to read cluster domain secret

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

895eb320 05/18/2010 01:11 pm Michael Hanselmann

LUExportInstance: Remove instance only if export was successful

Until now, the instance was always removed (if asked for by the
user). In case of export errors however, it shouldn't.

Signed-off-by: Michael Hanselmann <>
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 <>

31ff0247 05/17/2010 02:17 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1:
    RAPI: /2/{nodes,instances}/$name should return 404 for unknown items
    ganeti-masterd: Improve error logging for client requests
    Return disk_template from LUQueryInstanceData
    RAPI client: Rename Get{Node,Instance}Info, add new GetInstanceInfo...
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...

c7406bbe 05/14/2010 07:07 pm Guido Trotter

RetryOnSignal: handle socket error as well

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

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

1c54156d 05/13/2010 07:40 pm Luca Bigliardi

Merge branch 'devel-2.1'

Conflicts:
daemons/ganeti-noded
lib/daemon.py
lib/rapi/baserlib.py
lib/rapi/rlib2.py
lib/utils.py

Signed-off-by: Luca Bigliardi <>
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...

40523663 05/12/2010 02:40 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    Convert some ReadFile calls to ReadOneLineFile
    utils.ReadOneLineFile()
    Remove oneline= parameter from utils.ReadFile
    install.rst: update os version and add KVM notes
    INSTALL: update hypervisor requirements
    RAPI client: Fix SSL error reporting for real...
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...

5e26633b 05/11/2010 09:25 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1: (29 commits)
    RAPI client: Improve SSL error reporting
    RAPI client: Don't check node role in client
    RAPI client: Update ReplaceInstanceDisks
    RAPI client: Fix behaviour of “allocatable” storage flag
    RAPI client: Encode boolean and None query values...
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 <>

dcaabc4f 05/10/2010 07:21 pm Michael Hanselmann

Fix import/export

63bcea2a5 added file checks for import/export, but unfortunately they
were broken.

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

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

01144827 05/10/2010 12:44 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1: (22 commits)
    NEWS: fix empty lines
    Fix a unittest name and docstring
    Force ssh to allocate a tty
    Fix a unittest docstring
    IsProcessAlive: retry stat() a few times
    Retry{Again,Timeout}: explain reraising
    utils.Retry: pass up timeout arguments...
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 <>

63bcea2a 05/04/2010 03:39 pm Michael Hanselmann

backend: Check paths and always write CA file for import/export daemon

Once the import/export daemon uses separate users, the node daemon file (which
is used for intra-cluster transfers) might not be readable anymore. Always
writing it to a daemon-specific file will make this easier....

3718bf6d 05/04/2010 03:38 pm Michael Hanselmann

Add optional “salt” argument to utils.{,Verify}Sha1Hmac

We're using salted hashes all over the place.

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

615aaaba 05/04/2010 03:38 pm Michael Hanselmann

Use utility functions for HMAC

HMAC will be used in more places. Centralizing some parts can't hurt.

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

387794f8 05/04/2010 03:38 pm Michael Hanselmann

LUExportInstance: Move exporting code to helper class

This will simplify the implementation of intra-cluster instance
exports and reduces the number of local variables in
LUExportInstance.Exec.

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

c1e7897d 05/04/2010 03:37 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1:
    cfgupgrade: allow working with relative paths
    Cleanup /etc/hosts during node removal
    verify cluster: check /etc/hosts consistency
    Change the migration message
    qa: enable early release during parallel burnin...
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....

24d70417 04/29/2010 04:30 pm Michael Hanselmann

Move cmdlib._VerifyCertificate to utils

This function will also be useful for inter-cluster instance
moves for verifying certificates.

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

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

b9768937 04/27/2010 05:22 pm Michael Hanselmann

Add wrapper class for signal.set_wrapper_fd

Managing file descriptors is always a bit tricky. Having this in a separate
class is better.

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

1077f25c 04/26/2010 02:30 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1:
    masterd: Log PID, UID and GID of connected client
    qa: Use qa_utils.UploadFile to upload rapi_users file
    devel/upload: add --no-debug option

Conflicts:
lib/utils.py: Trivial

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

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