Statistics
| Branch: | Tag: | Revision:

root / lib @ bcb1a39e

# Date Author Comment
bcb1a39e 08/25/2009 06:53 pm Michael Hanselmann

ganeti-noded: Close listening socket in child

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

b2c750a4 08/25/2009 06:51 pm Luca Bigliardi

LUDestroyCluster: hooks support

We're going to call hooks from its Exec method so LUDestroyCluster has to
support them.

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

3141ad3b 08/25/2009 06:51 pm Luca Bigliardi

LUDestroyCluster: run hooks

Run post hooks on master node before it's removed.

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

d763bed0 08/25/2009 06:17 pm Luca Bigliardi

HooksMaster: fix RunPhase logging

In case of complete failure results is empty, return immediately
(tnx unittests).

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

3cb5c1e3 08/25/2009 05:40 pm Luca Bigliardi

LURemoveNode: no logs running post on removed node

Do not log results from hooks ran on the removed node as now it's done by
RunPhase.

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

8c4b9364 08/25/2009 05:39 pm Luca Bigliardi

HooksMaster: logging hooks in RunPhase

Extend RunPhase so it will log hooks results in POST phase.

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

cd46f3b4 08/25/2009 02:40 pm Luca Bigliardi

node-remove post on removed node

Run post phase of node-remove on the removed node as well.

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

6ef2dc74 08/25/2009 01:38 pm Luca Bigliardi

HooksMaster: document raised exception

HooksAbort is raised, but not documented.

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

17e82923 08/24/2009 08:32 pm Luca Bigliardi

HooksMaster: list of nodes override

Allow the caller of HooksMaster.RunPhase() to specify an alternative list of
nodes.

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

46af447b 08/24/2009 06:06 pm Iustin Pop

Fix error output in LUSetClusterParams

Before:
gnt-cluster modify --enabled-hypervisors=xen-hvm,xem-pvm
Failure: command execution error:
Enabled hypervisors contains invalid entries: set([u'xem-pvm'])

After:
gnt-cluster modify --enabled-hypervisors=xen-hvm,xem-pvm...

83ec7961 08/24/2009 06:01 pm Michael Hanselmann

Add ArgHost class

It expands to the hostnames known by bash.

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

4a265c08 08/24/2009 06:01 pm Michael Hanselmann

Re-introduce constants for most often used arguments

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

bea60381 08/24/2009 04:53 pm Michael Hanselmann

Add tools directory to constants

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

c38c44ad 08/24/2009 04:53 pm Michael Hanselmann

Make all options use cli_option

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

a8005e17 08/24/2009 04:52 pm Michael Hanselmann

Change scripts to use new argument definitions

This can be used to generate the bash completion script automatically.
In the future it may allow for better command line validation as well.

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

863d7f46 08/24/2009 04:51 pm Michael Hanselmann

cli: Add new classes for argument definitions

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

313bcead 08/24/2009 03:13 pm Iustin Pop

Add OPMoveInstance and LUMoveInstance

This patch adds a basic version of LUMoveInstance. It doesn't yet
support iallocator-mode and it's implemented in old-style (non-TL) mode.

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

621b7678 08/24/2009 03:13 pm Iustin Pop

Add arbitrary node support to create/remove disks

Currently the cmdlib _CreateDisks and _RemoveDisks always work on the
instance's (current/primary) nodes. This patch extends them to take an
additional target_node parameter denoting that the creation/removal...

858f3d18 08/24/2009 03:13 pm Iustin Pop

Add disk copy support at backend and the rpc level

This uses a simple 'dd if=… | ssh $target dd of=…' method, like the
ExportSnapshot (which uses the OS export; here we want full disk-level
copy and not any FS-level changes).

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

4b5e8271 08/24/2009 03:11 pm Iustin Pop

Remove extra argument from HooksMaster class

The mcpu.py:HooksMaster class needs to have a proc attribute/argument to
init in ordet to call its LogWarning method. However, this is available
from the 'lu' attribute, so we can remove this dependency.

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

4dce1a83 08/24/2009 02:39 pm Michael Hanselmann

cmdlib: Fix broken QueryInstanceData for plain instances

Fixes this bug:
Failure: command execution error:
Can't compute disk status for instX.domain.tld: No error information

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

a02b89cf 08/21/2009 01:02 pm Guido Trotter

Reinsert simple timers in Mainloop

This time we use the standard python sched module, rather than doing it
all by ourselves. The scheduler in mainloop can be manipulated directly
by callers, to enter new events.

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

