Statistics
| Branch: | Tag: | Revision:

root / lib / bdev.py @ ef40c537

History | View | Annotate | Download (86.6 kB)

# Date Author Comment
5ff82cc9 05/10/2012 02:30 pm René Nussbaumer

bdev: Add a guard to verify disk parameters are set

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

c7c6606d 05/10/2012 02:30 pm René Nussbaumer

bdev: Take the params directly from disk without refill

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

5ad68a23 04/13/2012 04:19 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5: (29 commits)
    gnt-* {add,list,remove}-tags: Unify options
    Bump version for 2.5.0 final release
    configure.ac: Fix “too many arguments” error
    Fix extra whitespace
    Further fixes concerning drbd port release
    Fix a bug concerning TCP port release...
0304f0ec 03/23/2012 01:12 pm Iustin Pop

Fix LV status parsing to accept newer LVM

LVM version 2.02.93 (or at least, sometimes after .88) has extend the
lv_attr field with two more flag; we only care about the first digit,
so let's change the "!= 6" check to "< 6".

Thanks to Robin H Johnson <> for finding this issue....

3ccb3a64 02/21/2012 05:23 pm Michael Hanselmann

Replace single- with double-quotes

In at least two cases "%s" is replaced with str(), too.

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

7181fba0 01/23/2012 07:53 pm Constantinos Venetsanopoulos

Implement rbd disk template

Introduce the rbd disk template, which handles provisioning and
management of instance disks as block devices mapped to rbd volumes
on a RADOS cluster.

The rbd template is of type DTS_EXT_MIRROR, meaning rbd-based
instances can failover or migrate to any node, without...

8584e922 12/12/2011 04:04 pm Andrea Spadaccini

Add the remaining DRBD dynamic sync disk params

Add the c-plan-ahead, c-fill-target, c-delay-target, c-max-rate,
c-min-rate parameters; report errors while setting the
synchronization speed.

Change the error signaling model of SetSyncParams. Instead of returning...

f2f57b6e 12/12/2011 04:04 pm Andrea Spadaccini

Add the dynamic-resync DRBD disk parameter

constants.py, cmdlib.py:
- add the dynamic-resync parameter, both at DT and LD levels;

lib/bdev.py:
- change SetSyncSpeed to SetSyncParams, and _SetMinorSyncSpeed to
_SetMinorSyncParams;
- use the dynamic-resync parameter....

ad1dd4c7 12/08/2011 01:36 pm Andrea Spadaccini

Add net-custom and disk-custom DRBD parameters

Those parameters can be used to pass options directly to drbdsetup disk
and drbdsetup net.

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

ac00bf1b 12/08/2011 01:36 pm Andrea Spadaccini

Move LD parameters constants to the LDP_ namespace

Add the LDP_ prefix to the LD parameters-related constants, in order to
avoid pollution in the global constants namespace.

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

8a69b3a8 12/06/2011 06:34 pm Andrea Spadaccini

Add DRBD barriers disk parameters

Add the disk-barriers and meta-barriers parameters described in the
design doc.

constants.py:
  • add the needed LD and DT-level parameters, use the defaults provided
    at ./configure time;
  • add constants representing which barriers should be disabled and the...
43e11798 12/02/2011 06:29 pm Andrea Spadaccini

LV stripes parameters for plain and drbd

configure.ac:
  • change the documentation of --with-lvm-stripecount parameter to
    reflect the change
doc/design-resource-model.rst:
  • change drbd/stripes to drbd/data-stripes and drbd/metastripes to
    drbd/meta-stripes...
6e9814a1 12/01/2011 01:04 pm Andrea Spadaccini

Add DRBD8 static resync speed disk parameter

Signed-off-by: Andrea Spadaccini <>
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...
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 <>...

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

72ce3463 08/26/2011 05:53 pm René Nussbaumer

Merge branch 'devel-2.4' into devel-2.5

Conflicts:
NEWS (trivial)
configure.ac (trivial)
daemons/ensure-dirs.in (deleted)

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

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

7a380ddf 08/23/2011 12:01 pm René Nussbaumer

Fix a parsing issue with DRBD 8.3.11 in the Linux Kernel

In the Linux kernel commit 4b0715f096 introduced a display bug into
/proc/drbd which broke our regex.

The bug was first introduced into Linux 2.6.39-rc1. This bug is still
unfixed as of today.

