Statistics
| Branch: | Tag: | Revision:

root / lib / rpc_defs.py @ 2650ea6b

History | View | Annotate | Download (25.1 kB)

# Date Author Comment
235a6b29 07/02/2013 04:54 pm Thomas Thrainer

Check DRBD status on verify-disks

Enhance `gnt-cluster verify-disks` such that it checks the DRBD status
of all disks. If the status of at least one disk of an instance is
either StandAlone or Diskless, the instance disks are activated
automatically.

Signed-off-by: Thomas Thrainer <>...

da803ff1 07/02/2013 12:47 pm Helga Velroyen

Extend RPC call 'node_info' by storage parameters

This patch extends the actual RPC call to accept storage
parameters with each storage units. It adjusts all code
which performs this code by integrating the 'exclusive
storage' flag into the lvm storage unit....

e43a624e 06/28/2013 03:37 pm Bernardo Dal Seno

Add exclusive_storage to blockdev_grow RPC

The flag is passed to the RPC, but it's still ignored by noded.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Klaus Aehlig <>

1c3231aa 06/13/2013 12:32 pm Thomas Thrainer

Index nodes by their UUID

No longer index nodes by their name but by their UUID in the cluster
config. This change changes large parts of the code, as the following
adjustments were necessary: * Change the index key to UUID in the configuration and the
ConfigWriter, including all methods....

bc0a2284 06/13/2013 10:32 am Helga Velroyen

Add cluster name to instance migration RPC

This fixes a 'FIXME' in the xen hypervisor. The instance
migration requires the cluster's name. This should come
from the RPC call, but so far was hackishly taken from
ssconf. Ssconf is intended to be used by scripts only and...

8ef418bb 06/12/2013 10:18 am Helga Velroyen

Remove XEN_CMD from constants, adjust to PowercycleNode

This patch extend the RPC to powercycle a node by a
hvparams parameter. This parameter is used by the
xen hypervisor to determine which xen command to use.
The respective LU is adjusted as well.

Since this was the last operation depending on the...

0200a1af 06/12/2013 10:18 am Helga Velroyen

Use hvparams in GetAllInstancesInfo

This patch extends the GetAllInstancesInfo method of the
hypervisors by a hvparams parameter. This change propagates
up to the RPC call all_instances_info, which also needed
to be extended. All callers of this call were adjusted...

0bbec3af 06/12/2013 10:18 am Helga Velroyen

Use hvparams in GetInstanceInfo

This patch extends the GetInstanceInfo function of the
hypervisors by an hvparams parameters. This leads to
an extension of the instance_info RPC call and the
adjustmend of all classes using this call.

Signed-off-by: Helga Velroyen <>...

030ab01a 06/12/2013 10:18 am Helga Velroyen

Add hvparams to RPC call 'node_info'

This patch adds the hvparams parameter to the RPC call
'node_info'. It also adjusts the related code in noded.py
and Query/Node.hs

Signed-off-by: Helga Velroyen <>
Reviewed-by: Thomas Thrainer <>

5b0dfcef 06/12/2013 10:17 am Helga Velroyen

Verify: node info and instance list

This patch enhances node verification by:
- Factoring out the verification of the node info
and the instance list to increase testability.
- Make both of them use the hvparams parameter.

Signed-off-by: Helga Velroyen <>...

8ac806e6 06/12/2013 10:17 am Helga Velroyen

rpc / noded: add hvparams to instance_list call

The 'instance_list' call needs to be extended to accept
hvparams. This is one of the few RPCs where it is
necessary, because there is no instance given whose
hvparams could be reused.

Signed-off-by: Helga Velroyen <>...

6ef8077e 05/28/2013 12:45 pm Bernardo Dal Seno

New RPC to get size and spindles of disks

This RPC replaces the existing one that only returned disk size.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

4b92e992 05/21/2013 03:13 pm Helga Velroyen

RPC 'node_info': <storage_type,key> instead of vg_names

This replaces the field 'vg_names' in the RPC call of 'node info' by
'storage_units'. A storage unit is a tuple <storage_type,key>
and a generalization of a vg_name. The list of vg names is replaced by...

1fa6fcba 04/24/2013 02:44 pm Michele Tartara

Reason trail implementation for "start"

Opcode-specific implementation of the reason trail for the instance
startup operation.

Signed-off-by: Michele Tartara <>
Reviewed-by: Guido Trotter <>

1f350e0f 04/24/2013 02:44 pm Michele Tartara

Reason trail implementation for "shutdown"

Opcode-specific implementation of the reason trail for the instance shutdown
operation.

Signed-off-by: Michele Tartara <>
Reviewed-by: Guido Trotter <>

55cec070 04/22/2013 02:19 pm Michele Tartara

Reason trail implementation for instance reboot

This commits allows ganeti to correctly forward the reason trail information
regarding instance reboot.

Signed-off-by: Michele Tartara <>
Reviewed-by: Helga Velroyen <>

aa922d64 04/22/2013 02:10 pm Michele Tartara

Remove old "reason" implementation

Remove the useless parts of the old, partial, implementation of the support for
tracking the reason of instances state change, before implementing the new
reason trail support, as per the design document.

Signed-off-by: Michele Tartara <>...

4a90bd4f 02/19/2013 04:27 pm Michele Tartara

Status change reason support for Reboot

Add support to the Reboot command for specifying the reason for the last
status change.

Some features are implemented as functions, even if used only once, because
they will be used by the future patches introducing reason support for all...

14fe92c7 01/16/2013 07:09 pm Bernardo Dal Seno

New RPC call for node verify in dns-only RPC client

This will be used in node-add.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Michael Hanselmann <>

b954f097 12/22/2012 11:47 am Constantinos Venetsanopoulos

Add the gnt-storage client

Add a new client called 'gnt-storage'.
The client interacts with the ExtStorage interface, similarly to
the way gnt-os interacts with the OS interface.

For now, only two commands are supported: 'info' and 'diagnose'.

'diagnose' calculates the node status of each provider on each node,...

1a3c5d4e 12/21/2012 06:45 pm Bernardo Dal Seno

Add exclusive_storage parameter to node_info RPC

The flag is passed to the low-level functions that need it, but it's not
yet used. Also, RPCs get just a default value for now.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Iustin Pop <>

ee1478e5 12/21/2012 01:40 pm Bernardo Dal Seno

Add exclusive_storage parameter to blockdev_create RPC

The flag is passed to the low-level functions that need it, but it's not
yet used.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Iustin Pop <>

ec5af888 12/13/2012 01:29 pm Michael Hanselmann

Read watcher pause using RPC, not directly

The master daemon should not directly read files written by the node
daemon. This patch adds a new RPC to read the watcher pause file and
changes the master code to use it.

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

99e222b1 12/13/2012 01:29 pm Michael Hanselmann

Add RPC for setting watcher pause

The watcher pause file should be set/unset on all nodes at once, not
only the master node. For that a new RPC is needed.

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

be6c403e 12/11/2012 03:37 pm Michael Hanselmann

Replicate queue drain flag across all master candidates

Until now, the flag was unset on a master failover unless the
“$localstatedir/lib/ganeti/queue/drain” file existed.

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

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