Statistics
| Branch: | Tag: | Revision:

root / lib / server @ 415feb2e

# Date Author Comment
ebe466d8 01/17/2012 03:01 pm Guido Trotter

Add instance_balloon_memory rpc

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

7530364d 01/17/2012 12:08 pm Iustin Pop

Accept both PUT and POST in noded

Currently, noded requires PUT, even though the semantics of the RPC
calls do not match a PUT. We change the code accept both PUT and POST,
with the intention to remove the PUT support in a later version.

On the client side, the RPC code is changed to send POST requests....

d5ea30e8 01/06/2012 01:34 pm Michael Hanselmann

rpc: Change signature of RpcRunner

Instead of receiving the whole masterd context, it only gets the
configuration and the lock monitor callback. This simplifies
unittesting.

Additionaly, two new arguments for testing are added.

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

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

a182a3ed 12/21/2011 04:55 pm Michael Hanselmann

serializer: Remove JSON indentation and dict key sorting

Serializing to JSON using “simplejson” is significantly slower when
indentation and/or sorting of dictionary keys is used. In simplejson 1.x
the difference isn't that big, but with simplejson 2.x the difference...

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

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

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

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

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

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

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

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

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

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

415a7304 10/26/2011 11:53 am Michael Hanselmann

rpc: Convert last two calls to generated code

These two calls, “upload_file” and “write_ssconf_files” are treated
separated as they're used by the configuration, where we can't use the
normal resolver.

There's still some duplicated code in rpc.py, but that will be taken...

db04ce5d 10/26/2011 11:53 am Michael Hanselmann

Move bootstrap-related RPC to generated wrappers

With this patch, only 6 RPC are left as old-style code.

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

fb1ffbca 10/26/2011 11:53 am Michael Hanselmann

Convert job queue's RPC to generated code

With these changes job queue RPC will finally show up on the lock
monitor. See below for an example. A job queue-specific class is used to
restrict the use of a static list for name resolution to the job queue.
Further improvements can be made to not re-create the whole RPC client...

e437117f 10/26/2011 11:53 am Michael Hanselmann

rpc: Convert blockdev-related calls

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

8a31717c 10/24/2011 08:02 pm Michael Hanselmann

Fix parameters to RPC "blockdev_rename"

Before this patch it would take a variable number of arguments, which
isn't very good for a definition-based approach.

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

ee8fd7b7 10/24/2011 03:50 pm Michael Hanselmann

Remove “node_tcp_ping” RPC

It is not used anywhere.

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

a629ecb9 10/12/2011 02:01 pm Iustin Pop

Standardise LUXI call argument types

Currently, we have 4 types of arguments in LUXI calls:

- most common, a list of values
- a single argument that is sent as a list of one element
- a single argument that is sent by itself
- a dictionary (only Query and QueryFields)...

2e5c33db 10/12/2011 02:01 pm Iustin Pop

Rename filter and filter_ to qfilter

We currently use 'filter' as the OpCode, QueryRequest and RAPI field
name for representing a query filter. However, since 'filter' is a
built-in function, we actually have to use filter_ throughout the code
in order to not override the built-in function....

5a8648eb 10/05/2011 12:05 pm Andrea Spadaccini

Add cluster netmask parameter

Add the master_netmask cluster parameter, that represents the netmask of
the master IP, encoded as a CIDR suffix.

This parameter can be set via the --master-netmask of gnt-cluster init
and gnt-cluster modify. The default behaviour is to be consistent with...

fb460cf7 09/30/2011 02:05 pm Andrea Spadaccini

Split starting and stopping master IP and daemons

lib/backend.py
  • split StartMaster() in ActivateMasterIp() and StartMasterDaemons()
  • split StopMaster() in DeactivateMasterIp() and StopMasterDaemons()
lib/server/noded.py, lib/rpc.py
  • adapt the call chains to the new functions, define new RPCs...
6a1434d7 09/29/2011 12:41 pm Andrea Spadaccini

Make migration RPC non-blocking

To add status reporting for the KVM migration, the instance_migrate RPC
must be non-blocking. Moreover, there must be a way to represent the
migration status and a way to fetch it.

  • constants.py:
    - add constants representing the migration statuses...
87b3cb26 09/27/2011 02:47 pm Michael Hanselmann

Keep only one global RPC runner in Ganeti context

Instead of having one RPC runner per mcpu processor this will keep only
one instance as part of the masterd-wide Ganeti context. Upcoming
patches will change the RPC runner to report pending requests to the...

b459a848 08/30/2011 11:24 am Andrea Spadaccini

DeprecationWarning fixes for pylint

In version 0.21, pylint unified all the disable-* (and enable-*)
directives to disable (resp. enable). This leads to a lot of
DeprecationWarning being emitted even if one uses the recommended
version of pylint (0.21.1, as stated in devnotes.rst)....

e687ec01 08/25/2011 01:53 pm Michael Hanselmann

PEP8 style fixes

Identified using the “pep8” utility.

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

6613661a 08/03/2011 05:42 pm Iustin Pop

Instance transfer: export component name to backend

