Statistics
| Branch: | Tag: | Revision:

root / lib / objects.py @ 8f07dc0d

History | View | Annotate | Download (43.6 kB)

# Date Author Comment
1ffd2673 04/21/2011 04:08 pm Michael Hanselmann

masterd: Add support for tagging node groups

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

e8f472d1 04/14/2011 11:37 am Iustin Pop

Fix shared_file_storage_dir on upgrades

If the cluster was upgraded from 2.4 or earlier, this key won't exist
(it's only set to a correct value on cluster init), so we need to
properly set it to a null string (disabled).

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

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

b713fb7a 03/07/2011 03:43 pm Iustin Pop

Merge branch 'stable-2.4'

  • stable-2.4:
    Release 2.4.0
    Small improvement to the ganeti man page
    Fix LUClusterRepairDiskSizes and rpc result usage
    Fix RPC mismatch in blockdev_getsize[s]
    RAPI: fix evacuate node resource
    Fix typo in kvm-ifup script...
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...

73f1d185 02/25/2011 05:18 pm Stephen Shirley

1-char comment typo fix

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

1ae17369 02/24/2011 03:25 pm Michael Hanselmann

query: Add support for field description

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

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

6d33a6eb 01/13/2011 06:11 pm Iustin Pop

Fix growing of DRBD disks

Patch 03941a26 made disk growth VG-aware, but the code has a bug: it
only works for LD_LV disks, and not LD_DRBD. To fix it, we add a
generic function to compute the per-VG growth requirements, and switch
to using that instead of manual build....

daa55b04 01/11/2011 05:39 pm Michael Hanselmann

objects: Fix off-by-one in error message

For an instance with a single disk the message should be “… disks 0 to
0”, not “… 0 to 1”.

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

25ce3ec4 01/07/2011 05:34 pm Michael Hanselmann

Introduce verbose opcode result for console

With this patch OpConnectConsole will no longer just return a command
with arguments, but rather a detailed description about how to connect
to an instance's console. Unittests for some parts are included. Another...

25124d4a 12/14/2010 12:32 pm René Nussbaumer

Add new Node attribute powered

This is just a state of record field and does not necessary
reflect the reality.

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

90e99856 12/13/2010 06:33 pm Adeodato Simo

Add the "alloc_policy" attribute to node groups

This can be set at group creation time and via OpSetGroupParams. The default
is "preferred", and existing node groups from previous Ganeti version will
get the attribute set to this value.

Signed-off-by: Adeodato Simo <>...

0538c375 12/13/2010 05:21 pm Michael Hanselmann

objects: Add custom de-/serializing code for query responses

… and use them in cmdlib.

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

24d6d3e2 12/13/2010 05:15 pm Michael Hanselmann

objects: Add definitions for query requests and responses

Also update description of QueryFieldDefinition.name.

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

e6e88de6 12/08/2010 09:45 pm Adeodato Simo

objects.py: fix minor error in NodeGroup.SimpleFillND docstring

The defaults are filled in from the node group defaults, not cluster
defaults (presumably copy & paste error).

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

e11a1b77 12/08/2010 02:27 pm Adeodato Simo

config.py, objects.py: more node group support

In particular:

- add AddNodeGroup and RemoveNodeGroup in config.py
- refactor _UpgradeConfig to make use of _UnlockedAddNodeGroup
- add support for objects.NodeGroup in ConfigWriter.Update; add missing...
1177d70e 12/06/2010 02:59 pm Guido Trotter

Remove bridge NIC slot

This has been deprecated and unused since 2.1.

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

84d7e26b 12/02/2010 03:46 pm Dmitry Chernyak

Make rpc.call_lv_list() VG-aware

Changes to backend.GetVolumeList():
- now accepts a list of VGs instead of one VG
- returns LV names in the form "vg_name/lv_name"

Corresponding changes are done in: VerifyDisks, VerifyNode,
LUCreateInstance (for both disk creation and adoption cases)...

707f23b5 11/29/2010 05:06 pm Michael Hanselmann

objects: Add QueryFieldDefinition

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

855d2fc7 11/29/2010 05:05 pm Michael Hanselmann

backend: Add support for IPv6 in import/export

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

095e71aa 11/22/2010 05:18 pm René Nussbaumer

Adding oob_program in the same style as beparams

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

490acd18 10/27/2010 01:46 pm Iustin Pop

Add the master/vm_capable flags to objects

This adds the flag and some initial handling. The rest of the changes,
for cmdlib, come in a separate patch.

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

f936c153 10/26/2010 12:48 pm Iustin Pop

Rename node.nodegroup to node.group

In the context of a node, its group has (at least today) only one
meaning, that is the node's node group. As such, we rename
node.nodegroup to just node.group.

Note: if we want to keep node in there, it should be at least...

3d914585 10/12/2010 01:57 pm René Nussbaumer

Add prealloc_wipe_disks as a cluster-wide configuration variable

This is the first step for the support of wiping block devices prior
to creation of the instance.

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

cf10a26f 10/05/2010 12:23 pm Iustin Pop

Merge branch 'devel-2.2'

  • devel-2.2:
    Rename the _oss cluster vars to _os

Conflicts:
lib/objects.py (trivial, strange that this one, and only this one, conflicted)

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

87b2cd45 10/05/2010 12:11 pm Iustin Pop

Rename the _oss cluster vars to _os

Per the mailing list discussion, rename _oss to _os, both in cluster parameters
and in the rest of the code.

This is just an s/_oss/_os, with the exception of a small bit of cleanup
around the helper_os function in cmdlib.py....

df5758b1 10/05/2010 12:11 pm Iustin Pop

Merge branch 'devel-2.2'

  • devel-2.2:
    gnt-job info: Sort input fields
    KVM: Add function to check the hypervisor version
    Bump version to 2.2.0, update NEWS
    Fix instance rename regression from 3fe11ba3
    Fix instance rename regression from 3fe11ba3...
546b1111 09/30/2010 03:09 am Iustin Pop

Add two new cluster settings

The new variables are:

- a list of hidden OSes, that should not be displayed to the users in
interactive selection (e.g. reinstall); however, if they are selected, they
can be used
- a list of OSes that should be hidden and blocked from install-time selection...

870dc44c 09/30/2010 03:09 am Iustin Pop

Abstract OS name/variant functions

Currently, the computation of the 'pure' name or the variant is
hardcoded and spread around the functions that need it. This is not
nice, and in the future we'd spread it even more with more usage of
variants/pure os names....

c60abd62 09/15/2010 02:08 pm Guido Trotter

Split a long docstring line in objects.py

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

190e3cb6 09/14/2010 07:49 pm Guido Trotter

Add node's nodegroup field

If a node doesn't have a node group we'll upgrade the config making it
the cluster default. Also the node add and removal operations are
changed to set/clear the node group correctly. Finally we populate the
"members" list of nodegroups on config load with the value from the...

3df43542 09/14/2010 06:14 pm Guido Trotter

Add a 'nodegroups' slot to ConfigData

Also:
- reformat the slots declaration of ConfigData
- call UpgradeConfig on each node groups to handle future upgrades
- add nodegroups special case in {To,From}Dict
- add nodegroups to _AllUUIDObjects

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

fe25a79a 09/14/2010 06:14 pm Guido Trotter

_ContainerFromDicts: handle None source

When _ContainerFromDicts is called on some element which doesn't exist
in the config, because it is yet to be upgraded, it will receive its
value as None. We take care of this case by using an empty element of
the required target type....

24a3707f 09/14/2010 06:14 pm Guido Trotter

Add a new NodeGroup config object

The "members" slot of this object is not serialized, and is discarded
when deserializing, initializing it explicitly to [].

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

f4c9af7a 09/06/2010 05:55 pm Guido Trotter

Cluster.UpgradeConfig: populate primary_ip_family

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

2f20d07b 08/19/2010 12:43 pm Manuel Franceschini

Add new cluster parameter primary_ip_version

We expose the ip_version (4, 6) to the external interface and internally
we convert it to ip_family (AF_INET=2, AF_INET6=10). This makes the code
more concise as all functions deal with family rather than version....

999b183c 07/26/2010 05:54 pm Iustin Pop

Introuce a new cluster parameter - reserved_lvs

This parameter, which is a list of regular expression patterns, will
make cluster verify ignore any such LVs. It will not prevent creation or
removal of such volumes by the backend code.

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

bf4af505 07/08/2010 04:45 pm Apollon Oikonomopoulos

Add default_iallocator cluster parameter

Add a cluster parameter to hold the iallocator that will be used by default
when required and no alternative (manually-specified iallocator or
manually-specified node(s)) is given.

Signed-off-by: Apollon Oikonomopoulos <>...

ee2f0ed4 07/06/2010 12:24 pm Luca Bigliardi

Set drbd usermode helper on config upgrade

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

51cb1581 07/06/2010 12:24 pm Luca Bigliardi

Generalize a recursive check on logical disks

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

9e33896b 07/06/2010 12:24 pm Luca Bigliardi

Add drbd_usermode_helper to configuration

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

90d118fd 06/28/2010 06:46 pm Guido Trotter

Better specify old object slots removal policy

The comments seem to imply we can remove deprecated slots after 2.1 is
released. This is not quite true, if we still want to support upgrading
straight from 2.0. So let's specify better that they can be removed only...

1bdcbbab 06/23/2010 07:23 pm Iustin Pop

Add OS parameters to cluster and instance objects

The patch also modifies the instance RPC calls to fill the osparameters
correctly with the cluster defaults, and exports the OS parameters in
the instance/OS environment.

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

b41b3516 06/23/2010 07:23 pm Iustin Pop

Add os api v20 and related fields to the OS object

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

06596a60 06/17/2010 01:31 pm Guido Trotter

Fix parameter names in SimpleFillBE/NIC docstrings

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

592e04bd 06/14/2010 09:37 pm Iustin Pop

Remove a TODO

Since OS objects are not stored in the configuration, we cannot put
os_hvp there, therefore the TODO is obsolete…

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

73e0328b 06/14/2010 09:35 pm Iustin Pop

Add cluster.SimpleFill*() functions

Currently, the existing cluster.Fill* functions take as argument an
instance. This means that in any case where we don't have an actual
instance object, we have to resort to calling the low-level
objects.FillDict function....

af1d39b1 06/14/2010 07:57 pm Michael Hanselmann

backend: Add support for import/export magic

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

c08d76f5 06/08/2010 04:12 pm Michael Hanselmann

import/export daemon: Record amount of data transferred

This reports the amount of data transferred and the throughput (averaged
over 60 seconds) to the master daemon. While not yet fully implemented,
once the export scripts report the expected data size, we can even provide...

a5310c2a 05/21/2010 06:18 pm Michael Hanselmann

Allow control of import/export compression method

For exports to/imports from the same machine, compression will
not be used anymore.

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

eb630f50 05/21/2010 06:17 pm Michael Hanselmann

Put common import/export daemon options into object

The X509 key name and CA are passed from cmdlib all the way to
the backend import/export daemon. With the addition of an option
to choose the compression method, another parameter would have
to be passed all the way. By moving these options to a separate...

f39cd91d 04/20/2010 07:26 pm Balazs Lecz

Merge branch 'devel-2.1'

Conflicts:
doc/security.rst
trivial
lib/cli.py
trivial

Signed-off-by: Balazs Lecz <>
Reviewed-by: Michael Hanselmann <>

2d76b580 04/16/2010 04:24 pm Michael Hanselmann

Add daemon for instance import and export

This backend daemon for instance import and export will be used to
transfer instance data to other machines. It is implemented in a generic
way to support different ways of data input and output. The third-party
program “socat”, which is already used by the KVM hypervisor abstraction,...

4437d889 04/16/2010 04:10 pm Balazs Lecz

Add uid_pool cluster parameter

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

30198f04 04/12/2010 05:15 pm Iustin Pop

Merge remote branch 'devel-2.1'

  • devel-2.1:
    Update import documentation for the recent changes
    Add a identify-defaults options for import
    Fix create/import verification of hvparams
    objects.Cluster: add method to get hv defaults
    Reuse NIC information from export...
d63479b5 04/12/2010 04:57 pm Iustin Pop

objects.Cluster: add method to get hv defaults

Currently the FillHV method is the one that does the cluster hvparams +
os hvparams merger. However, in some cases we need to do just this,
without adding the instance hvparams on top.

This patch adds a function to compute just this (hv + os hvp...

e7a25b08 04/12/2010 12:36 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    burnin: only remove instances we actually added
    burnin.ExecOrQueue: add post-process function
    burnin.ExecOrQueue: remove variable argument list
    Fix new pylint errors
    Rename the confd_client unittest (to confd.client)...
3953242f 04/08/2010 06:50 pm Iustin Pop

Add a new cluster parameter maintain_node_health

This will be used to conditionally enable the watcher node maintenance
feature.

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

921efbb3 04/06/2010 03:32 pm Michael Hanselmann

Merge remote branch 'devel-2.1'

  • devel-2.1:
    Extend ConfdFilterCallback with consistency checks
    Abstract the confd client creation
    Remove unused import from test file
    kvm_flag hypervisor parameter
    Move the runas user at execution time
    Send "501 Not Implemented" back when method not found...
b39bf4bb 03/25/2010 02:47 pm Guido Trotter

SerializableConfigParser: Make Loads class indep

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

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

Allow file storage to be grown

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

bb3776b4 03/15/2010 04:25 pm Michael Hanselmann

Merge remote branch 'origin/devel-2.1'

  • origin/devel-2.1: (116 commits)
    Implement replacing cluster certs and keys via “gnt-cluster renew-crypto”
    cli: Add helper function to stop and start whole cluster
    cfgupgrade: Use new bootstrap function for certs and keys...
17463d22 03/09/2010 02:27 pm René Nussbaumer

Add support for per-os-hypervisor parameters

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

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

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

Add caller-validation on Disk.StaticDevPath

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

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

8a28f591 02/15/2010 07:04 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1: (31 commits)
    Add unittest for utils._FingerprintFile
    Release all node locks during disk replace
    Unify a few re.compile calls in DRBD
    Auto-enable early release for offline old nodes
    Skip line-length warnings in man...
8d8d650c 02/12/2010 05:06 pm Michael Hanselmann

Add command line options for instance removal on export

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

adf385c7 02/10/2010 03:13 pm Iustin Pop

Fix dumpers/loaders after slots cleanup

Commit 154b958 changed (correctly) the slots usage, but this broke
dumpers/loaders since we relied directly on the own class slots
field.

To compensate, we introduce a simple function for computing the slots...

154b9580 01/27/2010 11:17 am Balazs Lecz

Fix slots definitions

According to http://docs.python.org/reference/datamodel.html#slots

  • The action of a slots declaration is limited to the class where it
    is defined. As a result, subclasses will have a dict unless they
    also define slots (which must only contain names of any...
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...

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

e11ddf13 01/04/2010 11:16 am Iustin Pop

pylint cleanups: dangerous initializers

Plus a silence for a wrong "uninitialized var".

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

7260cfbe 01/04/2010 11:15 am Iustin Pop

Add targeted pylint disables

This patch should have only:

- pylint disables
- docstring changes
- whitespace changes

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

0c9d32c1 11/12/2009 07:29 pm Guido Trotter

NIC.CheckParameterSyntax: fix bridged check

We should match for the strings to be the same "==" not to point to the
same memory location with is, or we skip the actual check.

Signed-off-by: Guido Trotter <>

6c881c52 11/06/2009 03:48 pm Iustin Pop

Fix pylint 'E' (error) codes

This patch adds some silences and tweaks the code slightly so that
“pylint --rcfile pylintrc -e ganeti” doesn't give any errors.

The biggest change is in jqueue.py, the move of _RequireOpenQueue out of
the JobQueue class. Since that is actually a function and not a method...

7736a5f2 11/06/2009 01:42 pm Iustin Pop

Introduce 'global hypervisor parameters' support

This patch adds support for global hypervisor parameters in instance
creation, instance modification, instance query and at instance load
time.

We basically prevent any query on these parameters, discard them at load...

debac808 11/02/2009 04:14 pm Iustin Pop

Convert the rest of the OpPrereqError users

This finishes the conversion of OpPrereqError creation to two-argument
style. Any leftovers as one-argument are not breaking anything, just
losing information about the errors.

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

b5e5632e 10/26/2009 11:41 am Iustin Pop

Allow '@' in tag values

This allows using an email address (as is) as part of a tag. The main
problem that could arise is when parsing tags from a shell script, but
(AFAIK) '@' is not a special character when used in values (happy to be
corrected if not true)....

b989b9d9 10/22/2009 04:40 pm Ken Wehr

Adding '--no-ssh-init' option to 'gnt-cluster init'.

Allows the initialization of a cluster without the creation or distribution
of SSH key pairs. Includes changes for LeaveCluster and RPC.

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

6d79896b 10/05/2009 12:39 pm Guido Trotter

Add slot and constant for supported OS variants

The slot will contain a list of variants, and the variants file constant
contains the file in the os dir which is supposed to hold the list.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

2d90608c 09/25/2009 04:01 pm Iustin Pop

Change config upgrade to be explicit

Currently the config upgrade is done at each object instantiation, that
means that ganeti-noded will run UpgradeConfig on all objects received
remotely (instances, disks, nics). This is not so good, so this patch
changes it so that only the ConfigWriter runs this method at...

e1dcc53a 09/24/2009 02:37 pm Iustin Pop

Add uuid attributes to configuration entities

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

90d726a8 09/22/2009 05:37 pm Iustin Pop

Change config upgrade to be explicit

Currently the config upgrade is done at each object instantiation, that
means that ganeti-noded will run UpgradeConfig on all objects received
remotely (instances, disks, nics). This is not so good, so this patch
changes it so that only the ConfigWriter runs this method at...

016d04b3 09/03/2009 08:32 pm Michael Hanselmann

Even more style fixes

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

d693c864 08/17/2009 05:46 pm Iustin Pop

Add ctime/mtime support to the main ConfigObjects

This patch adds ctime/mtime support to the “main” config objects - the
config data itself, and the cluster/nodes/instances objects.

These are not added on auto-upgrade, but rather should be migrated if it...

e978484a 08/17/2009 01:15 pm Iustin Pop

Remove obsolete ConfigObject.__setitem__

setitem is used to emulate container objects. We don't use this, and
the method is not used in a couple of normal operations (add/remove
instance, add/remove disk).

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

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...
77b60cdb 08/10/2009 01:41 pm Guido Trotter

Upgrade be/hv params with default values

From time to time we're adding new be or hv parameters. With this patch
missing parameters get set to the default value when loading the cluster
object. This patch version also considers the case when hv/be params...

d2d7d5c3 08/10/2009 01:41 pm Guido Trotter

objects: add configuration upgrade system

Add a very basic configuration update mechanism to objects.
An object can define the UpgradeConfig method, which will be called at
init time, and use it to fill in missing defaults in the configuration.
In the future we may want to make it more complex, for example adding...

aafb303d 08/10/2009 01:41 pm Guido Trotter

Add cluster-init --no-etc-hosts parameter

If --no-etc-hosts is passed in at cluster init time we set a new
parameter in the cluster's object to false, and avoid adding nodes to
the hosts file. The UpgradeConfig function is used to set the value to
True, when upgrading from an old configuration version....

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...
18d750b9 08/07/2009 12:24 pm Guido Trotter

Confd{Request,Reply} objects

These objects are used to store confd queries and replies.

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

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

98825740 08/06/2009 07:13 pm Michael Hanselmann

objects.BlockDevStatus: Remove ToLegacyStatus

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

4c14965f 08/05/2009 05:55 pm Guido Trotter

ConfigObject.ToDict() only export non-None values

The method is changed to a normal loop, to avoid calling getattr()
twice. Also getstate is changed to just use ToDict() by default.

This should also make getstate work for objects which have to
override the ToDict function because they contain other objects....

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

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

Add a objects.Disk.UnsetSize() method

This method recursively resets the size of the disk and its children to
zero.

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