112d240d 08/20/2009 05:04 pm Guido Trotter

Convert the http server/mainloop to asyncore

We can avoid most of the Mainloop.Run() code if we use asyncore
for delivering I/O events, and just concentrate on what's missing in
asyncore: singnal handling and timers. This way confd can be ported to
use Mainloop as well....

9b739173 08/20/2009 12:28 pm Guido Trotter

Convert daemon.Mainloop to @SignalHandled

This makes the function a lot simpler, since it used to install two
different signal handlers, which are now transparently handled by the
decorator. The code is unindented, but remains unchanged apart from the
part that checks the signal handlers (which is now collapsed toghether)....

451575de 08/20/2009 12:28 pm Guido Trotter

Add a new SignalHandled decorator

This decorator can be used to call a function holding with protection
from a given signal. The function should accept a dict of
utils.SignalHandler, indexed by signal number, and make use of it.

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

6c52849e 08/20/2009 11:43 am Guido Trotter

SignalHandler, only accept list of signals

utils.SignalHandler can accept either a list of signals or a single
signal, but it's always called with a list. Removing the single signal
option.

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

565fe4c4 08/20/2009 11:43 am Guido Trotter

Simplify IO waiting in Mainloop

IO is never unregistered in our current usage, so dropping that
functionality for now. Also putting the poller outside of the Run()
function allows us to avoid the double step of adding tuples to an
_io_wait_add queue and adding them later in the main loop....

577c90a3 08/20/2009 11:43 am Guido Trotter

Remove timers from Mainloop

Timers are currently unused, slightly buggy (for example timeout doesn't
get updated correctly), and unneeded in the current form. Confd will
have timeouts in more simple fashion, and is not a mainloop user
anyway.

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

d8260842 08/18/2009 12:40 pm Michael Hanselmann

rapi: Add /2/instances/[instance_name]/info resource

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

552c8dff 08/18/2009 11:54 am Michael Hanselmann

cli: Merge ikv_option and keyval_option into cli_option

Merging them gets rid of two public functions in cli.py and optparse explicitly
supports more than one option type per class.

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

90f72445 08/17/2009 05:46 pm Iustin Pop

Add support for querying the ctime/mtime

This patch adds querying of ctime/mtime for the cluster/nodes/instances.

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

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

3b813dd2 08/17/2009 05:46 pm Iustin Pop

Add utils.FormatTime and a simple unittest

We don't format with subsecond-precision.

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

03298ebe 08/17/2009 04:57 pm Michael Hanselmann

cli: Use ToStdout/ToStderr instead of print

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

723f4565 08/17/2009 03:00 pm Michael Hanselmann

rapi: Add /2/nodes/[node_name]/storage/repair resource

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

76aef8fc 08/17/2009 02:26 pm Michael Hanselmann

Add opcode to repair storage volumes

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

637b8d7e 08/17/2009 02:26 pm Michael Hanselmann

Add RPC call for storage operations

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

6c3c6db9 08/17/2009 02:26 pm Michael Hanselmann

storage: Add operation for “vgreduce --removemissing”

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

4b37cac5 08/17/2009 02:26 pm Michael Hanselmann

storage: Add new function to execute operations

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

e9721add 08/17/2009 02:26 pm Michael Hanselmann

cmdlib: Add function to list all instances on node

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

5ba9701d 08/17/2009 02:26 pm Michael Hanselmann

cmdlib: Use common function to list instances on node

This will be used by another new function, too.

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

2d9005d8 08/17/2009 02:26 pm Michael Hanselmann

cmdlib: Make TLReplaceDisks._FindFaultyDisks global

It'll be used for repairing storage units.

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

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

bd315bfa 08/14/2009 04:00 pm Iustin Pop

Implement instance recreate-disks

This can be used for a 'plain' type instance when the underlying storage
went away, to recreate the storage (and reinstall) instead of removing
the instance and readding it.

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

2945fd2d 08/13/2009 02:49 pm Michael Hanselmann

TLReplaceDisks: Refuse changing secondary for specific disks

We move all disks anyway.

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

4c98b915 08/13/2009 02:49 pm Michael Hanselmann

rapi: Add /2/instances/[instance_name]/replace-disks resource

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

73086975 08/13/2009 02:49 pm Michael Hanselmann

rlib2: Remove leftover DOC_URI constant

Signed-off-by: Michael Hanselmann <>
Reviewed-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...
942be002 08/13/2009 12:53 pm Michael Hanselmann

cmdlib: Add new automatic disk replacement mode

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

02a00186 08/13/2009 12:53 pm Michael Hanselmann