This patch adapt the regular expression to workaround this bug for the...

18e4dee6 08/05/2011 04:57 pm Iustin Pop

Zero DRBD metadata before creation

The docstring of the DRBD8 class says:

… The meta device is checked for valid size and is zeroed on create.

which is not done today, hence we have
http://code.google.com/p/ganeti/issues/detail?id=182:

node1# mkreiserfs -f /dev/xenvg/t8...
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 <>

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

b6135bbc 03/08/2011 02:00 pm Apollon Oikonomopoulos

Shared block storage support

This patch introduces basic shared block storage support.

It introduces a new storage backend, bdev.PersistentBlockDevice, to
use as a backend for shared block storage. The new bdev requires a new
BLOCKDEV_DRIVER_MANUAL constant with the value "manual" and uses it as...

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

a3fffcc6 01/11/2011 02:44 pm René Nussbaumer

Make it possible to pause/resume sync of mirrored dev

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

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

673cd9c4 09/23/2010 04:52 pm René Nussbaumer

Migrate call from backend._GetVGInfo to bdev.LogicalVolume.GetVGInfo

This patch removes duplicate code found in backend which also needs to
get VG infos. To make it simpler we moved to bdev.LogicalVolume.GetVGInfo.

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

197478f2 09/22/2010 04:17 pm René Nussbaumer

Use free space in vg instead of biggest free pv space for a snapshot

Even for snapshot we looked at the biggest free pv space even though
the vg might have fit the snapshot we aborted if one of the pvs was too
small. This patch fixes this by looking at the vg size instead of the pv...

8b312c1d 08/18/2010 11:26 am Manuel Franceschini

Introduce new IPAddress classes

This patch unifies the netutils functions dealing with IP addresses to
three classes:
- IPAddress: Common IP address functionality
- IPv4Address: IPv4 specific functionality
- IPv6address: IPv6-specific functionality

Furthermore it adds methods to check whether an address is a loopback...

fcee765d 08/05/2010 08:37 pm Manuel Franceschini

Fix bug in bdev when drbd version format is x.x.x.x

This patch fixes a bug reported in [0]. Newer drbd versions can have
another digit beyond the regular major, minor and point release digits.
We modify the regex used to match that with an optional parts which is...

a744b676 07/09/2010 04:37 pm Manuel Franceschini

Introduce lib/netutils.py

This patch moves network utility functions to a dedicated module.

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>

549071a0 07/06/2010 12:23 pm Luca Bigliardi

BaseDRBD: provide a way to query usermode_helper parameter

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>

5a672c30 06/30/2010 02:55 pm Manuel Franceschini

DRBD IPv6 support

Support IPv6 configuration for 'drbdsetup show' parser and add unittests
concerning that case. Renames some data files to use consistent names
clarifying their usage.

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Michael Hanselmann <>

403f5172 06/28/2010 02:04 pm Guido Trotter

Remove pred from compat.any/all

