Statistics
| Branch: | Tag: | Revision:

root / lib @ 952d7515

# Date Author Comment
952d7515 01/26/2011 06:25 pm Michael Hanselmann

Start all daemons on cluster initialization

At least ganeti-confd was not started. It got started a few minutes
later by ganeti-watcher. Also move one pylint disable to the effective
line.

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

34616379 01/26/2011 06:06 pm Michael Hanselmann

Improve option descriptions

Also replace hardcoded “xenvg” with constant.

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

65cb5c4d 01/26/2011 05:44 pm Iustin Pop

Remove two unused variables

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

5ca09268 01/26/2011 02:26 pm Iustin Pop

Fix LUOSDiagnose and non-vm_capable nodes

This skips non-vm_capable nodes in the OS diagnose search, since such
OSes will not be used anyway on those nodes.

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

8b437a6e 01/26/2011 01:45 pm René Nussbaumer

Rephrasing two error messages for auto promotion

Using auto_promote or auto-promote can lead to confusion on using the
user facing interfaces. While auto-promote is fine for CLI it's not for
RAPI and vice-versa. This patch should eliminate this confusion....

985e3f77 01/26/2011 12:31 pm Iustin Pop

storage: Check that mapper is either used or None

This is a followup patch to the one moving GetAllocatable out to
module level.

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

5ae7cd11 01/26/2011 12:06 pm Michael Hanselmann

Fix bug in “gnt-node list-storage”

