Statistics
| Branch: | Tag: | Revision:

root / lib @ cb4d3314

# Date Author Comment
cb4d3314 11/21/2011 09:36 am Michael Hanselmann

masterd: Initialize job queue only after RPC client

Otherwise jobs started after an unclean master shutdown will fail as
they depend on the RPC client.

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

5483fd73 11/21/2011 09:36 am Michael Hanselmann

masterd: Shutdown only once running jobs have been processed

Until now, if masterd received a fatal signal, it would start shutting
down immediately. In the meantime it would hang while jobs are still
processed. Clients couldn't connect anymore to retrieve a jobs' status....

2d6b5414 11/21/2011 09:36 am Michael Hanselmann

daemon: Support clean daemon shutdown

Instead of aborting the main loop as soon as a fatal signal (SIGTERM or
SIGINT) is received, additional logic allows waiting for tasks to finish
while I/O is still being processed.

If no callback function is provided the old behaviour--shutting down...

f5acf5d9 11/21/2011 09:36 am Michael Hanselmann

daemon: Allow custom maximum timeout for scheduler

This is needed in case the scheduler user (daemon.Mainloop in this case)
has other timeouts at the same time. Needed for clean master shutdown.

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

6d5ea385 11/21/2011 09:36 am Michael Hanselmann

jqueue: Add code to prepare for queue shutdown

Doing so will prevent job submissions (similar to a drained queue),
but won't affect currently running jobs. No further jobs will be
executed.

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

ef52306a 11/21/2011 09:36 am Michael Hanselmann

workerpool: Export function to check for running tasks

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

e0545ee9 11/21/2011 09:36 am Michael Hanselmann

daemon: Use counter instead of boolean for mainloop abortion

Also log a message when a fatal signal was received and use dict.items.

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

0e82dcf9 11/18/2011 01:48 pm Andrea Spadaccini

Merge branch 'devel-2.5'

  • devel-2.5: (24 commits)
    LUInstanceCreate: Release unused node locks
    htools: rework message display construction
    hbal: handle empty node groups
    Document OpNodeMigrate's result for RAPI
    Ensure unused ports return to the free port pool...
0c1441eb 11/18/2011 12:41 pm Michael Hanselmann

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    htools: rework message display construction
    hbal: handle empty node groups
    Document OpNodeMigrate's result for RAPI
    Fail if node/group evacuation can't evacuate instances
    LUInstanceRename: Compare name with name...
05c2e624 11/18/2011 12:05 pm Michael Hanselmann

Merge branch 'devel-2.4' into devel-2.5

  • devel-2.4:
    Ensure unused ports return to the free port pool
    Re-wrap a paragraph to eliminate a sphinx warning

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

754cc530 11/17/2011 05:24 pm Agata Murawska

Backwards compatibity - added admin_up to query

Signed-off-by: Agata Murawska <>
Reviewed-by: Michael Hanselmann <>

d29036c1 11/17/2011 03:49 pm Iustin Pop

Warn if we enable maintain-node-health without confd

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

aa224134 11/17/2011 03:49 pm Iustin Pop

Adapt watcher for ENABLE_CONFD

If confd is disabled, do not automatically restart it. Furthermore, we
can't run maintenance actions if it is disabled so log a warning.

Note that I haven't completely disabled the NodeMaintenance class with
ENABLE_CONFD = False because I think they are at two different levels...

cd8b0072 11/17/2011 03:49 pm Iustin Pop

Add toggle for enabling/disabling confd

Doesn't do anything yet.

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

e8a701f6 11/17/2011 03:39 pm Michael Hanselmann

masterd: Don't pass mainloop to server class

It is not used.

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

27caa993 11/17/2011 03:39 pm Michael Hanselmann

workerpool: Allow processing of new tasks to be stopped

This is different from “Quiesce” in the sense that this function just
changes an internal flag and doesn't wait for the queue to be empty.
Tasks already being processed continue normally, but no new tasks will...

