Statistics
| Branch: | Tag: | Revision:

root / lib / rpc_defs.py @ 22381768

History | View | Annotate | Download (22.8 kB)

# Date Author Comment
cbe4a0a5 11/20/2012 07:51 pm Dimitris Aragiorgis

Pass netinfo in rpcs

If a nic has a network field then encapsulate a network object in
netinfo slot for every rpc. This is needed to pass network info to
scripts managing nics (kvm-vif-bridge).

Introduce _BuildNetworkEnv().

Signed-off-by: Dimitris Aragiorgis <>...

db2203e0 11/19/2012 03:12 pm Michael Hanselmann

Add RPC for restricted commands

Expose the functionality to run restricted commands remotely via RPC.

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

48e175a2 10/19/2012 05:55 pm Iustin Pop

Update blockdev's "info" at instance rename

Currently, we set "info" metadata on block devices at device creation
time, but we never update it, leading to stale data in case of
instance renames. This would not be a big problem in case of regular
renames (assuming this is a rare operation), but importing instances...

6a74f584 10/11/2012 12:38 pm Michael Hanselmann

Merge branch 'devel-2.6'

  • devel-2.6:
    verify-disks: Explicitely state nothing has to be done
    Add list of design documents implemented in version 2.6
    Better list of replace-disks arguments + typos fixed
    jqueue: Look at archived jobs when watching
    Show old primary/secondary node on disk replacement...
5fce6a89 09/12/2012 02:39 pm Constantinos Venetsanopoulos

Annotate disk params on instance_start

We call _GatherAndLinkBlockDevs during the process, which in turn
calls _RecursiveFindBD. This needs disk parameters to work.

See also commit b8291e0.

This was reported by Ansgar and Damien.

Signed-off-by: Constantinos Venetsanopoulos <>...

2ff587d4 08/28/2012 12:56 pm Agata Murawska

Move necessary constants from rpc & rpc_defs to constants

As timeout constants will now be used also on Haskell side, they have
been moved from rpc_defs and rpc to constants. The same is true for
connection timeout for connecting to nodes.

Signed-off-by: Agata Murawska <>...

5ae4945a 08/23/2012 02:41 pm Iustin Pop

Bump pep8 version to 1.2

Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's:

- bump version in the docs
- silence some new checks that are wrong due to our indent=2 instead of 4
- fix lots of errors in the code where the indentation was wrong by 1...

112aee5f 07/13/2012 06:00 pm Iustin Pop

Merge branch 'stable-2.6'

  • stable-2.6: (72 commits)
    Make Ganeti 2.6.0 rc3 release
    Allow reinstall even when secondaries are offline
    Prepare NEWS file for Ganeti 2.6.0 rc3
    QA updated to test instance removing when sec. is offline
    Ignore offline node errors when removing disks...
cad0723b 07/05/2012 03:20 pm Iustin Pop

Fix DRBD resize code

There are two bugs in the current resize code, affecting mostly DRBD.

First, due to bugs in old DRBD versions (pre 8.0.14), the code currently
calls `drbdsetup resize' on both the primary or secondary. However,
this is actually wrong per current DRBD (from drbdsetup(8)):...

b8291e00 06/28/2012 11:04 am René Nussbaumer

Annotate disk params on instance_os_add

We call _OpenRealBD during the process and this needs disk parameters to
work. This was reported by Constantinos.

The fix is very ugly though.

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

55de1d68 06/27/2012 11:03 am René Nussbaumer

Annotate disks upon blockdev_shutdown

Signed-off-by: René Nussbaumer <>
Reviewed-by: Agata Murawska <>

70817cee 06/27/2012 11:02 am René Nussbaumer

Annotate disk parameters on blockdev_getmirrorstatus

Not annotating them works for DRBD but not for RBD as reported by
Constantinos.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Agata Murawska <>

c7ea9827 05/10/2012 02:30 pm René Nussbaumer

rpc: Adapt the callbacks to the new encoder type

We change the cmdlib side on the next patch.

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

aedf5fd7 05/10/2012 02:30 pm René Nussbaumer

rpc: Adding new encoders for annotating disk parameters

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

bd6d1202 03/28/2012 12:27 pm René Nussbaumer

RPC: Add a new client type for DNS only

This patch moves the “call_version” to a new RPC client definition and
then adds a new runner using the DNS resolver for getting the host
address.

The standard “BootstrapRunner”, where the call was before, tries to...

ebe466d8 01/17/2012 03:01 pm Guido Trotter

Add instance_balloon_memory rpc

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

890ea4ce 01/05/2012 05:30 pm Michael Hanselmann

rpc._NodeConfigResolver: Support resolving offline nodes

This is needed to powercycle a node marked offline.

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

68a856ef 01/05/2012 05:30 pm Michael Hanselmann

rpc_defs: Enable “node_powercycle” for offline nodes

With this change it's possible to powercycle nodes marked as offline. Of
course the node might not be running the node daemon anymore.

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

dd6d2d09 01/05/2012 05:30 pm Michael Hanselmann

rpc: Add support for resolver options callback

This adds support for a callback returning name resolver options. This
is required for powercycling offline nodes. While it would be possible
to implement this using a separate RPC client class, doing so would...

60154921 12/21/2011 06:02 pm Iustin Pop

Extend RPC definition change with another parameter

This will be used in a later patch for parameter pre-processing. For
now we just add the parameter as 'None' and add a consistency check
for the parameter definitions.

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

5449685e 12/21/2011 06:02 pm Iustin Pop

Switch blockdev_getmirrorstatus_multi to per-node bodies

Even for a small 4-node node-group, this reduces the payload of this
RPC call by half for each node; for a big node group, previous testing
(using a different patch) showed a general reduction in traffic over...

78519c10 11/30/2011 12:26 pm Michael Hanselmann

Change “node_info” RPC to accept multiple VGs/hypervisors

Keeping the node state up to date will require information from multiple
VGs and hypervisors. Instead of requiring multiple calls this change
allows a single call to return all needed information. Existing users...

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

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

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

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

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

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

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

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

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

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