Statistics
| Branch: | Tag: | Revision:

root / lib / backend.py @ ee045466

History | View | Annotate | Download (113.6 kB)

# Date Author Comment
ee045466 10/11/2012 12:56 pm Michael Hanselmann

Move constant for /etc/hosts to pathutils

Needed for coming patches.

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

b3589802 10/08/2012 02:39 pm Michael Hanselmann

backend: Use utils.IsBelowDir instead of local code

utils.IsBelowDir is actually tested and doesn't allow writes to
“…/queue*”, like the old code here did.

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

3439fd6b 10/05/2012 07:27 pm Michael Hanselmann

Check fingerprint of file with allowed file storage paths

This makes differences show up in “gnt-cluster verify”.

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

63a3d8f7 10/05/2012 05:17 am Michael Hanselmann

backend: Check for shared storage also

If normal file storage was disabled but shared storage enabled,
“_TransformFileStorageDir” would still throw an exception.

in “opcodes._CheckStorageType” there's also a check, but I wasn't quite
sure what the correct way of handling it was, so I added a TODO comment....

ee501db1 10/04/2012 04:38 am Michael Hanselmann

Move a function from backend to ssconf

The “WriteSsconfFiles” function is used to write ssconf files. By moving
it we can avoid importing backend into bootstrap. The latter is imported
by CLI programs and backend doesn't have much to do with them.

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

0188611b 10/03/2012 06:03 pm Michael Hanselmann

Remove constant for disk wipe block size

It is dangerous to have this block size as a global constant as that
could give the impression of it being easily changed. Doing so without
further adjustments to how “dd” is called will lead to disks not being
wiped properly....

052783ff 09/28/2012 03:14 pm Michael Hanselmann

Stop hardcoding root user

Some parts of the code still use a hardcoded user name: root. This patch
replaces all with a constant specified at build time. The end goal is to
make it possible to run a Ganeti cluster without any special privileges
(of course this will prevent some functionality from working)....

1cb97324 09/26/2012 07:35 pm Agata Murawska

instance_info now returns vcpus

instance_info and all_instances_info calls had different per-instance
return types, this commit fixes the mismatch.

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

cffbbae7 09/25/2012 05:28 pm Michael Hanselmann

Implement virtual cluster support in Python code

- pathutils: Prepend node-specific prefix path
- RPC: Use virtual paths (see vcluster.py)
- SSH: Pass environment variables, use destination's node directory when
copying files using scp, use GANETI_HOSTNAME to determine hostname...

710f30ec 09/18/2012 06:09 pm Michael Hanselmann

Migrate lib/backend.py from constants to pathutils

File system paths moved from constants to pathutils.

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

3329f4de 09/18/2012 05:58 pm Michael Hanselmann

constants: Move most paths to separate module

This is inpreparation for the implementation of virtual clusters. Many
paths will change based on an environment variable and are no longer
constant and should no longer be in “constants.py”. Since “constants.py”...

5ae4945a 08/23/2012 02:41 pm Iustin Pop

Bump pep8 version to 1.2

Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's:

- bump version in the docs
- silence some new checks that are wrong due to our indent=2 instead of 4
- fix lots of errors in the code where the indentation was wrong by 1...

cad0723b 07/05/2012 03:20 pm Iustin Pop

Fix DRBD resize code

There are two bugs in the current resize code, affecting mostly DRBD.