2db05c94 11/17/2011 03:39 pm Michael Hanselmann

workerpool: Use loop to ignore spurious notifications

This saves us from returning to the worker code when there is no
task to be processed.

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

c8d0be94 11/17/2011 03:39 pm Michael Hanselmann

jqueue: Factorize code checking for drained queue

This is in preparation for a clean(er) shutdown of masterd.

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

ac2c8bc0 11/17/2011 03:31 pm Michael Hanselmann

LUInstanceCreate: Release unused node locks

After iallocator ran we can release any unused node locks. Since they
must be in exclusive mode this should improve parallelization during
instance creation.

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

69f0340a 11/17/2011 01:04 pm Michael Hanselmann

cmdlib.TLReplaceDisks: Use itertools.count

… instead of a variable which needs to be incremented for every step.

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

57de31c0 11/16/2011 03:15 pm Agata Murawska

Transition into and out of offline instance state

Signed-off-by: Agata Murawska <>
Reviewed-by: Iustin Pop <>

2e04d454 11/16/2011 03:15 pm Agata Murawska

Introduce admin_state as 3-values data type

Signed-off-by: Agata Murawska <>
Reviewed-by: Iustin Pop <>

9ca8a7c5 11/16/2011 03:15 pm Agata Murawska

Rename admin_up to admin_state

Signed-off-by: Agata Murawska <>
Reviewed-by: Iustin Pop <>

34598551 11/16/2011 03:15 pm Agata Murawska

Fixed typo in _VerifyResultRow

Signed-off-by: Agata Murawska <>
Reviewed-by: Iustin Pop <>

9c709b31 11/16/2011 10:41 am René Nussbaumer

algo: Make a dict from an flat list

This is in preparation to take deeper dict constructs from the command
line. You can feed the optionslist directly constructed of type
"identkeyval" to it and it returns a fully deflated dict.

This is mainly needed for the resource model changes where we have to...

ee2b99e3 11/15/2011 03:50 pm Michael Hanselmann

locking: Make some aliased methods public

Some methods, such as “_is_owned” and “list_owned”, have been aliased to
make them public for a while now. This patch makes the actual
implementation public.

SharedLock's “is_owned” needs to be aliased to “_is_owned” to remain...

63e6a7f6 11/15/2011 03:00 pm Michael Hanselmann

cmdlib._ReleaseLock: Do nothing if no locks are owned

The locking library doesn't like it when “release()” is called on
a lockset or lock which isn't held by the current thread. Instead
of modifying the library, which could have other side-effects,
this rather simple change avoids errors when a LU simply tries to...

4d4eae2a 11/15/2011 11:52 am Michael Hanselmann

Use resource lock when setting node parameters

Also acquire instance and resource locks in shared mode (see comment).

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

42828156 11/15/2011 11:52 am Michael Hanselmann

Use node resource lock for replacing instance disks

If early-release is not used, the resource lock is kept while waiting
for disks to sync.

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

63742d78 11/15/2011 11:52 am Michael Hanselmann

Hold node resource locks while setting instance parameters

Important for when disks are converted. Release locks once they're not
needed anymore. Make liberal use of assertions.

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

c57add7e 11/15/2011 11:52 am Michael Hanselmann

Hold node resource lock while moving instance

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

d3986702 11/15/2011 11:51 am Michael Hanselmann

Acquire node resource lock when removing instance

Removing an instance affects available disk space and memory.

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

6a752efc 11/15/2011 11:51 am Michael Hanselmann

Use node resource lock when recreating instance disks

Recreating disks conflicts with other disk operations, therefore the
node resource lock must be acquired.

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

a4e588b7 11/15/2011 11:51 am Michael Hanselmann

LUClusterRepairDiskSizes: Use node resource locks

Since this doesn't really touch the node, but it conflicts with e.g.
growing a disk, the resource lock must be acquired.

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