TLReplaceDisks: Simplify argument checking logic

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

bec0522b 08/13/2009 12:36 pm Guido Trotter

Fix a typo in InitCluster

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>
(cherry picked from commit 022c3a0b36cb60644b6861ff27ad59202883963c)

0d853843 08/12/2009 04:58 pm Iustin Pop

Ignore results from drained nodes in iallocator

Since drained nodes could be (partially or fully) broken in iallocator,
we ignore results from these nodes when building the cluster map in
preparation for sending it to the script.

This is a cheap change for the stable branch; ideally we should not...

53bd7366 08/12/2009 01:02 pm Guido Trotter

InstanceIpToNodePrimaryIpQuery

This implements CONFD_REQ_NODE_PIP_BY_INSTANCE_IP, and maps instance ips
to primary node ips.

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

7189e790 08/12/2009 01:02 pm Guido Trotter

querylib: abstract a couple of common errors

Rather than composing them every time, we'll keep "ready-made" tuples
for unknown entries and internal errors (which is, yet, unused)

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

ae130c81 08/12/2009 01:02 pm Guido Trotter

SimpleConfigReader: add IP address lookup helpers

Add the following functions to SimpleConfigReader:
GetInstanceByIp, nic ip -> instance name
GetNodePrimaryIp, node name -> node primary ip
GetInstancePrimaryNode, instance name -> primary node

For the first one we precalculate the _ip_to_instance, so we don't have...

6daf26a0 08/12/2009 12:54 pm Guido Trotter

Add NodeRoleQuery

This implements CONFD_REQ_NODE_ROLE_BYNAME.

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

4d5db19c 08/12/2009 12:54 pm Guido Trotter

Remove unused imports from confd files

confd.server and daemons/ganeti-confd import a few modules they don't
actually use. Clean them up.

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

12ce965f 08/12/2009 12:54 pm Guido Trotter

ConfdProcessor fix init docstring

The message is an error deriving from some code moving/refactoring
happening before the initial submission

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

09444532 08/12/2009 12:54 pm Guido Trotter

Add constants for a ping confd request

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

e16e4824 08/12/2009 12:54 pm Guido Trotter

Implement confd queries

We'll start with a simple ping query, which returns ok if it gets no
query argument, and an error if it gets any. Also non-implemented query
are handled by the base ConfdQuery class, so we don't have to
special-case them in ConfdProcessor anymore....

d21eda27 08/12/2009 12:54 pm Guido Trotter

ConfdProcessor: move verification to init

During a query execution we currently verify whether we have that query
supported in our dispatch table. Since it's an error not to have it
anyway, we move this verification to the class creation, erroring out...

197b0f5d 08/12/2009 12:54 pm Guido Trotter

Add a missing node role

Apart from being a master, a candidate, offline or drained, a node can
have one more state: none of those. Adding back the normal, nice,
healthy "just" a node! :)

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

ca2a5b13 08/12/2009 12:54 pm Guido Trotter

Add a common error code for confd

If we standardize common error codes, clients can make use of them to
react, rather than trying to parse error strings.

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

e843991b 08/12/2009 12:54 pm Guido Trotter

SimpleConfigReader.GetNodeStatusFlags

Adding a way to retrieve the three node status flags, all in one go,
from SimpleConfigReader. Non-existing nodes are handled by returning
"None".

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

1e82bc80 08/11/2009 05:05 pm Michael Hanselmann

rapi: Add /2/nodes/[node_name]/storage/modify resource

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

8381fa2d 08/11/2009 05:05 pm Michael Hanselmann

rlib2: Import rapi

This fixes ganeti-rapi which was broken in commit 7a95a954.

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

7a95a954 08/11/2009 02:55 pm Michael Hanselmann

rapi: Add /2/nodes/[node_name]/storage resource

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

131178b9 08/11/2009 12:40 pm Luca Bigliardi

Constants: config directories cleanup

Use variables already defined.
Introduce ganeti CONF_DIR.

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

c3029d0a 08/11/2009 11:25 am Luca Bigliardi

Ssconf IP lists: change separator

Use " " instead of ",".

Signed-off-by: Luca Bigliardi <>

5909fb97 08/10/2009 09:26 pm Luca Bigliardi

Map Node/IP in ssconf IP lists

Map the node hostname with its primary/secondary ganeti IP in ssconf.
In this way a node can discover which are its IPs simply grepping ssconf files,
thus avoiding checks depending on network configuration.

Signed-off-by: Luca Bigliardi <>...