LVM PV storage units would always show as allocatable, even when they
weren't. For some reason I have not been able to determine, the function
parsing the attributes (“_GetAllocatable”) was not even called and the
list opcode simply returned the attribute string as the value (e.g....

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

8fd2e34c 01/20/2011 02:15 pm Michael Hanselmann

Increase remote import/export timeout

It's been shown that 60 seconds may not be enough to establish a
connection.

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

b577dac4 01/07/2011 05:47 pm Michael Hanselmann

gnt-instance info: Show disk template

The data was already there, but not shown.

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

ab92578a 01/07/2011 12:01 pm Michael Hanselmann

Remove unused import from client.gnt_instance

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

678aa6d3 01/06/2011 06:52 pm Michael Hanselmann

gnt-instance console: Improve error reporting

If the SSH command fails, this will give a more detailed error
message than before.

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

eaf7d41d 01/06/2011 06:42 pm Michael Hanselmann

Increase timeout for connection on remote import

The source cluster has to shut down an instance before it can be
exported. Doing so can take a while, but the default connection timeout
is only 60 seconds. Adding the shutdown timeout on the receiving cluster...

30c945d0 12/29/2010 05:48 pm Michael Hanselmann

jqueue: Fix cancelling while in waitlock in queue

Since the recent change to leave jobs in the “waitlock” status (commit
5fd6b6947), cancelling a job while it's back in the queue would break.
This patch handles these cases and adds a unittest.

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

cd4c86a8 12/20/2010 11:23 pm Michael Hanselmann

cli: Extend message for LUXI timeouts

Point out that jobs already submitted continue to run.

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

28e3e216 12/20/2010 11:23 pm Michael Hanselmann

Fix timeout handling in LUXI client

If the socket can't be read in time, it raises “socket.timeout”, for
which there is special handling code. Unfortunately the exception block
was in the wrong order and “socket.error” caught it before.

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

43217ac7 12/20/2010 04:33 pm Michael Hanselmann

Merge branch 'stable-2.3' into devel-2.3

  • stable-2.3:
    Prepare 2.3.1 release
    Fix disk status verification in LUClusterVerify

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

4f5c2533 12/15/2010 08:18 pm Adeodato Simo

Fix gnt-cluster verify with diskless instances

`gnt-cluster verify` was failing with KeyError if there was any
diskless instance in the cluster. This was because _CollectDiskInfo()
was not including these instances in the returned dictionary, but they
were expected to be present in LUVerifyCluster.Exec()....

5fd6b694 12/15/2010 03:42 pm Michael Hanselmann

jqueue: Keep jobs in “waitlock” while returning to queue

Iustin Pop reported that a job's file is updated many times while it
waits for locks held by other thread(s). After an investigation it was
concluded that the reason was a design decision for job priorities to...

d41d07d4 12/09/2010 05:36 pm Iustin Pop

Fix disk status verification in LUClusterVerify

Commit b8d26c6 added disk status verification, but it has two
(different) bugs for not healthy nodes.

For offline nodes, we don't add at all the disk status to the
instance/node dict, with the result that the instance is not present in...

d1a0ab50 12/09/2010 05:13 pm Guido Trotter

Merge branch 'devel-2.2' into devel-2.3

  • devel-2.2:
    Fix rename for file-backed instances

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

5500ca1f 12/09/2010 05:11 pm Guido Trotter

Merge branch 'stable-2.2' into stable-2.3

  • stable-2.2:
    Fix rename for file-backed instances

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

3721d2fe 12/09/2010 05:09 pm Guido Trotter

Fix rename for file-backed instances

Currently the code wrongly changes the disk logical/physical id
component representing the path from "$storage_dir/$iname/disk$seq" to
"$storage_dir/$iname/disk/$seq" (note the additional slash) breaking the
rename.

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

e1137eb6 12/01/2010 09:45 pm Michael Hanselmann

locking: Clarify message for removed locks

Just being told that a lock doesn't exist can be confusing. One case
were this happens is when a job (e.g. instance modify) waits for a job
removing the instance (e.g. export with remove).

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

29e8788e 12/01/2010 06:50 pm Michael Hanselmann

impexpd: Disable OpenSSL compression in socat if possible

This uses an option only available in patched socat versions. More
information is available from the INSTALL update included in this
patch.

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

c49b0092 11/30/2010 06:15 pm Adeodato Simo

config.py: need explicit %-formatting in errors.OpPrereqError.

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

9aacb199 11/18/2010 03:03 pm Iustin Pop

Reinstall instance: disallow offline secondaries

Currently, reinstallation of a DRBD instance with the secondary node offline does:

node1# gnt-instance reinstall -f instance1
Waiting for job 139053 for instance1...
Thu Nov 18 01:36:09 2010 - WARNING: Could not prepare block device disk/0 on node node3 (is_primary=False, pass=1): Node is marked offline...

e2334900 11/18/2010 03:03 pm Iustin Pop

Fix breakage in OS state modify

I was using the feedback_fn function incorrectly (it doesn't
automatically expand the arguments).

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

86c340af 11/17/2010 05:45 pm Iustin Pop

Merge branch 'devel-2.2' into devel-2.3

  • devel-2.2:
    QA: add tests for gnt-cluster modify -B
    LUSetClusterParms: fix validation of beparams

Conflicts:
lib/cmdlib.py (reverted & applied manually the change)

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

52b783c2 11/17/2010 02:14 pm Iustin Pop

LUSetClusterParms: fix validation of beparams

Since the contents of the dict is validated via the ForceDictType, we can
simply require that it is a dict here. The previous check was wrong, as it was
copied from the HV checks (which also doesn't verify the leaf dict type)....

28a7318f 11/11/2010 02:16 pm Iustin Pop

Add unittests for TemporaryReservationManager

And fix an error message.

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

a7359d91 11/11/2010 12:30 pm David Knowles

TempReservationManager: Reserved() doesn't work

Note: It appears this has been around since the initial checkin of
TemporaryReservationManager. I have no idea what this could break, so
someone else may want to test this more thoroughly.

Signed-off-by: David Knowles <>...

c6a9dffa 11/03/2010 04:44 pm Michael Hanselmann

Fix disk checks in “gnt-cluster verify”

Tests have shown that the changes in commit b8d26c6e5 don't work as
wanted. If any disk wasn't found on the node, all disks located on the
same node would show as faulty. The cause was incorrect exception
handling on the node....

69cf3abd 11/03/2010 04:44 pm Michael Hanselmann

Remove shebang line from ganeti.server.*

Some of then were forgotten.

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

04367e70 11/01/2010 07:27 pm Guido Trotter

Drop the -g shortcut for --vg-name

Changing the volume group is a lot less frequent than acting on a node
group. As such we drop the "-g" shortcut and require the long option to
be passed. In 2.3 the commands which used to accept the volume group as
"-g" won't have any node group option, so no confusion will arise. Later...

eb28ecf6 11/01/2010 07:27 pm Guido Trotter

Merge the common options between import and add

The "I always wanted to do this" commit.

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

412b3531 11/01/2010 07:27 pm Guido Trotter

Improve LookupNodeGroup's docstring

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

648e4196 11/01/2010 07:27 pm Guido Trotter

Add ConfigWriter.GetNodeGroup

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

3c34f03f 11/01/2010 07:27 pm Guido Trotter

Remove private ip mention in error message

There is no "private" ip in Ganeti, we only have primary and secondary
ones. Whether they are public or private is a per-installation detail.

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

2317945a 11/01/2010 07:27 pm Guido Trotter

luxi: disable two lint errors

This is already disabled for the same type of request a couple of lines
above. The new code was introduced in e986f20c but didn't have the
disables.

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

4d32c211 11/01/2010 07:27 pm Guido Trotter

Add -s option to gnt-node modify

We can now change a nodes' secondary ip.

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

1fc34c48 11/01/2010 05:02 pm Michael Hanselmann

config: Write ssconf after renaming instance

This fixes a bug where the ssconf_instance_list file was
not updated after an instance rename.

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

5119f2ec 10/29/2010 05:48 pm Michael Hanselmann

Move ganeti-noded to ganeti.server.noded

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

d9c82a4e 10/29/2010 05:48 pm Michael Hanselmann

Move ganeti-rapi to ganeti.server.rapi

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

899c4d2c 10/29/2010 05:48 pm Michael Hanselmann

Prepare move of daemons to ganeti.server

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

29d91329 10/29/2010 05:48 pm Michael Hanselmann

Move ganeti-masterd to ganeti.server.masterd

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

5c9c0e0e 10/29/2010 05:48 pm Michael Hanselmann

Move ganeti-confd to ganeti.server.confd

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

9f4bb951 10/29/2010 05:48 pm Michael Hanselmann

Move ganeti-watcher to ganeti.watcher

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

e986f20c 10/28/2010 07:56 pm Michael Hanselmann

Add support and checks for version in LUXI

A new constant, LUXI_VERSION, is used to verify the peer's version. The
version is optional, so old(er) clients and servers talking to peers not
supporting it won't break. Example with mismatching library:

$ gnt-instance list...

7a8bda3f 10/28/2010 07:56 pm Michael Hanselmann

luxi.ProtocolError: Derive from errors.LuxiError

This allows LUXI errors to be encoded and serialized.

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

3b01286e 10/28/2010 07:56 pm Michael Hanselmann

LUExportInstance: Accept instance already shut down

To remove the instance after an export it needs to be stopped. This can
be achived using the parameter “shutdown”, or by explicitly shutting
down the instance before exporting. The latter would still require the...

f9116d58 10/28/2010 05:06 pm Guido Trotter

GanetiLockManager, remove default values

The nodes and instances parameters to the constructor are mandatory
anyway, as a value of None will fail when creating the LockSet. Rather
than fixing this adding code lines, since we never used the default
value, let's remove them and require that the parameters are passed....

1ac6f2ad 10/28/2010 05:06 pm Guido Trotter

ConfigWriter.GetNodeGroupList

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

add6d208 10/28/2010 03:50 pm Iustin Pop

Prevent onlining a node without working noded

This is just a basic check, plus a warning. In the future, we might do
more checks, or prevent simple onlining (without readd) if --force is
not passed.

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

4ca52046 10/28/2010 03:49 pm Iustin Pop

Yet another rework in LUSetNodeParms

We will need the new role in CheckPrereq, so move its computation there
and save the new role to self.

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

877b849b 10/28/2010 02:51 pm Iustin Pop

Prevent moving/creating instances on non-vm nodes

This small patch modifies LUCreateInstance, LUReplaceDisks and
LUMoveInstance to not use non-vm_capable nodes.

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

8bf9e9a5 10/28/2010 02:51 pm Iustin Pop

ConfigWriter: add some helper functions

This can be used to compute a node's instances easily, and a small
function to get all non-vm_capable nodes.

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

077114cd 10/28/2010 02:51 pm Iustin Pop

Add vm_capable to LUSetNodeParams

And also do some cleanup: we only run the role changed actions if the
node has actually changed roles.

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

53919782 10/28/2010 02:51 pm Iustin Pop

Add vm_capable to gnt-node modify

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

8964ee14 10/28/2010 02:51 pm Iustin Pop

Add support for vm_capable in cluster verify

The method to make vm_capable integrate easily into cluster verify is as follows:

- we add a new NV_VMNODES that represents nonvm-capable nodes
the LU populates this list (it's expected that non-vm_capable nodes...

4e2d3d25 10/28/2010 02:51 pm Iustin Pop

Add an UploadHelper to cmdlib

This is used in two places already, and will be needed in a third, so
let's abstract it.

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

77bad5b2 10/28/2010 02:51 pm Iustin Pop

Add support for vm_capable in file distribution

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

fd3d37b6 10/28/2010 02:51 pm Iustin Pop

Add the master/vm_capable flags in node add

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

7b4978ad 10/28/2010 02:51 pm Iustin Pop

Add the capability flags in node info output

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

614e7e26 10/28/2010 02:51 pm Iustin Pop

Add a CheckNodeVmCapable helper in cmdlib

Also changes the error code for the other CheckNode* helpers to
ECODE_STATE, not ECODE_INVAL: ECODE_INVAL is for requests that are
invalid (e.g. create drbd instance with one node), whereas ECODE_STATE
denote requests that are not satisfiable due to cluster/node/instance...

b8d26c6e 10/28/2010 02:34 pm Michael Hanselmann

LUClusterVerify: Complain if disk is marked faulty

This will show a warning if, for example, one side of a DRBD
disk becomes unavailable. The data is collected separately
from the other verification data.

Example output:

  • Verifying instance status
    - ERROR: instance inst1: disk/0 on node2 is faulty...
02266fe0 10/27/2010 02:58 pm Michael Hanselmann

Move gnt-backup to ganeti.client.gnt_backup

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

e792102d 10/27/2010 02:58 pm Michael Hanselmann

Move gnt-instance to ganeti.client.gnt_instance

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

a09b9e3d 10/27/2010 02:58 pm Michael Hanselmann

Move gnt-job to ganeti.client.gnt_job

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

37494fa4 10/27/2010 02:58 pm Michael Hanselmann

Move gnt-node to ganeti.client.gnt_node

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

7b3e7d41 10/27/2010 02:58 pm Michael Hanselmann

Move gnt-cluster to ganeti.client.gnt_cluster

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

6d50f5f9 10/27/2010 02:19 pm Michael Hanselmann

Move gnt-os to ganeti.client.gnt_os

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

c2855a12 10/27/2010 02:19 pm Michael Hanselmann

Move gnt-debug to ganeti.client.gnt_debug

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

2d48a3a2 10/27/2010 02:19 pm Michael Hanselmann

Allow programs to be part of the Ganeti library

Eventually this will help ensuring that clients and servers are of the
same version, as long as they're imported from the same path. Currently
it's relatively easy for gnt-* and ganeti-* to be from a different...

197e3bb2 10/27/2010 01:46 pm Iustin Pop

Implement the master_capable flag in node modify

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

f91e255a 10/27/2010 01:46 pm Iustin Pop

Add master_capab to gnt-node modify

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

c190e817 10/27/2010 01:46 pm Iustin Pop

Export the capability flags in query, rapi, ialloc

Signed-off-by: Iustin Pop <>
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 <>

21232d04 10/27/2010 01:44 pm Iustin Pop

Rework node role changes

There have been many bugs in gnt-node modify. Let's try to introduce
some more.

This patch reworks the node role changes from tracking the flag changes
to completely overwriting the flags based on the new role. This paves
the way for (in 2.4 or later) moving to a single attribute for nodes....

c29e35fe 10/26/2010 04:39 pm Michael Hanselmann

rpc: Work around epydoc warning

Aliasing the “threading” module allows us to avoid the “No information
available for ganeti.rpc._RpcThreadLocal's base threading.local” warning
by epydoc.

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

b30aded7 10/26/2010 03:38 pm Michael Hanselmann

Merge branch 'devel-2.2'

  • devel-2.2:
    Allow remote imports without checked names
    ConfigWriter: Fix typo in error message parts
    Fix remote imports

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

3f2ad566 10/26/2010 03:25 pm Michael Hanselmann

Allow remote imports without checked names

By default all names are checked (LUCreateInstance, name_check). In some
cases it can be useful to disable this check, but doing so was not
allowed for remote imports. One should be aware, however, that using
this feature can lead to rename script failures when importing a remote...

b883637f 10/26/2010 02:36 pm René Nussbaumer

Support modify of prealloc_wipe_disks config value

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

1116c3b2 10/26/2010 12:48 pm Iustin Pop

Export a node's group information in iallocator

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

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

a285fcfd 10/26/2010 12:47 pm Iustin Pop

Rename --nodegroup to --node-group

For consistency with other CLI options.

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

622444e5 10/26/2010 12:47 pm Iustin Pop

Export node group data in iallocator

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

acd34ea7 10/26/2010 12:47 pm Iustin Pop

Split IAllocator._ComputeClusterData

The node and instance computations were all in this big function; we
separate them out for more clarity.

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

a03fcb26 10/26/2010 12:13 pm René Nussbaumer

Putting the pieces together and invoke the wipe in cmdlib

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

271b7cf9 10/26/2010 12:13 pm René Nussbaumer

Adding RPC call for blockdev_wipe

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

da63bb4e 10/26/2010 12:12 pm René Nussbaumer

Second iteration over backend.BlockdevWipe

This patch now uses dd entirely to wipe the disk, make it
much easier to wipe in blocks so we can give interactive feedback
about the status.

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

3d889a7d 10/25/2010 02:03 pm Michael Hanselmann

ConfigWriter: Fix typo in error message parts

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

f2165b8a 10/25/2010 01:47 pm Iustin Pop

Simplify and extend the instance OS env

Some parameters were missing (uuid, c/mtime). We simplify the export
method; unfortunately we cannot simply iterate over slots since the
mapping is not 1:1.

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

eb180fe2 10/22/2010 06:23 pm Iustin Pop

ConfigWriter: prevent using a foreign config

If the configuration file doesn't denote this node as master, we prevent
startup. This would have detected our previous race condition more
easily, hence we add it as a permanent check.

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

21004460 10/22/2010 06:23 pm Iustin Pop

Fix bootstrap.MasterFailover race with watcher

This fixes a recently diagnosed race condition between master failover
and the watcher.

Currently, the master failover first stops the master daemon, checks
that the IP is no longer reachable, and then distributes the updated...

bd407597 10/22/2010 06:23 pm Iustin Pop

ConfigWriter: protect against multiple writers

This should fix the case where there are two masters that both try to
distribute the configuration file to the cluster. The first one that does so,
will "win" the ownership of the config.data.

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

8f065ae2 10/22/2010 06:23 pm Iustin Pop

backend.Upload: switch to utils.SafeWriteFile

This allows serialization of updates to a given file, with respect to
other cooperating writers.

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

4138d39f 10/22/2010 06:22 pm Iustin Pop

Add a "safe" file wrapper over WriteFile

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

9e100285 10/22/2010 06:21 pm Iustin Pop

Add functions to read and compare file 'ID's

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

574d1b7b 10/22/2010 03:19 pm Michael Hanselmann

LUSetInstanceParams: Remove unused attribute

“os_new” is not used anywhere, removing it.

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