0c3c965a 11/15/2011 11:51 am Michael Hanselmann

LUInstanceGrowDisk: Use node resource lock

Also add one more feedback line. Downgrade instance lock to shared mode
while we're only waiting for disks to sync. The node lock is released
when not needed anymore.

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

eaee9e3b 11/15/2011 11:51 am Michael Hanselmann

LUInstanceCreate: Hold node resource lock

The node resource lock is released once the disks are in sync (that is,
after wiping).

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

d9d9e0d9 11/15/2011 11:19 am Michael Hanselmann

LUNodeQueryvols: Acquire all locks in shared mode

Nothing is being written to.

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

efcb184e 11/15/2011 11:19 am Michael Hanselmann

LUNodeQueryStorage: Acquire all locks in shared mode

Nothing is written to.

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

aefb66c0 11/15/2011 11:19 am Michael Hanselmann

cmdlib: Share lock in LUInstanceConsole

No writes are being done.

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

65c9591c 11/15/2011 08:13 am Michael Hanselmann

Document OpNodeMigrate's result for RAPI

- Commit b7a1c8161 changed the LU to generate jobs
- Mention documented results in NEWS

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

d1ad741e 11/15/2011 08:13 am Michael Hanselmann

LUNodeQuery: Call implementation's DeclareLocks function

Just in case we ever add locks for querying nodes. Currently
_NodeQuery's DeclareLocks is a no-op function.

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

702eff21 11/14/2011 05:18 pm Andrea Spadaccini

Use master IP address setup script in backend

Replace the code in backend.ActivateMasterIp and
backend.DeactivateMasterIp with the master IP address setup script,
either the default one or the one provided by the user.

- Convert to string the netmask parameter in _BuildMasterIpEnv...

57c7bc57 11/14/2011 05:18 pm Andrea Spadaccini

Change master IP address RPCs for external script

Change the master IP address RPC call chain to accept the
use_external_master_ip_script parameter. Introduces an unused parameter
in backend.ActivateMasterIp and backend.DeactivateMasterIp, that will be
used in the next commit....

17b0b812 11/14/2011 05:18 pm Andrea Spadaccini

Update cluster verify to check IP address scripts

Update cluster-verify to check the integrity of the default master IP
address setup script and the presence and executability of the external
one (if currently in use by the cluster).

Signed-off-by: Andrea Spadaccini <>...

bf689b7a 11/14/2011 05:18 pm Andrea Spadaccini

Add --use-external-mip-script flag

- add a command line flag to gnt-cluster init and modify to change the
value of the cluster parameter use_external_mip_script;
- add two constants representing the paths of the default script and of
the external script;...

33be7576 11/14/2011 05:17 pm Andrea Spadaccini

Add use_external_mip_script cluster parameter

Add the use_external_mip_script cluster parameter, that represents
whether the master IP address turnup/turndown procedures must use a
script provided by the user (True) or the one provided by Ganeti
(False)....

f396ad8c 11/14/2011 11:03 am Vangelis Koukis

Ensure unused ports return to the free port pool

Ensure ports previously allocated by calling ConfigWriter's AllocatePort() are
returned to the pool of free ports when no longer needed:

  • Return the network_port of an instance when it is removed
  • Return the port used by a DRBD-based disk when it is removed...
1dd64393 11/10/2011 03:50 pm Guido Trotter

Fix newer pylint's E0611 error in compat.py

These are triggered by our "stay-compatible" approach.

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

5b49ed09 11/10/2011 12:23 pm René Nussbaumer

Adding basic elements for the new node params

This patch adds the new fields to the objects.py as well as defines the
constants used in the dicts and their type.

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

82cce526 11/08/2011 07:31 pm Michael Hanselmann

rpc: Fix another result processor

I forgot to change this in commit d9da5065c0.

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

f68cc544 11/08/2011 05:44 pm Michael Hanselmann

rpc: Fix issue with “test_delay”'s timeout