This modifies the RPC layer to export the component name too to the
backend, so that it can be used in log files and messages.

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

323f9095 07/08/2011 03:15 pm Stephen Shirley

Add gnt-instance start --pause

Creates the instance, but pauses execution before booting. This combined
with 'gnt-instance console' unpausing instances means that the entire
boot process can be viewed and monitored.

Signed-off-by: Stephen Shirley <>...

6aac5aef 05/20/2011 11:11 am Iustin Pop

Merge remote branch 'origin/devel-2.4'

  • origin/devel-2.4:
    Fix errors in hooks documentation
    Clarify a bit the noded man page
    Note --no-remember in NEWS
    Switch QA over to using instance stop --no-remember
    Implement no_remember at RAPI level
    Implement no_remember at CLI level...
f01738fc 05/12/2011 03:40 pm Iustin Pop

Preload the string-escape code in noded

This encoding, part of the standard Python installation, is used by
the pickle module (in turn used by subprocess when handling
failures in program execution). Preloading it means that Python will
cache it in memory so that even if the disk goes away or just the...

a59faf4b 05/10/2011 05:37 pm Iustin Pop

Implement grow dry-run at RPC level

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

580c971e 04/29/2011 03:38 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4: (24 commits)
    mlock: fail gracefully if libc.so.6 cannot be loaded
    Allow creating the DRBD metadev in a different VG
    Make _GenerateDRBD8Branch accept different VG names
    Fix WriteFile with unicode data
    Replace disks: keep the meta device in the same VG...
675e2bf5 04/19/2011 07:41 pm Iustin Pop

Fix master IP activation in failover with no-voting

Thanks to for reporting this. The logic in
masterd.CheckMasterd did an early return in case of no_voting, hence
skipping the master IP activation. We just change the ifs to not
return but simply continue through the function....

c1391810 03/15/2011 03:04 pm Michael Hanselmann

masterd: Simplify code for field queries

Instead of going via cmdlib and using special cases for different
resources, the list of fields is used directly.

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

abd66bf8 03/15/2011 03:04 pm Michael Hanselmann

constants: Rename QR_OP_*, add QR_VIA_RAPI

Commit 28b71a76 added a list of resources which can be queried using
LUXI. Unfortunately the variable was named “QR_OP_LUXI”, which can be
confusing. This patch renames “QR_OP_QUERY” to “QR_VIA_OP”, “QR_OP_LUXI”...

2be7273c 03/08/2011 02:00 pm Apollon Oikonomopoulos

Add bdev_sizes RPC call

The bdev_sizes multi-node RPC call returns the sizes of the requested
block devices on the desired nodes. Its intended use is to verify the
existence of a block device on a given node for shared block storage
support.

Block device paths are expected to lie under constants.BLOCKDEV_DIR...

c417e115 01/28/2011 06:44 pm Iustin Pop

Re-create instance disk symlinks on activate

This patch implements recreation of instance disk symlinks when the
activate-disks operation is run. Until now, it was not possible to
re-create these symlinks without stopping and starting or migrating an
instance as the RPC call where this is done was in instance startup...

c6afb1ca 01/18/2011 01:47 pm Iustin Pop

Rename OpGetTags and LUGetTags

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

2237687b 01/18/2011 01:47 pm Iustin Pop

Rename OpQueryNodes and LUQueryNodes

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

f2af0bec 01/18/2011 01:47 pm Iustin Pop

Rename OpQueryInstances and LUQueryInstances

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

d4d654bd 01/18/2011 01:47 pm Iustin Pop

Rename OpQueryGroups and LUQueryGroups

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

7ca2d4d8 01/18/2011 01:47 pm Iustin Pop

Rename OpQueryExports and LUQueryExports

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

2f093ea0 01/18/2011 01:47 pm Iustin Pop

Rename OpQueryConfigValues and LUQueryConfigValues

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

a2f7ab92 01/18/2011 01:47 pm Iustin Pop

Rename OpQueryClusterInfo and LUQueryClusterInfo

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

9c007da8 01/11/2011 02:44 pm René Nussbaumer

Add RPC calls for pause/resume sync of devices

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

24d16f76 01/06/2011 12:08 pm Michael Hanselmann

Convert “gnt-debug locks” to query2

Locks can now be queried using “Query(what="lock", …)” over LUXI.

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

28b71a76 12/13/2010 05:19 pm Michael Hanselmann

LUXI: Add Query and QueryFields functions

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

1aa88d95 12/09/2010 05:03 pm René Nussbaumer

Ensure we just serialize JSON if there is data

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

819ca990 12/06/2010 02:59 pm Guido Trotter

locking: add nodegroup lock level

This also changes masterd to initialize the ganeti's manager with the
current list of nodegroup uuids, and updates unittests

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

a79ef2a5 12/01/2010 09:31 pm Adeodato Simo

Querying node groups: add luxi.REQ_QUERY_GROUPS

This also updates masterd.py.

Signed-off-by: Adeodato Simo <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

4f6014d4 12/01/2010 03:36 pm René Nussbaumer

Adding RPC infrastructure to call oob

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

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

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