71f27d19 08/10/2009 04:46 pm Guido Trotter

confd.server.ConfdProcessor

A ConfdProcessor is the job processor for a confd query.
It's responsible for all the processing, from unpacking it, verifying
it, to calculating the result.

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

12426ae1 08/10/2009 03:57 pm Guido Trotter

Add empty ganeti.confd module

It will be used for the confd server code, and for a basic client
library.

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

ad8b2f9b 08/10/2009 03:56 pm Guido Trotter

SimpleConfigReader: s/Reload/_Load/

Since we use it also to load the config file initially we rename the
Reload function to _Load. Then we re-export it as Reload to clients
(since for them it's a reload).

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

7bcc78e4 08/10/2009 03:56 pm Guido Trotter

SimpleConfigReader.Reload, avoid double reloads

If for some reason we try to call Reload twice but the config file
hasn't changed, we don't want to load it again. Use stat() on the file
to cheaply avoid that situation.

We also return a boolean value, according to whether we have reloaded...

b125e3b3 08/10/2009 03:56 pm Guido Trotter

Basic exceptions used by confd

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

31c2a99e 08/10/2009 03:56 pm Guido Trotter

Reply status constants for confd

These are valid values for the "status" field in objects.ConfdReply

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

18679072 08/10/2009 03:56 pm Guido Trotter

constants for the confd daemon

Adding the various basic daemon constants for confd.

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

b5f5fae9 08/10/2009 03:23 pm Luca Bigliardi

Post cluster initialization LU

Add an 'empty' logical unit to run hooks after cluster initialization.

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

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

e71b560a 08/10/2009 01:41 pm Iustin Pop

Implement the KERNEL_PATH parameter for xen-hvm

For the xen-hvm hypervisor, the KERNEL_PATH parameter is needed but
today is hardcoded to a constants in the xen hypervisor library (argh!).

This patch moves this to a hypervisor constant with the default value...

703dc23d 08/10/2009 01:41 pm Iustin Pop

Move HVM's device_model to a hypervisor parameter

This moves yet another hardcoded value to a hypervisor parameter. I
removed the 64/32 difference as it doesn't seem valid to me - it's more
of a local site config rather than arch config.

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

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

40765aa0 08/07/2009 02:32 pm Guido Trotter

serializer.DumpSignedJson

Don't indent the final message.

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

a0c26bdb 08/07/2009 02:32 pm Guido Trotter

SimpleConfigReader: add serial numbers reading

GetConfigSerialNo and GetClusterSerialNo return respectively the serial
number for the config and for the cluster object.

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

89c52785 08/07/2009 02:32 pm Guido Trotter

constants: confd node roles

confd will return the node role as an integer, which represents one of
the mutually exclusive roles a node can be in.

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

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...
ea1518af 08/07/2009 02:19 pm Guido Trotter

constants: confd query types

Initially confd will support only two queries:

CONFD_REQ_NODE_ROLE_BYNAME
Given a node name, return its role.

CONFD_REQ_NODE_PIP_BY_INSTANCE_IP
Given an instance ip, return its node primary ip.
This rather weird query is the basis for ganeti nbma lookup....

1fe93c75 08/07/2009 12:24 pm Guido Trotter

SimpleConfigReader.Reload()

Rather than initializing the config statically at class creation time,
we load it every time Reload() is called.

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

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

4e9dac14 08/07/2009 12:24 pm Guido Trotter

Serializer, remove salt_verifier functionality

The salt needs to be returned anyway, so we don't have to add another
key for the sender to recognize which request an answer is answering, so
all that infrastructure is useless. :(

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

a8a76bc2 08/07/2009 12:08 pm Guido Trotter

asycnotifier.AsyncNotifier

AsyncNotifier is a special asyncore class that delivers inotify events
asynchronously.

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

01cf7dbe 08/06/2009 08:41 pm Guido Trotter

SimpleConfigReader: Handle errors when loading

Handling both IOErrors and ValueErrors (thrown by the simplejson loader)

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

3f71b464 08/06/2009 07:36 pm Guido Trotter

ssconf.CheckMasterCandidate

This function checks that the current node is a master candidate, and
terminates otherwise. It will be used upon ganeti-confd startup.

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

74f37195 08/06/2009 07:13 pm Michael Hanselmann

Add constants for local disk status

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

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

Handle None result from BlockdevFind

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

8113a52e 08/05/2009 08:05 pm Luca Bigliardi

Add master candidates IPs informations to ssconf

This will be used when querying confd, in order not to rely on DNS being
available.

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

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