I passed the timeout calculation function in the wrong field of the
definition. A small change is also needed in “build-rpc” to not abort
when writing the docstring.

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

d9da5065 11/08/2011 05:44 pm Michael Hanselmann

rpc: Call result processor once for each node result

… instead of calling it with the whole results dictionary. This
fixes an issue when replacing disks (and all other cases where
result processors are used).

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

d755483c 11/08/2011 04:06 pm Michael Hanselmann

Fail if node/group evacuation can't evacuate instances

If an instance can't be evacuated, only a message would be printed. With
this change the operation always aborts. Newly added unittests check for
this behaviour.

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

cc19798f 11/07/2011 07:32 pm Michael Hanselmann

LUNodeSetParams: Lock affected instances only

Until now LUNodeSetParams would lock all instances if a node's
secondary IP address was to be changed and would then release
all instances it didn't actually need. With this patch the LU
optimistically locks instances and, once it got the locks,...

212a7fcd 11/07/2011 07:32 pm Michael Hanselmann

Check BGL when adding/removing node

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

f7d9b3aa 11/07/2011 07:15 pm Michael Hanselmann

RPC/test_delay: Use callable for timeout calculation

This avoids having to override the function in the RPC runner.

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

26d502d0 11/07/2011 07:15 pm Michael Hanselmann

rpc: Move post-processor functions into definitions file

This way the generated code no longer contains arbitrary code.
Post-processing functions are used by reference.

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

702abcf9 11/07/2011 07:14 pm Michael Hanselmann

rpc: Use definitions directly instead of via generated code

Until now “autotools/build-rpc” would read the definition of all RPCs
and write them to a new file, “lib/_generated_rpc.py” with some
modifications. With this patch the generated code loads the definitions...

a09f9847 11/07/2011 07:01 pm Michael Hanselmann

Convert RPC definitions to dictionaries

This is in preparation to reducing the amount of generated code.

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

320e34df 11/07/2011 07:01 pm Michael Hanselmann

query: Use new SequenceToDict utility

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

9e6014b9 11/07/2011 04:32 pm Andrea Spadaccini

Improve error handling in netmask change

- check if the master IP with the old netmask is up before attempting to
change the netmask (to avoid a failed change netmask resulting in an
undesired activation of the master IP);
- improve error messages of the backend function;...

0007f3ab 11/04/2011 06:07 pm Andrea Spadaccini

Add master_netmask to Cluster.UpgradeConfig

And also suppress pylint R0902 error about an object instance having
more than 20 attributes.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Guido Trotter <>

186c03b3 11/04/2011 04:22 pm Andrea Spadaccini

Fix cluster start failure due to missing netmask

If the cluster version is upgraded from a version before commit
5a8648eb609f7e3a8d7ad7f82e93cfdd467a8fb5 to a version after that commit,
the master startup will fail because the ssconf file with the master...

fb2865ae 11/04/2011 11:19 am Michael Hanselmann

LUInstanceRename: Compare name with name

… instead of object with name.

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

6d0accae 11/04/2011 08:09 am Michael Hanselmann

utils.algo: Add utility to convert sequence to dictionary

Useful for converting list of query fields to a dictionary and to
convert RPC definitions. Includes duplicate detection.

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

52808305 11/04/2011 08:09 am Michael Hanselmann

rpc: Make “test_delay” RPC actually work

Until now it would just call itself, eventually failing.

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

cdde200a 11/04/2011 08:08 am Michael Hanselmann

LUClusterRepairDiskSizes: Acquire instance locks in exclusive mode

Instances are modified if their disk size doesn't match.

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

1986b21f 11/03/2011 06:39 pm Michael Hanselmann

cmdlib: Allow specifying lock level when calculating node locks

This is needed to lock node resources.

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

b2acdbdc 11/03/2011 06:30 pm Michael Hanselmann

Show RPC calls from config in lock monitor

