| Branch: | Tag: | Revision:

root / lib / @ 23828f1c

History | View | Annotate | Download (12.2 kB)

# Date Author Comment
72737a7f 10/10/2008 12:55 pm Iustin Pop

Convert rpc module to RpcRunner

This big patch changes the call model used in internode-rpc from
standalong function calls in the rpc module to via a RpcRunner class,
that holds all the methods. This can be used in the future to enable
smarter processing in the RPC layer itself (some quick examples are not...

e92376d7 10/07/2008 11:03 am Iustin Pop

Implement job 'waiting' status

Background: when we have multiple jobs in the queue (more than just a
few), many of the jobs (up to the number of threads) will be in state
'running', although many of them could be actually blocked, waiting for
some locks. This is not good, as one cannot easily see what is...

0b38cf6e 10/01/2008 08:37 pm Michael Hanselmann

Don't pass sstore to LUs anymore

sstore is no longer used in LUs.

Reviewed-by: iustinp

437138c9 10/01/2008 08:34 pm Michael Hanselmann


Replacing ssconf with configuration.

Reviewed-by: iustinp

ae5849b5 10/01/2008 08:33 pm Michael Hanselmann

Add new query to get cluster config values

This can be used to retrieve certain cluster config values from
within clients.

OpDumpClusterConfig was not used anywhere, hence I'm just reusing
it. The way ConfigWriter.DumpConfig returned the configuration
was not thread-safe, anyway (no deepcopy)....

ca2a79e1 09/11/2008 12:44 pm Guido Trotter

Implement adding/removal of locks by declaration

With this patch LUs can declare locks to be added when they start and/or
removed after they finish. For now locks can only be added in the
acquired state, and removed if owned, and added locks default to be...

80ee04a4 09/11/2008 12:43 pm Guido Trotter

Use is_owned to determine whether to unlock

Now that is_owned is public we don't need to play games at the end of an
LU. If we're still owning anything we just release it.

Reviewed-by: imsnah

b2751b57 09/09/2008 01:41 pm Guido Trotter

Processor: remove ChainOpCode

This function was incompatible with the new locking system, and its
usage has been removed from the code. For now LUs share code by calling
common module-private functions in, in the future they will
use tasklets (when those will be implemented)....

6683bba2 08/28/2008 01:29 pm Guido Trotter

Fix issue when acquiring empty lock sets

By design if an empty list of locks is acquired from a set, no locks are
acquired, and thus release() cannot be called on the set. On the other
hand if None is passed instead of the list, the whole set is acquired,...

8a2941c4 08/18/2008 03:49 pm Guido Trotter

Processor: lock all levels even if one is missing

If a locking level wasn't specified locking used to stop. This means
that if one, for example, didn't specify anything at the LEVEL_INSTANCE
level, no locks at the LEVEL_NODE level were acquired either. With this...

64381ad7 07/30/2008 06:04 pm Guido Trotter

ChainOpCode is still BGL-only

Prevent mistakes with an assert.

Reviewed-by: iustinp

38206f3c 07/30/2008 05:04 pm Iustin Pop

Fix pylint-detected issues

This is mostly:
- whitespace fix (space at EOL in some files, not all, broken
indentation, etc)
- variable names overriding others (one is a real bug in there)
- too-long-lines
- cleanup of most unused imports (not all)...

3977a4c1 07/30/2008 02:30 pm Guido Trotter

Make sharing locks possible

LUs can declare which locks they need by populating the
self.needed_locks dictionary, but those locks are always acquired as
exclusive. Make it possible to acquire shared locks as well, by
declaring a particular level as shared in the self.share_locks...

fb8dcb62 07/30/2008 02:29 pm Guido Trotter

Add LogicalUnit.DeclareLocks

This additional LogicalUnit function is optional to implement, but lets
you change your locking needs for one level just before locking it, but
after the previous levels have been already locked. It is useful for
example to calculate what nodes to lock after locking an instance....

b1b6ea87 07/30/2008 11:43 am Iustin Pop

Rework master startup/shutdown/failover

This (big) patch reworks the master startup/shutdown and the fixes the
master failover.

What does the patch do?

For master start/stop:
- remove the old ganeti-master script and its associated man page
- moves the ip start/stop directly into the backend.(Start|Stop)Master...

04e1bfaf 07/23/2008 05:23 pm Guido Trotter

Invert nodes/instances locking order

An implementation mistake from the original design caused nodes to be
locked before instances, rather than after. This patch inverts the level
numbering, changing also the relevant unittests and the recursive
locking function starting point....

f1048938 07/14/2008 04:15 pm Iustin Pop

First version of user feedback fixes

This patch contains a raw version for fixing feedback_fn.

The new mechanism works as follows:
- instead of a per-Processor feedback_fn, there's one for each
ExecOpCode, so that feedback for different opcodes go via possibly...

68adfdb2 07/08/2008 07:32 pm Guido Trotter

Processor: Acquire locks before executing an LU

If we're running in a "new style" LU we may need some locks, as required
by the ExpandNames function, to be able to run. We'll walk up the lock
levels present in the needed_locks dictionary and acquire them, then run...

d465bdc8 07/08/2008 07:31 pm Guido Trotter

LogicalUnit: add ExpandNames function

New concurrent LUs will need to call ExpandNames so that any names
passed in by the user are canonicalized, and can be used by hooks,
locking and other parts of the code. This was done in CheckPrereq
before, but it's now splitted out, as it's needed for locking, which in...

36c381d7 07/08/2008 07:31 pm Guido Trotter

Processor: Move LU execution to its own method

This makes the try...finally code simplier, and helps adding a more
complex locking structure before the actual execution. It also fixes a
concurrency bug caused by the fact that write_count was read before
acquiring the BGL, and thus spurious config update hooks run could have...

77b657a3 07/08/2008 11:49 am Guido Trotter

Pass context to LUs

Rather than passing a ConfigWriter to the LUs we'll pass the whole
context, from which a ConfigWriter can be extracted, but we can also
access the GanetiLockManager. This also fixes the places where a FakeLU
is created.

Reviewed-by: iustinp

984f7c32 07/01/2008 03:28 pm Guido Trotter

Context: s/GLM/glm/

Make the GanetiLockManager instance of GanetiContext lowercase

Reviewed-by: imsnah

04864530 07/01/2008 01:43 pm Guido Trotter

Processor: acquire the BGL for LUs requiring it

If a LU required the BGL (all LUs do, right now, by default) we'll
acquire it in the Processor before starting them. For LUs that don't
we'll still acquire it, but in a shared fashion, so that they cannot run...

1c901d13 07/01/2008 01:43 pm Guido Trotter

Processor: pass context in and use it.

The processor used to create a new ConfigWriter when it was initialized.
We now have one in the context, so we'll just recycle it. First of all
we'll pass the context in when creating a new Processor object, then
we'll just use context.cfg, which is granted to be initialized, wherever...

c6868e1d 06/30/2008 07:11 pm Guido Trotter

Fix sstore handling in Processor

- no need to keep the sstore as an object member, remove it
- don't reinitialize sstore only if self.cfg is None
This is not an issue, as the Processor is recycled for every opcode,
but in general we know that (a) we might need a different type of...

b3989551 06/23/2008 07:55 pm Iustin Pop

Fix gnt-cluster “command” and “copyfile”

Since the disabling of forking in the master daemon, the two ssh-based
subcommands were not working anymore. However, there is no need at all
for the commands to be run from the master daemon (permissions to read
the cluster private ssh key notwithstanding), they can be run directly...

8729e0d7 06/17/2008 09:50 am Iustin Pop

Implement disk grow at LU level

This patch adds a new opcode and LU for growing an instance's disk.

The opcode allows growing only one disk at time, and will throw an error
if the operation fails midway (e.g. on the primary node after it has
been increased on the secondary node). As such, it might actually leave...

05f86716 06/16/2008 05:32 pm Guido Trotter

Move SetKey to WritableSimpleStore and use it

Before we used to be able to update SimpleStore by just calling SetKey, this
feature is now moved to an external class, which inherits from it. In this
patch the new WritableSimpleStore class is also put to use, in the LUs that...

a0c9f010 06/12/2008 04:05 pm Michael Hanselmann

Move InitCluster opcode into a single function

This allows us to initialize a new cluster. The code certainly contains
bugs and hooks aren't implemented yet.

Reviewed-by: iustinp

c6d58a2b 06/12/2008 01:18 pm Michael Hanselmann

Remove REQ_CLUSTER from opcode handling code

It's not needed anymore now that all opcodes require a cluster. Cluster
initialization was the only exception.

Reviewed-by: iustinp

1fce5219 04/30/2008 12:29 pm Guido Trotter

Add a LU Hooks notification function

Previously LUs could be failed by pre-hooks, and post-hooks just had effects by
themselves. This patch allows a LU to define the HooksCallBack function if it
wants to know about its hooks' results and alter its results in response....

b07a6922 04/30/2008 12:29 pm Guido Trotter

HooksMaster: Make RunPhase return the rpc output

Right now the hooks output is propagated from the nodes all the way up to
HooksMaster.RunPhase, which uses it for debugging PRE hooks, but then silently
discards them. We'll now propagate it up to the Processor.ExecOpCode function,...

9ac99fda 04/23/2008 05:51 pm Guido Trotter

Add gnt-backup remove functionality

This patch also fixes the LUExportInstance Prereq docstring.

Reviewed-by: iustinp

d61df03e 04/16/2008 04:56 pm Iustin Pop

Allocator framework, 1st part: allocator input generation

In preparation for the introduction of automatic instance allocator,
this patch adds an allocator simulation opcode, that based on the input
parameters, will return either the input message to the allocator...

7767bbf5 03/31/2008 03:04 pm Manuel Franceschini

parms->params Refactoring

- Substitute all occurences of name 'parms' with 'params'
- Small codestyle fix

Reviewed-by: ultrotter

0cc05d44 03/31/2008 02:00 pm Manuel Franceschini

Map OpSetClusterParams to correponding LU

Reviewed-by: iustinp

fe482621 03/30/2008 05:54 pm Iustin Pop

Change the order of config updates in some LUs

In the start and stop instance LUs, the configuration update is done
right at the end. This means that if, for example, the instance shutdown
succeeds, but the drive deactivation fails, the next run of the watcher...

249069a1 03/25/2008 06:30 pm Iustin Pop

Remove the add/remove mirror operations

These two operations are related to md/drbd7 code (remote_raid1). Remove
them as part of the md/drbd7 removal.

Reviewed-by: imsnah

7c0d6283 03/05/2008 04:39 pm Michael Hanselmann

Codestyle fixes: adding a few empty lines

Reviewed-by: ultrotter

c99a3cc0 02/22/2008 06:12 pm Manuel Franceschini

Fixes small spell mistakes and comments

06009e27 02/05/2008 04:12 pm Iustin Pop

Add a test opcode that sleeps for a given duration

This can be used for testing purposes.

Reviewed-by: ultrotter,imsnah

f4d4e184 12/12/2007 03:13 pm Iustin Pop

Add the ‘gnt-cluster verify-disks’ command

This patch adds the OpVerifyDisks handling in and the
verify-disks command in the gnt-cluster script, which for every instance
computed by LUVerifyDisks submits a new OpActivateInstanceDisks request.

Reviewed-by: imsnah

2395c322 11/09/2007 10:13 pm Iustin Pop

Soften the requirements for hooks execution

Currently, an unreachable node (or one that return undetermined failure)
in the hooks pre-phase will abort the curren operation. This is not
good, as a down node could prevent many operation on the cluster.

This patch changes a RPC-level failure (and not a hook execution...

5bfac263 11/08/2007 09:04 pm Iustin Pop

Changes related to logging

This patch modifes:
- mcpu.Processor.LogWarning to have its 'hint' parameter as optional
and only log it if not None
- cmdlib._WaitForSync to not log directly to stdout/stderr but via the
proc.Log(Info|Warning) methods...

0fbbf897 11/06/2007 07:01 pm Iustin Pop

Add better error logging functions for LUs

Currently, some LUs use logger.Error, others just feedback_fn, etc. This
patch adds three functions to mcpu.Processor than can be used to log
messages to both the log and to the user.

These function will be used to enhance the output of replace-disks for...

73415719 11/03/2007 08:55 am Iustin Pop

Implement tag searching

This patch adds a search command for locating tags on all objects of the
cluster using a regex pattern.

Reviewed-by: aat

1a8c0ce1 10/29/2007 10:09 pm Iustin Pop

Change the signature of some methods of mcpu.Processor

This patch moves the passing of the feedback_fn argument from the
(Exec|Chain)OpCode to the initialization of the Processor instance.

Reviewed-by: imsnah

bf6929a2 10/18/2007 01:25 pm Alexander Schreiber

Patch series for reboot feature, part 2

This patch series implements the reboot command for gnt-instance. It
supports three types of reboot: soft (hypervisor reboot), hard (instance
config rebuild and reboot) and full (full instance shutdown and startup

6a4aa7c1 10/11/2007 06:23 pm Iustin Pop

Implement post-configuration-update hook

This patch adds a special hook: the post-configuration update hook. This
hook has only a post phase that runs after a top-level LU that modified
the configuration.

Since the hook is a post-phase one, no error checking is done on the...

4167825b 10/11/2007 06:00 pm Iustin Pop

Split the hooks env building in two parts

This patch moves some of the environment processing from _BuildEnv to a
new _RunWrapper command which does the stringification and adds the
sstore variables.

The reasoning is that the sstore can be fresher than before the...

9a395a76 10/11/2007 06:00 pm Iustin Pop

Move hook execution decision to HooksMaster

Currently, the HooksMaster creation and execution decision is in the
Processor class. This is not optimal, so we change to always create a
hooks master and instead make the decision inside that class, by
creating empty node lists for both pre and post if the lu doesn't...

f97a6b10 10/11/2007 05:59 pm Iustin Pop

Remove cfg and sstore parameters to HooksMaster

The HooksMaster class doesn't use the cfg parameter, and it's better to
use it from the LU anyway (if needed). Let's remove it.

Also, the sstore of the LU can be fresher than the sstore we got at init
time, so use that instead and remove our own....

2f31098c 10/10/2007 01:00 pm Iustin Pop

Remove the shebang from modules

Since modules are not directly executables, remove the shebang from
them. This helps with lintian warnings.

Also make the autogenerated contain two comment lines at
the beginning, like the other modules.

Reviewed-by: ultrotter

f27302fa 10/08/2007 06:10 pm Iustin Pop

Change tags add/remove to process multiple tags

This patch changes the tags opcodes to work with multiple tags at once
instead of only one. As such, the opcodes and some parameters are

Reviewed-by: imsnah

07bd8a51 09/18/2007 03:42 pm Iustin Pop

Implement cluster rename operation

This patch adds a new OpCode (and corresponding LU) that implements the
cluster rename functionality.

This is done by shutting down the master role, making the needed sstore
modifications and distributing the changed files to all nodes, and then...

decd5f45 09/17/2007 02:52 pm Iustin Pop

Implement instance rename operation

This patch adds support for instance rename operation at all remaining
layers: RPC, OpCode/LU and CLI.

Reviewed-by: imsnah

4a72cc75 09/14/2007 12:03 pm Iustin Pop

Remove OpQueryNodeData and LUQueryNodeData

Now that LUQueryNodes supports all the functionality of LUQueryNodeData,
let's migrate gnt-node.ShowNodeConfig to use it and remove all traces of
OpQueryNodeData and LUQueryNodeData.

Reviewed-by: imsnah

3ecf6786 08/14/2007 06:17 pm Iustin Pop

Style changes for pep-8 and python-3000 compliance.

This changes the raising of exceptions from:
raise Exception, value
raise Exception(value)

as the first form will be removed in python-3000 and the second form is
preferred now.

The changes also involve a few cases of changing from raising standard...

5c947f38 08/08/2007 12:37 pm Iustin Pop

Implement tag support for cluster, nodes and instances.

This is only the backend part, from the command line the tags can't be
read/modified yet.

Reviewed-by: imsnah

5fcdc80d 07/27/2007 10:41 am Iustin Pop

Move the cluster name from ConfigWriter to SimpleStore.

Reason: if left ConfigWriter, nodes don't know to which cluster they belong.
This will bite us later when we'll revisit node join operation.

Cons: we lose the cluster name from the config file, which means a...

fe7b0351 07/26/2007 07:09 pm Michael Hanselmann

- Move --force option to
- Implement “gnt-instance reinstall”
- Fix two typos

Reviewed-by: iustinp

dcb93971 07/24/2007 02:45 pm Michael Hanselmann

- Implement “gnt-node volumes”
- Create all --output options using a constant
- Put node checking code from opcodes into a single function
- Do the same for output fields

Reviewed-by: iustinp

880478f8 07/23/2007 05:38 pm Iustin Pop

Big change/cleanup in relation to the master startup:
- move the master node name from the ConfigWriter to SimpleStore (all
nodes need this, and it was the only thing pulled in from the
ConfigWriter on nodes)
- fix and the testing w.r.t. this change; for testing, rename...

a8083063 07/16/2007 04:39 pm Iustin Pop

Initial commit.