First, due to bugs in old DRBD versions (pre 8.0.14), the code currently
calls `drbdsetup resize' on both the primary or secondary. However,
this is actually wrong per current DRBD (from drbdsetup(8)):...

615b7a0f 05/11/2012 05:01 pm Iustin Pop

Merge branch 'devel-2.5'

  • devel-2.5:
    Update NEWS and bump version for 2.5.1 release
    Fix gnt-group --help display
    Fix hardcoded Xen kernel path
    Fix grow-disk handling of invalid units
    Accept both PUT and POST in noded
    Preserve bridge MTU in KVM ifup script...
5fa90892 05/11/2012 04:40 pm Iustin Pop

Merge commit 'v2.5.1' into devel-2.5

  • commit 'v2.5.1':
    Update NEWS and bump version for 2.5.1 release
    Fix gnt-group --help display
    Fix hardcoded Xen kernel path
    Fix grow-disk handling of invalid units
    Accept both PUT and POST in noded
    Preserve bridge MTU in KVM ifup script...
9a6ade06 05/09/2012 12:31 pm Iustin Pop

Add a default PATH variable to OS scripts env

In commit 896a03f6 I cleaned up the environment for OS scripts,
however I think that was a bit too extreme - it breaks our own
instance-debootstrap hooks, because for example dpkg (called from the
grub script) requires PATH to be set....

a1f38213 05/07/2012 11:33 am Iustin Pop

Fix LVM volume listing with newer LVM

Per commit 0304f0e, newer LVM has extended the lv_attr field. However,
that commit was incomplete as we examine this attribute in another
place in the code.

Thanks to user alperhome, the _LVSLINE_REGEX in lib/backend.py also...

ebe466d8 01/17/2012 03:01 pm Guido Trotter

Add instance_balloon_memory rpc

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

eb93b673 12/08/2011 06:03 pm Guido Trotter

Move ErrnoOnStr backend function to utils

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

94dcbdb0 12/01/2011 01:04 pm Andrea Spadaccini

Use disk parameters in noded

  • add the params attribute to BlockDev, and add the corresponding
    parameter to all the BlockDev classes;
  • change the Create, Assemble and FindDevice factory functions interface
    to accept as parameters an objects.Disk instance and a list of...
1e89a135 12/01/2011 12:38 pm Michael Hanselmann

More fixes after commit 78519c106

A quick QA run successfully finished with these changes.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Andrea Spadaccini <>

ff3be305 11/30/2011 03:52 pm Michael Hanselmann

Fix “node_info” RPC result

Commit 78519c106 broke everything. Here's the fix.

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

78519c10 11/30/2011 12:26 pm Michael Hanselmann

Change “node_info” RPC to accept multiple VGs/hypervisors

Keeping the node state up to date will require information from multiple
VGs and hypervisors. Instead of requiring multiple calls this change
allows a single call to return all needed information. Existing users...

1db993d5 11/22/2011 04:53 pm Guido Trotter

ImportExport: use max and min memory params

Import uses the old "memory" parameter to populate the two new ones, if
they're not overridden already.

FinalizeExport exports minmem and maxmem, but also memory, as maxmem, to
allow importing to older ganeti clusters....

d529599f 11/21/2011 12:04 pm Andrea Spadaccini

Set DRBD sync speed in DRBD8.Assemble

Instead of relying on clients of the class for setting the device speed
(and, in general, the DRBD parameters), move this responsibility inside
the Assemble method.

Signed-off-by: Andrea Spadaccini <>...

702eff21 11/14/2011 05:18 pm Andrea Spadaccini

Use master IP address setup script in backend

Replace the code in backend.ActivateMasterIp and
backend.DeactivateMasterIp with the master IP address setup script,
either the default one or the one provided by the user.

- Convert to string the netmask parameter in _BuildMasterIpEnv...

57c7bc57 11/14/2011 05:18 pm Andrea Spadaccini

Change master IP address RPCs for external script

Change the master IP address RPC call chain to accept the
use_external_master_ip_script parameter. Introduces an unused parameter
in backend.ActivateMasterIp and backend.DeactivateMasterIp, that will be
used in the next commit....

17b0b812 11/14/2011 05:18 pm Andrea Spadaccini

Update cluster verify to check IP address scripts

Update cluster-verify to check the integrity of the default master IP
address setup script and the presence and executability of the external
one (if currently in use by the cluster).

Signed-off-by: Andrea Spadaccini <>...

9e6014b9 11/07/2011 04:32 pm Andrea Spadaccini

Improve error handling in netmask change

- check if the master IP with the old netmask is up before attempting to
change the netmask (to avoid a failed change netmask resulting in an
undesired activation of the master IP);
- improve error messages of the backend function;...

3ccd3243 11/03/2011 04:39 pm Andrea Spadaccini

Derive IP hooks env variables from RPC parameter

Let the environment variables of the master IP turnup/turndown be
derived from the parameter of the RPC itself (that is of type
objects.MasterNetworkParameters in both cases).

Signed-off-by: Andrea Spadaccini <>...

c79198a0 11/03/2011 04:39 pm Andrea Spadaccini

Pass MasterNetworkParameters instances in RPCs

Pass instances of objects.MasterNetworkParameters when calling RPCs for
activation and deactivation of master IP.

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

91ae95fd 11/03/2011 04:39 pm Andrea Spadaccini

Uniform master IP activation and deactivation

Add the master IP family parameter to the master IP deactivation RPCs,
so that the activation and deactivation interfaces are uniform.

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

95a39a77 11/02/2011 03:36 pm Andrea Spadaccini

Fix overriding of ActivateMasterIp params

In the process of reworking the patches for master, I forgot to remove a
call to GetMasterInfo() that overrides the parameters passed via RPC.
This patch fixes this issue.

Signed-off-by: Andrea Spadaccini <>...

3a3e4f1e 11/02/2011 03:18 pm Andrea Spadaccini

Add netmask and IP version to master IP hooks env

Add the master netmask and master IP version parameters to the hooks and
document them. In this way, the hook environment building function can
be reused for the planned master IP turnup changes.

Signed-off-by: Andrea Spadaccini <>...

41e079ce 11/02/2011 03:03 pm Andrea Spadaccini

Explicitly pass params to change_master_netmask

Make the master explicitly pass the parameters to the
change_master_netmask RPC, and change all the call flow to use the new
interface.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

96e0d5cc 11/02/2011 03:03 pm Andrea Spadaccini

Explicitly pass params to deactivate_master_ip

Make the master explicitly pass the parameters to the
deactivate_master_ip RPC, and change all the call flow to use the new
interface.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

8da2bd43 11/02/2011 03:03 pm Andrea Spadaccini

Explicitly pass params to activate_master_ip

To remove the usage of ssconf in the backend, the master needs to push
the parameters of activate_master_ip to the backend.

This patch changes the entire call path of activate_master_ip to use the
new interface....

28aedbc1 11/01/2011 09:09 pm Andrea Spadaccini

Add master IP turnup and turndown hooks

Reviewed-by: Michael Hanselmann <>
Signed-off-by: Andrea Spadaccini <>

20d38e8a 11/01/2011 09:09 pm Andrea Spadaccini

Add RunLocalHooks decorator

Add the RunLocalHooks decorator, that allows the execution of hooks
locally. Also, add a RunLocalHooks method to HooksRunner, to adapt the
signature of HooksRunner.RunHooks to the one expected by HooksMaster,
and also to check that the hooks are being executed locally....

2d88fdd3 11/01/2011 08:37 pm Andrea Spadaccini

Add master IP turnup and turndown hooks

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

0fa481f5 11/01/2011 08:37 pm Andrea Spadaccini

Add RunLocalHooks decorator

Add the RunLocalHooks decorator, that allows the execution of hooks
locally. Also, add a RunLocalHooks method to HooksRunner, to adapt the
signature of HooksRunner.RunHooks to the one expected by HooksMaster,
and also to check that the hooks are being executed locally....

7dcf333d 10/31/2011 05:54 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5:
    Fix wrong headers and licences
    Update NEWS and increase to 2.4.5
    Fix parameters of RpcResult in hooks unit tests
    Fix a too long line.
    Move RenameFile to the new functions
    ensure_dirs: Move some useful functions into utils....
714ff97c 10/28/2011 12:34 pm Andrea Spadaccini

Use GetClassFromIpFamily in ActivateMasterIp

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

97298dc9 10/21/2011 04:16 pm René Nussbaumer

Merge branch 'stable-2.5' into devel-2.5

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

833391a0 10/21/2011 04:00 pm René Nussbaumer

Merge branch 'devel-2.4' into stable-2.5

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

73ebb9ff 10/20/2011 04:30 pm Guido Trotter

Merge branch 'devel-2.5'

  • devel-2.5:
    Allow per-hypervisor optional files
    Add hypervisors ancillary files list
    xen: abstract a few hardcoded strings as constants

Conflicts:
lib/cmdlib.py
- trivial

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

8e5a705d 10/20/2011 03:43 pm René Nussbaumer

Fix queue archive creation with wrong permissions

On a master failover some of the archive dirs might have wrong
permissions in the non-root model. This is due to the nature of noded
still running as root and the job queue is synced that way. This patch
will fix this behaviour by setting the permissions accordingly....

69ab2e12 10/20/2011 03:04 pm Guido Trotter

Add hypervisors ancillary files list

These lists will be used to declare some of the files not necessarily
needed on all nodes. The files selected are files without which the
various hypervisors can still work, but that when they are present
should be synchronized across the cluster (or node group)....

9849cec7 10/18/2011 05:21 pm Guido Trotter

Revert "Added SPICE TLS option and related cert paths"

This reverts commit bfe86c763a9ff1b481d799537ff0f0cf6740dfd1.
This commit will be readded on master.

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

9888b9e6 10/07/2011 08:02 pm Andrea Spadaccini

Don't send gratuitous ARP if master IP setup fails

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

909b3a0e 10/05/2011 02:48 pm Andrea Spadaccini

Restore backend.GetMasterInfo return values order

Change 5a8648eb609f7e3a8d7ad7f82e93cfdd467a8fb5 changed the order of the
return values of backend.GetMasterInfo(). This broke the users of the
master_info RPC.

This change restores the original order, and adds a comment in...

5a8648eb 10/05/2011 12:05 pm Andrea Spadaccini

Add cluster netmask parameter

Add the master_netmask cluster parameter, that represents the netmask of
the master IP, encoded as a CIDR suffix.

This parameter can be set via the --master-netmask of gnt-cluster init
and gnt-cluster modify. The default behaviour is to be consistent with...

ea9c753d 10/04/2011 09:34 pm Andrea Spadaccini

Merge branch 'devel-2.5'

  • devel-2.5:
    cluster-merge: log an info message at node readd
    Bump version to 2.5.0~rc1
    Fix issue when verifying cluster files
    Revert "utils.log: Write error messages to stderr"
    Fix adding nodes after commit 64c7b3831dc...
a080bab8 10/04/2011 09:32 pm Andrea Spadaccini

Merge branch 'stable-2.5' into devel-2.5

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: René Nussbaumer <>

64c7b383 09/30/2011 07:04 pm Michael Hanselmann

LUClusterVerifyGroup: Spread SSH checks over more nodes

When verifying a group the code would always check SSH to all nodes in
the same group, as well as the first node for every other group. On big
clusters this can cause issues since many nodes will try to connect to...

3398bff1 09/30/2011 06:23 pm Andrea Spadaccini

Merge branch 'devel-2.5'

  • devel-2.5:
    Use --yes to deactivate master ip in cluster merge
    Use deactivate-master-ip in cluster-merge
    Add gnt-cluster commands to toggle the master IP
    Split starting and stopping master IP and daemons
    listrunner: Don't pass arguments if there are none...
c06e0c83 09/30/2011 03:42 pm Andrea Spadaccini

Split starting and stopping master IP and daemons

lib/backend.py
  • split StartMaster() in ActivateMasterIp() and StartMasterDaemons()
  • split StopMaster() in DeactivateMasterIp() and StopMasterDaemons()
lib/server/noded.py, lib/rpc.py
  • adapt the call chains to the new functions, define new RPCs...
fb460cf7 09/30/2011 02:05 pm Andrea Spadaccini

Split starting and stopping master IP and daemons

lib/backend.py
  • split StartMaster() in ActivateMasterIp() and StartMasterDaemons()
  • split StopMaster() in DeactivateMasterIp() and StopMasterDaemons()
lib/server/noded.py, lib/rpc.py
  • adapt the call chains to the new functions, define new RPCs...
6a1434d7 09/29/2011 12:41 pm Andrea Spadaccini

Make migration RPC non-blocking

To add status reporting for the KVM migration, the instance_migrate RPC
must be non-blocking. Moreover, there must be a way to represent the
migration status and a way to fetch it.

  • constants.py:
    - add constants representing the migration statuses...
34fbc862 09/28/2011 02:34 pm Andrea Spadaccini

Migration: warn the user about hv version mismatch

  • hv_kvm.py, hv_xen.py
    - return the hypervisor version (if available) from GetNodeInfo
  • cmdlib.py
    - if hypervisor version is available during the migration, and the
    versions differ, warn the user...
5916e61a 09/20/2011 06:50 pm Andrea Spadaccini

Merge branch 'devel-2.5'

  • devel-2.5:
    Add tls_ciphers and use_vdagent options
    Updated man pages with new SPICE TLS options
    Implementation of TLS-protected SPICE connections
    Added SPICE TLS option and related cert paths
    Fix OS creation's error handling when pausing sync...
bfe86c76 09/20/2011 05:04 pm Andrea Spadaccini

Added SPICE TLS option and related cert paths

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

c03fe62b 09/19/2011 05:05 pm Andrea Spadaccini

Fix backend.MigrateInstance docs

The MigrateInstance function does not return anything, so the relevant
lines are removed from the documentation. Instead, the raised exception
is documented.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: René Nussbaumer <>

945859e0 09/06/2011 11:18 am René Nussbaumer

import: Fix a logic error due to missing "not"

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

748c9884 09/05/2011 05:30 pm René Nussbaumer

import: Make sure the disk_dump path is in EXPORT_DIR

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

cf00dba0 09/05/2011 05:30 pm René Nussbaumer

Switch other commonprefix to IsBelowDir

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

b459a848 08/30/2011 11:24 am Andrea Spadaccini

DeprecationWarning fixes for pylint

In version 0.21, pylint unified all the disable-* (and enable-*)
directives to disable (resp. enable). This leads to a lot of
DeprecationWarning being emitted even if one uses the recommended
version of pylint (0.21.1, as stated in devnotes.rst)....

e687ec01 08/25/2011 01:53 pm Michael Hanselmann

PEP8 style fixes

Identified using the “pep8” utility.

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

c4dfb0b6 08/08/2011 06:49 pm Andrea Spadaccini

Added check for the ip command at configure time

Also, corrected a few places where the ip command was hardcoded.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

6aa7a354 08/03/2011 05:42 pm Iustin Pop

Change the backend.InstanceLogName signature

This uses now the component for the transfer (if available), otherwise
(e.g. in installs/renames) nothing.

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

6613661a 08/03/2011 05:42 pm Iustin Pop

Instance transfer: export component name to backend

This modifies the RPC layer to export the component name too to the
backend, so that it can be used in log files and messages.

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

896a03f6 07/29/2011 11:49 am Iustin Pop

Clear the OS scripts environment

The OS scripts currently run with the whole noded environment; this is
different from the hooks which run with a cleared one and most likely
an oversight.

This might create problems when upgrading, so it needs to be clearly...

35007011 07/28/2011 02:08 pm Iustin Pop

Remove requirement for variants on OS API v15+

This removes:

- the check in backend that such OSes have a variants file or if it
exists that is non-empty; in order for this to work, we also rework
the logic in backend._TryOSFromDisk to allow for optional OS files...

d0c8c01d 07/25/2011 04:55 pm Iustin Pop

Most boring patch ever

s/'/"/ in (hopefully) the right places.

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

82bc21e2 07/13/2011 07:07 pm Stephen Shirley

Set startup_paused to False when restarting

This fixes the lint error:

E1120:1220:InstanceReboot: No value passed for parameter
'startup_paused' in function call

Signed-off-by: Stephen Shirley <>
Reviewed-by: Michael Hanselmann <>

323f9095 07/08/2011 03:15 pm Stephen Shirley

Add gnt-instance start --pause

Creates the instance, but pauses execution before booting. This combined
with 'gnt-instance console' unpausing instances means that the entire
boot process can be viewed and monitored.

Signed-off-by: Stephen Shirley <>...

fbb2c636 06/07/2011 03:32 pm Michael Hanselmann

Export/import instance tags

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

bd614fa4 05/24/2011 07:40 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4:
    RPC/Backend: Make UploadFile uid and gid agnostic
    Resolve uid/gid upon mainloop run
    GetEntResolver: Make it possible to resolve uid/gid to name
    utils.algo: Add InvertDict to invert a dict
    autotools: Add noded group...
9a914f7a 05/24/2011 12:37 pm René Nussbaumer

RPC/Backend: Make UploadFile uid and gid agnostic

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

93384b8c 05/11/2011 05:14 pm Guido Trotter

Merge branch 'devel-2.4'

  • devel-2.4:
    Use floppy disk and a second CDROM on KVM
    Document the selection of instance kernels
    Make root_path an optional hypervisor parameter
    Some man page updates
    Add 2 new variables to the OS scripts environment
    Add --no-wait-for-sync when converting to drbd...
a59faf4b 05/10/2011 05:37 pm Iustin Pop

Implement grow dry-run at RPC level

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

7fe23d47 05/10/2011 05:37 pm Iustin Pop

Implement dryrun mode for BlockDev.Grow()

This is always called with False from backend for now.

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

519719fd 05/09/2011 02:22 pm Marco Casavecchia

Add 2 new variables to the OS scripts environment

Add INSTANCE_PRIMARY_NODE and INSTANCE_SECONDARY_NODES. These new
values are useful for OS scripts that needs to know the nodes where
the instance lives.. or has lived.

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

20d317d4 05/02/2011 03:41 pm Iustin Pop

Cluster verify: check for missing bridges

Currently cluster verify doesn't check for bridge information; the
only checks are done at instance create and failover/migrate
time. This means a cluster that seems healthy will fail creation jobs.

This patch implements a simple verification that all nodes (in the...

77fcff4a 03/08/2011 02:00 pm Apollon Oikonomopoulos

Shared storage instance migration

Modify LUMigrateInstance and TLMigrateInstance to allow instance migrations for
instances with DTS_EXT_MIRROR disk templates.

Migrations of shared storage instances require either a target node, or an
iallocator to determine the target node. If none is given, the cluster default...

2be7273c 03/08/2011 02:00 pm Apollon Oikonomopoulos

Add bdev_sizes RPC call

The bdev_sizes multi-node RPC call returns the sizes of the requested
block devices on the desired nodes. Its intended use is to verify the
existence of a block device on a given node for shared block storage
support.

Block device paths are expected to lie under constants.BLOCKDEV_DIR...

4b97f902 03/01/2011 07:11 pm Apollon Oikonomopoulos

Core shared file storage support

This patch introduces core file storage support, consisting of the following:

A configure-time switch for enabling/disabling shared file storage
support and controlling the shared file storage location:
--with-shared-file-storage-dir=. Shared file storage configuration is then...

ee841437 02/03/2011 01:38 pm Michael Hanselmann

Merge branch 'devel-2.3' into devel-2.4

  • devel-2.3:
    backend: Disable compression in export info file

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

775b8743 02/03/2011 01:38 pm Michael Hanselmann

backend: Disable compression in export info file

The new import/export infrastructure in Ganeti 2.2 and up handles
compression differently. It no longer writes compressed files to the
destination. Unfortunately changing this behaviour would be non-trivial,...

c417e115 01/28/2011 06:44 pm Iustin Pop

Re-create instance disk symlinks on activate

This patch implements recreation of instance disk symlinks when the
activate-disks operation is run. Until now, it was not possible to
re-create these symlinks without stopping and starting or migrating an
instance as the RPC call where this is done was in instance startup...

fb87cbeb 01/27/2011 07:07 pm Michael Hanselmann

Merge branch 'devel-2.3' into devel-2.4

  • devel-2.3:
    Wait for master to become available on initialization
    Start all daemons on cluster initialization
    Clarify job processing order in admin guide
    Improve option descriptions
    Remove two unused variables...
58a59652 01/27/2011 06:39 pm Iustin Pop

cluster verify: add hvparams verification

Currently, the validity of the hypervisor parameters is only checked
at init/modification time, and not in the cluster verify. This is bad,
as it can lead to inconsistent state that is only detected when the
next modification (which can be unrelated) is made, leading to...

397693d3 01/26/2011 08:20 pm Iustin Pop

Verify disks: increase parallelism and other fixes

The recent work on multi-VG support has converted LUClusterVerifyDisks
into doing serialised calls to each node, as each node can have
different VGs. This is suboptimal, especially for big clusters, where...

4478301b 01/20/2011 02:15 pm Michael Hanselmann

Improve import/export timeout settings

With this patch, the exporting node will retry to connect a few times.
The receiving node will make use of the master's increased timeout (see
previous patch).

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

3865ca48 01/11/2011 04:25 pm Michael Hanselmann

utils: Move I/O-related code into separate file

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

0f39886a 01/11/2011 03:09 pm René Nussbaumer

Fix a typo in backend.py

Sorry I thought I did run commit-check but must not have paid attention
to its output. There was a typo in the docstring. This patch fixes this.

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

5119c79e 01/11/2011 02:44 pm René Nussbaumer

Add backend method for pause/resume sync of devices

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

16f41f24 01/05/2011 02:41 pm René Nussbaumer

Adding additional VerifyNode checks to backend

This adds checks for out of band support. The helpers have to exist and
they have to be executable.

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

3536c792 12/21/2010 03:23 pm Iustin Pop

Allow customisation of the disk index separator

As per issue 124, some Xen versions (or packaging) don't deal nicely
with the colon being part of a disk name. Therefore we add a
configure-time option for customising this.

Note: setting the separator to interesting values like / is not...

800ac399 12/02/2010 05:44 pm Iustin Pop

Make snapshots multi-vg aware

Currently, the Snapshot() function of LogicalVolume returns only the
logical volume path, with the assumption that we only have one VG. But
with the recent changes, it makes more sense to return the full data (vg
and lv) from it, so as to not require computing it in the master....