With this patch all RPC calls at runtime of masterd will show up in the
lock monitor. There is a chicken-and-egg issue with initializing the
configuration with a context since the lock manager, containing the
monitor, requires the configuration. This is worked around by setting...

eb5ac108 11/03/2011 06:23 pm Michael Hanselmann

Update synopsis for “gnt-cluster repair-disk-sizes”

Mention that instances can be passed on the CLI when “--help” is used.

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

3ccd3243 11/03/2011 04:39 pm Andrea Spadaccini

Derive IP hooks env variables from RPC parameter

Let the environment variables of the master IP turnup/turndown be
derived from the parameter of the RPC itself (that is of type
objects.MasterNetworkParameters in both cases).

Signed-off-by: Andrea Spadaccini <>...

c79198a0 11/03/2011 04:39 pm Andrea Spadaccini

Pass MasterNetworkParameters instances in RPCs

Pass instances of objects.MasterNetworkParameters when calling RPCs for
activation and deactivation of master IP.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Guido Trotter <>

f9d20654 11/03/2011 04:39 pm Andrea Spadaccini

Use MasterNetworkParameters attributes for RPC

Instead of manually unpacking the return values of
cfg.GetMasterNetworkParameters, let it return an instance of
objects.MasterNetworkParameters and pass its attributes.

Signed-off-by: Andrea Spadaccini <>...

061af273 11/03/2011 04:39 pm Andrea Spadaccini

Add object representing the master network params

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Guido Trotter <>

91ae95fd 11/03/2011 04:39 pm Andrea Spadaccini

Uniform master IP activation and deactivation

Add the master IP family parameter to the master IP deactivation RPCs,
so that the activation and deactivation interfaces are uniform.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Guido Trotter <>

ef9fa5b9 11/02/2011 05:28 pm René Nussbaumer

Make it possible to pass in flags using ENV variables

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

d60946d9 11/02/2011 05:28 pm René Nussbaumer

utils.algo: Add a function to insert a list into a list

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

95a39a77 11/02/2011 03:36 pm Andrea Spadaccini

Fix overriding of ActivateMasterIp params

In the process of reworking the patches for master, I forgot to remove a
call to GetMasterInfo() that overrides the parameters passed via RPC.
This patch fixes this issue.

Signed-off-by: Andrea Spadaccini <>...

3a3e4f1e 11/02/2011 03:18 pm Andrea Spadaccini

Add netmask and IP version to master IP hooks env

Add the master netmask and master IP version parameters to the hooks and
document them. In this way, the hook environment building function can
be reused for the planned master IP turnup changes.

Signed-off-by: Andrea Spadaccini <>...

41e079ce 11/02/2011 03:03 pm Andrea Spadaccini

Explicitly pass params to change_master_netmask

Make the master explicitly pass the parameters to the
change_master_netmask RPC, and change all the call flow to use the new
interface.

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

96e0d5cc 11/02/2011 03:03 pm Andrea Spadaccini

Explicitly pass params to deactivate_master_ip

Make the master explicitly pass the parameters to the
deactivate_master_ip RPC, and change all the call flow to use the new
interface.

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

7c74bbe0 11/02/2011 03:03 pm Andrea Spadaccini

Change the semantics of stop_master RPC

To avoid polluting the stop_master RPC interface with network
parameters, this patch removes the deactivation of the master IP from
this RPC.

The call to deactivate_master_ip is then added before every stop_master...

8da2bd43 11/02/2011 03:03 pm Andrea Spadaccini

Explicitly pass params to activate_master_ip

To remove the usage of ssconf in the backend, the master needs to push
the parameters of activate_master_ip to the backend.

This patch changes the entire call path of activate_master_ip to use the
new interface....

5d7a899e 11/02/2011 02:54 pm Michael Hanselmann

locking: Make level names consistent, add check

- Change all lock level names to their singular form
- Add assertion checking consistency between level names and lockset
name

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

4e070776 11/02/2011 02:54 pm Michael Hanselmann