This makes it compatible with the python builtin, and we can even use
the builtin when running under the right version of python. The all and
any functions are renamed to _all and _any, so that they can be tested,
and (non)existing unittests are updated (translation: there are no unit...

c04bc777 06/22/2010 02:17 pm Iustin Pop

Fix warnings with Python 2.6

'format' is a new built-in function, and 'bytes' is a new builtin type.
We rename this to make pylint happy (and remove potential bugs).

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

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

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

Write grow support for file storage

Signed-off-by: Guido Trotter <>
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 <>

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

6136f8f0 03/08/2010 03:49 pm Iustin Pop

Add strict name validation for the LVM backend

Currently we don't enforce name validation for the LVM backend, on the
idea that LVM itself will reject invalid names and we catch those
errors.

However, recent LVM documents the accepted VG/LV name space, so it's...

cb7c0198 03/08/2010 03:49 pm Iustin Pop

Implement disabling of file-based storage

Rationale: the file-based storage backend can add/remove files under a
certain directory. However, the master node is also controlling the
setting of the file-based root directory, so basically it means we can't
prevent arbitrary modifications by the master of the node's filesystem....

9122e60a 02/15/2010 04:42 pm Iustin Pop

Unify a few re.compile calls in DRBD

These are both cleanups and, in the case of _MassageProcData, switching
from a weaker RE to a stronger one (we now need cs: in the line,
previosuly any line starting with \d+: was accepted).

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

4c1a504b 01/26/2010 02:58 pm Iustin Pop

Merge branch 'devel-2.0' into devel-2.1

  • devel-2.0:
    Fix the mocks.py for 2.0 unittests
    LURemoveNode safety in face of wrong node list
    Fix an unsafe formatting bug
    Ensure all int/float conversions are handled right

Conflicts:
lib/backend.py - trivial merge...

89b70f39 01/25/2010 06:23 pm Iustin Pop

Add a crude disable for DRBD barriers

Ideally we want to/will have per-device DRBD controls of disk/metadata
flushes. In the meantime, we want at least a disable of the barrier
functionality for cases where one has battery-backed caches.

Background: DRBD has four mechanism of handling ordered disk-writes....

691744c4 01/25/2010 06:16 pm Iustin Pop

Ensure all int/float conversions are handled right

int()/float() can raise either ValueError (in case of int("a")), or
TypeError (in case of int(None)). We had many bugs over time due to
this, and a recent one was just diagnosed, so we go over the codebase...

527a15ac 01/04/2010 11:17 am Iustin Pop

bdev: Add a TODO and a pylint silence

A piece of old code in bdev.py uses a for loop over a single variable
because we can 'break' out of the loop or exit on the 'else' path. This
is not a nice usage of the for loop, it should be converted to a
standard if...elif...else structure....

bbe4cc16 01/04/2010 11:12 am Iustin Pop

Add some stubs to bdev.FileStorage

This patch adds explicit errors (instead of notimplemented) in
FileStorage (and the associated TODOs).

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

1122eb25 01/04/2010 11:10 am Iustin Pop

Remove many 'Unused variable' warnings

Note there are some cases left which need extra cleanup.

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

d984846d 12/28/2009 02:05 pm Iustin Pop

Merge branch 'devel-2.0' into devel-2.1

  • devel-2.0:
    Fix indentation in hv_kvm
    Implement BuildHooksEnv for NoHooksLU
    Clarifiy some more wide pylint disables
    Fix two bugs in seldom-used codepaths
    Update pylintrc
    Add targetted pylint disables
    Partial cherry-pick of 6c881c5 from the 2.1 branch...
fe267188 12/28/2009 12:43 pm Iustin Pop

Add targetted pylint disables

This patch adds targeted pylint disables, where it makes sense (either
due to limitations in pylint or due to historical usage), and also a few
blanket ones in rapi where all the names are… “different”.

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

310fbb64 12/01/2009 12:49 pm Iustin Pop

DRBD: ignore unreadable meta devices

The DRBD driver can ignore dead disks but not dead meta devices (for
which it refuses to configure the minor). To handle this case, we check
that the meta device is readable and if not we ignore it (the same as
when backend._RecursiveAssembleBD didn't find it)....

099c52ad 11/03/2009 04:31 pm Iustin Pop

Another round of pylint-related style fixes

A newer version of pylint, more warnings…

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

96c7a5b0 11/03/2009 01:45 pm Iustin Pop

Throw specific error when ':' exists in PV names

While ':' is not actually a supporte character in PV names (it has a
special meaning for commands like lvcreate), we should throw specific
errors for this case instead of generic “Can't create LV”.

This patch does two things:...

2070598f 11/03/2009 01:45 pm Iustin Pop

Change bdev.LogicalVolume.GetPVInfo usage

We will need to enumerate selectively the PVs of (possible) many VGs and
not only the allocatable ones. For this we make the VG selection and the
allocatable filtering optional. The two callers are modified for this...

def8e2f6 11/03/2009 12:51 pm Michael Hanselmann

bdev: Convert to utils.Retry

Also replaces a hardcoded limit of 15 seconds with 1/4
of NET_RECONFIG_TIMEOUT.

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

c8872a0b 09/30/2009 03:59 pm Iustin Pop

Merge remote branch 'origin/master' into mogu

  • origin/master:
    Fix burnin's verbose mode
    Final NEWS update and version increase for 2.0.4
    Encode the actual exception raised by LU execution
    Move the luxi error handling into errors.py
    Fix the confusing ssh/hostname message in node add...
59b76636 09/25/2009 03:22 pm Iustin Pop

Merge commit 'origin/next'

  • commit 'origin/next': (74 commits)
    Fix gnt-node modify online help
    Fix gnt-job info entry in gnt-job(8)
    locking: Don't swallow exceptions
    Add check for duplicate MACs in instance add
    scripts/gnt-node: fix a help string...
13998ef2 09/03/2009 06:43 pm Michael Hanselmann

Use ReadFile/WriteFile in more places

This survived QA, burnin and unittests.

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

67d101d4 08/21/2009 12:35 pm Iustin Pop

Fix /proc/drbd parsing in presence of gaps

In case there are gaps in /proc/drbd related to the minors sequence,
this can lead to empty lines (see the attached data file). In this case,
we currently fail to parse the file correctly.

The patch fixes this by skipping empty lines in...

b142ef15 08/13/2009 02:41 pm Iustin Pop

Merge commit 'origin/next' into branch-2.1

  • commit 'origin/next': (28 commits)
    Fix a typo in InitCluster
    Ignore results from drained nodes in iallocator
    Ship the ethers hook
    Ethers hook, compatibility with old lockfile
    Remove a few unused imports from noded/masterd...
8486ffc0 08/07/2009 02:22 pm Guido Trotter

Merge branch 'master' into next

  • master:
    Update NEWS and version for 2.0.3 release
    devel/upload: revert rsync -p
    export: add meaningful exit code
    Fix detecting of errors in export
    Implement gnt-cluster check-disk-sizes
    rpc: add rpc call for getting disk size...
f208978a 08/06/2009 07:13 pm Michael Hanselmann

Convert ldisk_degraded to tri-state value

This allows us to report “uncertain” states (LDS_UNKNOWN) for cases
where the code can't easily detect or report what's wrong with a
block device.

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

96acbc09 08/05/2009 12:12 pm Michael Hanselmann

Use object for blockdev_find RPC call result

This patch changes the return type for backend.BlockdevFind to an object
(objects.BlockDevStatus). Before a tuple was used. Adding more values to
this tuple causes a lot of work. Converting the result to an object with...

fcff3897 08/04/2009 05:35 pm Iustin Pop

bdev: Add function for reading actual disk size

This patch adds a GetActualSize for block devices that returns the
actual disk size. It is done using blockdev (and stat for file storage).

While this could be done via reading /sys/block/N/size, that is not as...

60bca04a 08/04/2009 05:34 pm Iustin Pop

bdev: allow ignoring of size in Assemble()

This patch changes the DRBD8 class (the only one to use the size in
Assemble) to ignore the size in Assemble when a zero size is passed.
This will allow activation of disks even when the size recorded in the
configuration is wrong....

2a061e15 07/17/2009 02:40 pm Guido Trotter

Merge branch 'master' into next

  • master:
    Update NEWS and version for 2.0.2 release
    Improve the description of node flags in man page
    Change default stripe count to 1
    Use full-stripe size in LVM growth
    RAPI: implement instance reinstall
38256320 07/16/2009 01:29 pm Iustin Pop

Use full-stripe size in LVM growth

LVM has issues when growing stripped volumes, so it's best to specify
the growth in exact multiples of the full stripe size (as precise as
possible). For this we need to do a couple of changes:
- in LVM Attach(), we query additionally the VG extent size and the LV...

5bbd3f7f 07/07/2009 03:51 pm Michael Hanselmann

Fix some typos

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

1dc10972 07/01/2009 12:40 pm Iustin Pop

Increase maximum accepted size for a DRBD meta dev

With the change to stripped LVs, the actual size of a meta device (which
is small) can be more than we expected (for non-stripped LVs). This
patch increases from 160MB to 1GB the accepted size, and updates the...

fecbe9d5 06/08/2009 06:00 pm Iustin Pop

Enable stripped LVs

This patch enables stripped LVs, falling back to non-stripped if the
stripped creation fails. If the configure-time lvm-stripecount is 1,
this patch becomes a noop (with an insignificant python-level overhead,
but no extra lvm calls)....

3c003d9d 06/08/2009 06:00 pm Iustin Pop

Add more constants for DRBD and change sync tests

This patch adds constants for the connection status, peer roles and disk
status, and it changes the rules for when the disk is considered as
“resyncing” - previously it was only for syncsource/synctarget, but...

f069addf 06/03/2009 07:09 pm Iustin Pop

Assemble DRBD using the known size

This patch changes DRBD disk attachment to force the wanted size, as opposed to
letting the device auto-discover its size.

This should make the disks more resilient with regard to small differences in
size (e.g. due to LVM rounding). This still works with regard to disk...

464f8daf 05/28/2009 05:05 pm Iustin Pop

Change the bdev init signatures

This patch changes all the bdev.BlockDev constructors to take an
additional ‘size’ parameter, all the backend functions that call those
functions to pass it and also changes backend.BlocdevCreate() to not use
the size passed via the rpc call but instead directly disk.size (this is...

34e71fea 05/05/2009 04:19 pm Karsten Keil

Fix compatibility with DRBD 8.2

This patch adds (and suppresses) the extra ipv4/ipv6 words before the
actual address that newer DRBD versions add.

[: slightly changed the patch to conform to style
guide, and changed the commit message]
Signed-off-by: Iustin Pop <>...

01e2ce3a 05/05/2009 04:19 pm Iustin Pop

Fix compatibility with DRBD 8.3

DRBD 8.3 changes two more things compared to 8.2:
- /proc/drbd format changed in multiple ways; the part we're
interested is the ‘st:’ to ‘ro:‘ change (in the changelog named as
“Renamed 'state' to 'role'”
- “drbdsetup /dev/drbdN show” changed the ‘device’ stanza from:...

f6eaed12 02/16/2009 02:17 pm Iustin Pop

Convert IOErrors for /proc/drbd into our errors

If /proc/drbd can't be opened, this raises an IOError, but all the
error-handling behaviour in backend treats only BlockDeviceErrors. This
creates a plain failure in cluster verify and in other RPC calls.

This patch simply converts EnvironmentErrors into BlockDeviceErrors, and...

aed77cea 02/11/2009 08:29 pm Guido Trotter

FileStorage: abort creating over an existing file

In FileStorage there is a TODO:
decide whether we should check for existing files and
abort or not
After Ganeti ate my instance data I decided. Let's abort.
In general there is no reason we should overwrite existing files, and...

33bc6f01 02/10/2009 04:45 pm Iustin Pop

Some error message cleanups

Reviewed-by: imsnah

9c793cfb 02/10/2009 04:45 pm Iustin Pop

Cleanup of DRBD8._CheckMetaSize

This patch converts the _CheckMetaSize method to raise exceptions
instead of logging and returning False. This fits now in the new rpc
return types, so it's a cheap change.

Reviewed-by: ultrotter

1063abd1 02/10/2009 04:44 pm Iustin Pop

Change the disk assembly to raise exceptions

This big patch converts the bdev Assemble() methods and the supporting
functions to raise exceptions instead of returning False. This is a big
patch, since the assembly functions touch other functions: add children,...

0c6c04ec 02/10/2009 04:44 pm Iustin Pop

Change BlockDev.Remove() failure result

Currently, the Remove() methods of block devices return True/False.
This doesn't permit any error detail reporting.

This patch changes the return type to None for success, and raises
BlockDeviceError in case of failure. This permits the details to be...

746f7476 02/10/2009 04:44 pm Iustin Pop

Change BlockDev.Shutdown() failure result

Currently, the Shutdown() methods of block devices return True/False.
This doesn't permit any error detail reporting.

This patch changes the return type to None for success, and raises
BlockDeviceError in case of failure. This permits the details to be...

82463074 02/09/2009 04:03 pm Iustin Pop

bdev: add and use two utility functions

This patch adds two utility functions for raising BlockDeviceError
exceptions and for running functions while ignoring this error. Most of
the manual “raise errors.BlockDeviceError” cases are converted to
_ThrowError, as this makes the code clearer....

3b559640 01/23/2009 02:36 pm Iustin Pop

Remove checking of DRBD metadata for validity

Currently the DRBD code checks that the metadata devices are valid
before creation, initial disk attachment and add children.

However, the process for checking validity requires a free DRBD minor,
and this conflict with parallel checking....

6d2e83d5 01/20/2009 04:20 pm Iustin Pop

Make cluster-verify check the drbd minors space

This patch adds support for verification of drbd minors space in cluster
verify: minors which belong to running instances and should be online
but are not, and minors which do not belong to any instace but are in...

767d52d3 01/20/2009 01:18 pm Iustin Pop

DRBD: check for in-use minor during Create

In order to prevent errors with old, in-use DRBD minors, we check and
abort at create time if our minor is already in use. For this we need to
also modify DRBD8Status to be able to parse cs:Unconfigured devices....

6c626518 01/19/2009 01:10 pm Iustin Pop

Block device creation cleanup

Currently when creation LVM-based instances, we always get the
extremely-confusing message "ERROR Can't find LV /dev/xenvg/..." which
is actually expected. This behaviour was introduced before we had
UUID-style LV names, since at that point it was not a unexpected to have...

6b93ec9d 01/13/2009 05:20 pm Iustin Pop

Forward-port DrbdNetReconfig

This is a modified forward-port of DrbdNetReconfig and their associated
RPCs. In Ganeti 2.0, these functions will be used for two things:
- live migration (as in 1.2)
- and for other network reconfiguration tasks, since DRBD8.Attach()...

f96e3c4f 01/13/2009 05:20 pm Iustin Pop

backend: rename AttachOrAssemble to Assemble

Since now the Assemble function is different than Attach, we rename this
backend function to show that the intent is to fully assemble the device
(and it's always allowed to modify the device).

Reviewed-by: ultrotter

2d0c8319 01/13/2009 05:20 pm Iustin Pop

drbd: change the semantics of Attach vs. Assemble

Currently, both the Attach and Assemble methods for DRBD8 devices will use and
alter the device state. This is suboptimal, and it has been worked
around in 1.2 via a special cache in the node daemon so that we don't...

f87548b5 01/13/2009 05:20 pm Iustin Pop

bdev: Do not call Assemble() on children

The caller of dev.Assemble() (backend._RecursiveAssembleBD) is doing an
explicit recursion over all the children of the device, with better
error reporting. As such, we don't need this repeated assembly inside
the base BlockDev class....

7d585316 01/09/2009 05:34 pm Iustin Pop

Work around a DRBD sync speed race condition

This is modified forward-port of commit 1544 on the 1.2 branch:

When DRBD is doing its dance to establish a connection with its
peer, it also sends the synchronization speed over the wire. In
some cases setting the sync speed only after setting up both...
cf8df3f3 01/08/2009 02:03 pm Iustin Pop

bdev: forward-port ReAttachNet/DisconnectNet

This is plain copy of the 1.2 ReAttachNet and DisconnectNet methods on
the DRBD8 device, with the logger to logging module changes and the
ReAttachNet method renamed to AttachNet.

These methods are not used anywhere right now, but will be used for...

c41eea6e 12/11/2008 07:13 pm Iustin Pop

Fix epydoc format warnings

This patch should fix all outstanding epydoc parsing errors; as such, we
switch epydoc into verbose mode so that any new errors will be visible.

Reviewed-by: imsnah

ecb091e3 11/27/2008 05:12 am Iustin Pop

Fix file-based block devices

We changed a while ago the protocol for opening block devices, but
FileStorage was not changed. This patch makes it work again.

Reviewed-by: imsnah

3c03759a 09/29/2008 04:15 pm Iustin Pop

Move a hardcoded constant to constants.py

For now we only use the ‘C’ protocol so we can put it in constants.py
instead of hardcoding it.

Reviewed-by: imsnah

2899d9de 09/29/2008 04:15 pm Iustin Pop

Enable the use of shared secrets

This patch enables the use of the shared secrets for DRBD8 disks, using
(hardcoded in constants.py) the md5 digest algorithm.

For making this more flexible, either we implement a cluster parameter
(once the new model is in place), or we can make it ./configure-time...

f9518d38 09/29/2008 04:15 pm Iustin Pop

Extend DRBD disks with shared secret attribute

This patch, which is similar to r1679 (Extend DRBD disks with minors
attribute), extends the logical and physical id of the DRBD disks with a
shared secret attribute. This is generated at disk creation time and...

a1578d63 09/23/2008 03:10 pm Iustin Pop

Switch to static minors for DRBD

With some todos remaining, this patch switches the DRBD devices to use
the passed minors, and the cmdlib code (add instance and replace disks)
to request and assign minors to the DRBD disks.

Todos:
- look at the disk RPC calls to see which can be optimized away, since...

ffa1c0dc 09/22/2008 02:32 pm Iustin Pop

Extend DRBD disks with minors attribute

This patch converts the DRBD disks to contain also a minor (per each
node) attribute. This minor is not yet used and is always initialized
with None, so the patch does not have any real-world impact - except for
automatically upgrading config files (it adds the minors as None, None)....