Add new lock level for node resource modifications

This is in preparation for implementing a new resource model.

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

fe5ca2bb 11/02/2011 12:46 pm Andrea Spadaccini

Move hooks PATH environment variable to constants

Move the contents of the PATH environment variable for hooks to
constants, and use its value in the code and in the hooks documentation.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Guido Trotter <>

2a6de57a 11/01/2011 09:21 pm Andrea Spadaccini

Check the results of master IP RPCs

A failed gnt-cluster (de)activate-master-ip would not produce any output
to the user. This patch adds code that checks for the results of the
RPCs and raise an exception if appropriate.

Signed-off-by: Andrea Spadaccini <>...

28aedbc1 11/01/2011 09:09 pm Andrea Spadaccini

Add master IP turnup and turndown hooks

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

20d38e8a 11/01/2011 09:09 pm Andrea Spadaccini

Add RunLocalHooks decorator

Add the RunLocalHooks decorator, that allows the execution of hooks
locally. Also, add a RunLocalHooks method to HooksRunner, to adapt the
signature of HooksRunner.RunHooks to the one expected by HooksMaster,
and also to check that the hooks are being executed locally....

da124e89 11/01/2011 09:07 pm Andrea Spadaccini

Generalize HooksMaster

- remove any dependence on Logical Units from the HooksMaster;
- add a new function parameter to the constructor, a function that is
expected to convert the results of the hooks execution in a format
understood by the HooksMaster;...

2d88fdd3 11/01/2011 08:37 pm Andrea Spadaccini

Add master IP turnup and turndown hooks

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

0fa481f5 11/01/2011 08:37 pm Andrea Spadaccini

Add RunLocalHooks decorator

Add the RunLocalHooks decorator, that allows the execution of hooks
locally. Also, add a RunLocalHooks method to HooksRunner, to adapt the
signature of HooksRunner.RunHooks to the one expected by HooksMaster,
and also to check that the hooks are being executed locally....

949dcb1d 11/01/2011 08:37 pm Andrea Spadaccini

Generalize HooksMaster

- remove any dependence on Logical Units from the HooksMaster;
- add a new function parameter to the constructor, a function that is
expected to convert the results of the hooks execution in a format
understood by the HooksMaster;...

8e709b21 11/01/2011 06:01 pm Michael Hanselmann

RAPI: Fix issue when replacing disks

This is another fallout from a suboptimal merge.

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

cd40dc53 11/01/2011 05:17 pm Michael Hanselmann

rpc: Improve argument definitions

Instead of in-place code now each argument has an (optional) kind
assigned. The RPC client will then take care of encoding each argument
according to its definition. A new base (_RpcClientBase) is added to
take care of encoding and dispatching calls....

b8c160c1 11/01/2011 05:17 pm Michael Hanselmann

rpc: Change {import,export}_start to take source/dest in single argument

This simplifies the RPC argument encoding code.

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

6648cb36 11/01/2011 05:17 pm Michael Hanselmann

Rename lib/build/rpc_definitions.py to lib/rpc_defs.py

It will also be used at runtime, not just for building.

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

7dcf333d 10/31/2011 05:54 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5:
    Fix wrong headers and licences
    Update NEWS and increase to 2.4.5
    Fix parameters of RpcResult in hooks unit tests
    Fix a too long line.
    Move RenameFile to the new functions
    ensure_dirs: Move some useful functions into utils....
e3ac8406 10/28/2011 05:34 pm Andrea Spadaccini

Add missing get_migration_status RPC definition

Add the instance_get_migration_status RPC definition and the needed
helper.

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

7e5a72a0 10/28/2011 05:34 pm Michael Hanselmann

cmdlib: Fix issue when marking node as online

When a node is marked as online (“gnt-node modify -O no …”), an RPC is
made to the node to check whether the node daemon is running. My recent
RPC changes led to offline nodes being ignored before the actual call is...