Statistics
| Branch: | Tag: | Revision:

root / lib / rpc.py @ 14850c5e

History | View | Annotate | Download (35.2 kB)

# Date Author Comment
168c1de2 03/15/2010 06:40 pm Michael Hanselmann

Rename SSL_CERT_FILE to NODED_CERT_FILE

To be consistent with RAPI_CERT_FILE, the rather generic named
“SSL_CERT_FILE” constant is renamed to “NODED_CERT_FILE”. The actual file
name is not changed.

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

4a0e011f 02/03/2010 07:04 pm Iustin Pop

Implement debug level across OS-related RPC calls

This doesn't implement the full functionality, we need to add the debug
level to the opcodes too, but at least won't require changing the RPC
calls during the 2.1 series.

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

7260cfbe 01/04/2010 11:15 am Iustin Pop

Add targeted pylint disables

This patch should have only:

- pylint disables
- docstring changes
- whitespace changes

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

d984846d 12/28/2009 02:05 pm Iustin Pop

Merge branch 'devel-2.0' into devel-2.1

  • devel-2.0:
    Fix indentation in hv_kvm
    Implement BuildHooksEnv for NoHooksLU
    Clarifiy some more wide pylint disables
    Fix two bugs in seldom-used codepaths
    Update pylintrc
    Add targetted pylint disables
    Partial cherry-pick of 6c881c5 from the 2.1 branch...
fe267188 12/28/2009 12:43 pm Iustin Pop

Add targetted pylint disables

This patch adds targeted pylint disables, where it makes sense (either
due to limitations in pylint or due to historical usage), and also a few
blanket ones in rapi where all the names are… “different”.

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

8d0a4f99 11/25/2009 01:08 pm Michael Hanselmann

Add check for OpenSSL entropy status

By checking for this explicitly, the errors (SSLEAY_RAND_BYTES, “PRNG
not seeded”) will happen in the start-up phase of the daemon and not
only when executing remote procedure calls.

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

045dd6d9 11/02/2009 04:14 pm Iustin Pop

Add ecode to rpc.py's RpcResult.Raise()

This patch adds a new ecode argument to RpcResult.Raise(). This allows
specifying the error code (for both OpExec and OpPrereq errors).

Note that this patch also makes the OpExecError exceptions raised from
_FindFaultInstanceDisks have the error code classification....

8f215968 10/30/2009 12:46 pm Michael Hanselmann

Make cluster initialization more reliable

There was a race condition between starting the node daemon
and sending requests to write the ssconf files. With this
patch, the initialization waits up to ten seconds for the
node daemon to become responsive.

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

b989b9d9 10/22/2009 04:40 pm Ken Wehr

Adding '--no-ssh-init' option to 'gnt-cluster init'.

Allows the initialization of a cluster without the creation or distribution
of SSH key pairs. Includes changes for LeaveCluster and RPC.

Signed-off-by: Ken Wehr <>
Signed-off-by: Guido Trotter <>...

1645d22d 10/21/2009 12:26 pm Michael Hanselmann

Ensure RpcResult has “payload” attribute

Also add assertions to avoid missing attributes in the future.
They won't be included in optimized bytecode.

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

17c3f802 10/13/2009 01:24 pm Guido Trotter

Add timeout options to other LUs

All the LUs that shut down the instance need to be able too pass the
timeout parameter as well.

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

6263189c 10/09/2009 06:28 pm Guido Trotter

Accept shutdown timeout from the user

Using the new --timeout option:

- gnt-instance shutdown is changed to accept a timeout
- the opcode is changed to hold one
- the LU is changed to optionally get one
- the rpc is changed to carry one
- the backend is changed to take it as a parameter rather than...

84e3f66f 10/05/2009 12:39 pm Guido Trotter

Fix rpc.call_os_get to actually return the OS

Since nobody ever read the actual OS object, this bug was introduced in
the rpc conversion.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

3cebe102 09/17/2009 06:53 pm Michael Hanselmann

Remove RpcResult.RemoteFailMsg completely

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

edb4b374 09/16/2009 07:13 pm Michael Hanselmann

Remove RpcResult.failed attribute

It's redundant with RpcResult.fail_msg. This change survived QA, burnin and
unittests.

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

fe89794e 09/14/2009 02:17 pm Michael Hanselmann

RpcResult: Fix cases where “failed” wouldn't be set to True

This broke “gnt-instance replace-disks --auto” when the instance
is down.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

858f3d18 08/24/2009 03:13 pm Iustin Pop

Add disk copy support at backend and the rpc level

This uses a simple 'dd if=… | ssh $target dd of=…' method, like the
ExportSnapshot (which uses the OS export; here we want full disk-level
copy and not any FS-level changes).

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

637b8d7e 08/17/2009 02:26 pm Michael Hanselmann

Add RPC call for storage operations

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

b142ef15 08/13/2009 02:41 pm Iustin Pop

Merge commit 'origin/next' into branch-2.1

  • commit 'origin/next': (28 commits)
    Fix a typo in InitCluster
    Ignore results from drained nodes in iallocator
    Ship the ethers hook
    Ethers hook, compatibility with old lockfile
    Remove a few unused imports from noded/masterd...
8486ffc0 08/07/2009 02:22 pm Guido Trotter

Merge branch 'master' into next

  • master:
    Update NEWS and version for 2.0.3 release
    devel/upload: revert rsync -p
    export: add meaningful exit code
    Fix detecting of errors in export
    Implement gnt-cluster check-disk-sizes
    rpc: add rpc call for getting disk size...
36145b12 08/05/2009 12:13 pm Michael Hanselmann

Use objects for blockdev_getmirrorstatus RPC call result

This patch changes the return type for backend.BlockdevGetmirrorstatus from
a list of tuples to a list of objects.BlockDevStatus instances.

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

96acbc09 08/05/2009 12:12 pm Michael Hanselmann

Use object for blockdev_find RPC call result

This patch changes the return type for backend.BlockdevFind to an object
(objects.BlockDevStatus). Before a tuple was used. Adding more values to
this tuple causes a lot of work. Converting the result to an object with...

968a7623 08/04/2009 05:35 pm Iustin Pop

rpc: add rpc call for getting disk size

Note that this exports the disk size as bdev returns it, in bytes. The
value will be converted to MiB in cmdlib.

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

8979196a 08/04/2009 12:44 pm Michael Hanselmann

Add RPC calls to modify storage fields

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

e337de97 07/29/2009 06:56 pm Michael Hanselmann

Add RPC calls for storage unit list

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

2503680f 07/29/2009 11:59 am Guido Trotter

Extend call_node_start_master rpc with no_voting

When the parameter is set to True and start_daemons is also True,
ganeti-masterd will be started with the new --no-voting --yes-do-it
options.

This new option is set to True only on masterfailover, when no_voting is...

cd50653c 07/24/2009 03:04 pm Guido Trotter

Change GetNodeDaemonPort to GetDaemonPort in utils

GetNodeDaemonPort is used to lookup the node daemon port in the services
file, and if not found to return the default one. We make it a generic
function, which accepts the daemon name in input, so that it can be used...

25f9901f 07/19/2009 07:47 pm Iustin Pop

Merge commit 'origin/next' into branch-2.1

Conflicts:
lib/cli.py: trivial extra empty line

6af6270a 07/19/2009 07:38 pm Iustin Pop

Fix a couple of epydoc warnings

It seems epydoc needs fully-qualified references, and doesn't deal with
relative ones (not even in the current module) if there are any
ambiguities.

There are other epydoc warnings, in the rapi docstrings, but those are
left as-is as they're removed in 2.1....

3583908a 07/08/2009 12:49 pm Guido Trotter

Extend call_node_start_master rpc with no_voting

When the parameter is set to True and start_daemons is also True,
ganeti-masterd will be started with the new --no-voting --yes-do-it
options.

This new option is set to True only on masterfailover, when no_voting is...

2f7140ba 07/08/2009 12:28 pm Guido Trotter

Merge branch 'next' into branch-2.1

  • next:
    Create a new --no-voting option for masterfailover
    ganeti-masterd: allow non-interactive --no-voting
    Fix pylint warnings
    Add custom pylintrc
    bootstrap: Don't leak file descriptor when generating SSL certificate...
7c4d6c7b 07/07/2009 03:54 pm Michael Hanselmann

Fix pylint warnings

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

5bbd3f7f 07/07/2009 03:51 pm Michael Hanselmann

Fix some typos

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

b2a6ccd4 06/29/2009 05:33 pm Iustin Pop

Rename the volume_list RPC call to lv_list

There are volume-related rpc calls. This patch renames the ‘volume_list’
call to ‘lv_list’ to make more clear its purpose.

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

af0413bb 06/16/2009 02:28 pm Guido Trotter

Merge branch 'next' into branch-2.1

  • next: (22 commits)
    Update NEWS and version for 2.0.1 release
    gnt-{instance,backup}(8) --nic is actually --net
    Fix a wrong function name in backend.DrbdAttachNet
    GNT-CLUSTER fix search-tags example
    Enable stripped LVs...
4c4e4e1e 06/15/2009 08:13 pm Iustin Pop

Simplify RPC call result check in cmdlib.py

Now that all results are the same, we can even more simplify the
handling in cmdlib more. Almost all if result.RemoteFailMsg()…
constructs are similar, and we resurect the RpcResult.Raise() function
to take a message argument, which it will process and raise an...

d3c8b360 06/15/2009 08:08 pm Iustin Pop

Pre-compute error status in RpcResult

Since now all RPCs have the new style result type, we can pre-compute
the error message at RpcResult() init time and not wait until it's
requested.

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

83d92ad8 06/15/2009 08:08 pm Iustin Pop

Convert os_diagnose rpc to new style result

This also removes custom post-processing from rpc.py; since this call
has only one user, it was simple to move it back to the caller.

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

070e998b 06/15/2009 08:08 pm Iustin Pop

Convert node_info rpc to new style result

This patch also does some cleanup and enforces valid results (with
proper type, i.e. int for memory/disk values) from remote node,
otherwise we handle the result as failure.

We do this so that we can remove custom processing in rpc.py which is...

3eccac06 06/15/2009 07:37 pm Iustin Pop

Convert export_info rpc to new style result

This also removes some code from ganeti-noded and rpc.py, which should
not do such processing of data (and be simply glue code). (Or
alternatively they could, if we had better infrastructure).

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

b848ce79 06/15/2009 01:52 pm Guido Trotter

rpc: fill in NIC parameters in instances

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

abe609b2 06/08/2009 07:58 pm Guido Trotter

Move FillDict at module level

This way it can be also used by scripts and other object types.

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

a97da6b7 06/03/2009 03:17 pm Iustin Pop

Fix two issues with exports and snapshot errors

This patch fixes two issues related to failed snapshots during exports:
- first, the error messages used disk.logical_id1, which is a node
name for DRBD, and it resulted in strange error messages like...

f5118ade 05/27/2009 01:19 pm Iustin Pop

Add a node powercycle command

This (somewhat big) patch adds support for remotely rebooting the nodes
via whatever support the hypervisor has for such a concept.

For KVM/fake (and containers in the future) this just uses sysrq plus a
‘reboot’ call if the sysrq method failed. For Xen, it first tries the...

622533d5 05/19/2009 04:43 pm Iustin Pop

Merge commit 'origin/next' into branch-2.1

  • commit 'origin/next': (25 commits)
    Move more hypervisor strings into constants
    Add -H/-B startup parameters to gnt-instance
    call_instance_start: add optional hv/be parameters
    Fix gnt-job list argument handling...
0eca8e0c 05/19/2009 11:39 am Iustin Pop

call_instance_start: add optional hv/be parameters

This patch modifies the rpc.call_instance_start - the master side - to
take optional hv/be parameters. The noded side is unchanged and
oblivious to the change.

This will allow implementation of single-user capability and such on...

e557bae9 05/06/2009 02:56 pm Guido Trotter

Inform the OS create script of reinstalls

Sometimes reinstalls are slightly different than new installs. For
example certain partitions may need to be preserved accross reinstalls.
In order to do that on a per-os basis we pass in the INSTANCE_REINSTALL
variable to inform the create script about when a reinstall is...

5fcc718f 02/27/2009 03:06 pm Iustin Pop

Fix some epydoc style issues

99% of the epydoc return tags are "@return:", but each of the modified files
had one "@returns:" line. We fix this for consistency.

Reviewed-by: imsnah

07813a9e 02/24/2009 05:25 pm Iustin Pop

Remove the extra_args parameter in instance start

This patch removes the extra_args parameter and instead switches the
instance to the HV_KERNEL_ARGS hypervisor option.

This is a big change, but it's a needed cleanup, this extra parameter on
all RPC calls is not generic and we also need to have a persistent value...

f2def43a 02/09/2009 11:24 am Iustin Pop

RpcResult: add a new payload field

For results which use the (status, payload) response type, it's easier
to define a ‘payload’ field on the result holding the payload than to
extract it using “data1” in the caller code.

Reviewed-by: ultrotter

84b45587 01/23/2009 12:15 pm Iustin Pop

Fill the 'call' attribute of offline rpc results

When creating ‘fake’ results for offline nodes, we currently don't pass
the call attribute. This complicates debugging, so even though this
should not matter in practice, it's better to fix it.

Reviewed-by: imsnah

1b8acf70 01/21/2009 12:48 pm Iustin Pop

Log the rpc call name in the RPC errors message

Currently the rpc module logs the error description and target node in
rpc calls logging, as such:

2009-01-21 00:50:01,456:  pid=1051/Thread-21 ERROR RPC error from node
node1.example.com: Connection failed (111: Connection...
6906a9d8 01/21/2009 11:54 am Guido Trotter

Add calls in the intra-node migration protocol

Currently the hypervisor is expected to do all the migration from the
source side. With this patch we also add the option of passing some
information to the target side, and starting some operation there.

As a bonus, a function to cleanup any started operation is included....

6b93ec9d 01/13/2009 05:20 pm Iustin Pop

Forward-port DrbdNetReconfig

This is a modified forward-port of DrbdNetReconfig and their associated
RPCs. In Ganeti 2.0, these functions will be used for two things:
- live migration (as in 1.2)
- and for other network reconfiguration tasks, since DRBD8.Attach()...

186ec53c 01/09/2009 02:52 pm Iustin Pop

Silence warning on node list for offline nodes

The warning in node list is meant for nodes that return wrong
information, but for offline nodes this case is normal.

Reviewed-by: imsnah

3247bbac 01/08/2009 06:05 pm Iustin Pop

rpc: Add a method for easy check of remote results

The patch adds a new method to the rpc.RpcResult class called
"RemoteFailMsg" which is useful for the RPC calls which return a
(status, payload) style result.

Reviewed-by: imsnah

56e7640c 01/08/2009 04:16 pm Iustin Pop

Add an instance_migratable rpc call

This is a forward-port of commit 1194 on the 1.2 branch:

This call will check whether an instance is up on its primary, and that
it has been started with symlinks. We currently have no on-secondary
checks, nor any hypervisor specific call....
b2e7666a 01/07/2009 07:02 pm Iustin Pop

Pass instance name to rpc call blockdev_close

This is an extract of commit 1166 on the 1.2 branch (Add a rpc call for
drbd network reconfiguration), but only the blockdev_close part.

The patch changes the blockdev_close call to take the instance so that...

dd875d32 12/18/2008 06:39 pm Michael Hanselmann

Job queue: Allow more than one file rename per RPC call

Reviewed-by: ultrotter

fab1e3a4 12/14/2008 02:01 pm Iustin Pop

cleanup: fix 'variable unused' warning

In the iteration we don't care about the node names, so we change the
for loop to be over the values (and not itervalues).

Reviewed-by: amishchenko

c41eea6e 12/11/2008 07:13 pm Iustin Pop

Fix epydoc format warnings

This patch should fix all outstanding epydoc parsing errors; as such, we
switch epydoc into verbose mode so that any new errors will be visible.

Reviewed-by: imsnah

12bce260 12/09/2008 03:24 pm Michael Hanselmann

RPC: Compress file upload data

Adding compression to larger amounts of data is more efficient than
transferring it (len(nodes) - 1) times over the network without
compression. We were able to compress a 800KB config file to about
30 KB, which is about 40 KB with Base64 encoding (required due to...

ed83f5cc 12/08/2008 11:10 am Iustin Pop

RPC: do not make calls to offline nodes

This patch changes the _MultNodeCall and _SingleNodeCall helpers to not
actually make calls to offline nodes, but instead generate fake
responses which have a parameter caller 'offline' set so that callers
can check for this value if they want (otherwise, it's just a failed RPC...

56aa9fd5 12/05/2008 05:01 am Iustin Pop

Cleanup the config file on demotion from candidate

This patch adds a simple rpc which makes a backup of the config file and
then removes it. This is done so that cluster verify doesn't complain
immediately after demoting a node.

Reviewed-by: imsnah

ae88ef45 12/04/2008 05:24 pm Michael Hanselmann

ganeti.rpc: Convert to new HTTP server

Reviewed-by: amishchenko

781de953 12/02/2008 02:58 pm Iustin Pop

Convert rpc results to a custom type

For a long time we had the problem that both RPC-layer errors and
results from the remote node share the same "valuespace". This is
because we shouldn't raise an exception when only one node failed
(and lose the results from the other nodes)....

3097c858 12/01/2008 10:52 pm Michael Hanselmann

Fix RpcRunner._StaticSingleNodeCall

Unfortunately, a rpc.Client object was passed as the first parameter,
causing the function to always fail.

Found during QA testing.

Reviewed-by: ultrotter

160e2921 11/26/2008 03:23 am Iustin Pop

Reduce duplication of work in rpc.Client

This patch removes the duplicate serialization and calls to
utils.GetNodeDaemonPort in rpc.Client, and instead moves them to calling
functions (the _*NodeCall ones recently introduced).

Reviewed-by: ultrotter

03d1dba2 11/25/2008 02:37 pm Michael Hanselmann

Pass ssconf values from master to node

Instead of parsing the configuration on the node, we pass the ssconf
values from the master.

Reviewed-by: iustinp

d57ae7f7 11/24/2008 03:38 pm Michael Hanselmann

ganeti.rpc: Read SSL certificate and key only once per request

There's no need to read the SSL certificate and key for every node
in a request. Also add a TODO for better error reporting.

Reviewed-by: amishchenko

eafd8762 11/21/2008 12:47 pm Michael Hanselmann

Use SSL for master/node RPC

This patch enables SSL between masterd and noded.

Reviewed-by: iustinp

ec17d09c 11/21/2008 12:46 pm Michael Hanselmann

Get rid of node daemon password

With the new SSL client certificate stuff it's no longer needed.

Reviewed-by: iustinp

4331f6cd 11/21/2008 12:45 pm Michael Hanselmann

Reuse HTTP client pool for RPC

ganeti-masterd: Add initialization and shutdown of RPC pool. It needs
to be shutdown before forking.

ganeti.cli: Add decorator function to initialize and shutdown RPC pool.

ganeti.rpc: Add functions to initialize and shutdown RPC pool. Throw...

6ddc95ec 11/21/2008 12:42 pm Michael Hanselmann

Add RPC call to update ssconf files

Reviewed-by: iustinp

9a525d83 11/19/2008 03:18 pm Michael Hanselmann

ganeti.rpc: Use central functions for actual RPC calls

Before we had lots, lots and lots of code duplication. This patch
changes the code to use four central functions.

Reviewed-by: iustinp

4c7c81d7 11/12/2008 02:52 pm Michael Hanselmann

ganeti.rpc: Use utils.ReadFile instead of reading file directly

Reviewed-by: iustinp

7c28c575 11/12/2008 02:50 pm Michael Hanselmann

ganeti.rpc: Convert to ganeti.serializer

This is one of the last places where the simplejson module is
used directly.

Reviewed-by: iustinp

ecfe9491 11/12/2008 02:50 pm Michael Hanselmann

Convert RPC module to new HTTP client

Currently, HttpClientManager is instantiated for every RPC call. This
will be changed with another patch, as will the use of SSL. The “Run”
method is no longer needed.

Reviewed-by: iustinp

74c47259 10/23/2008 05:19 pm Iustin Pop

Export the disk index in the import/export scripts

We want to export the disk index as some OSes will only want to export
the first disk (or the second one, etc.), even if we have multiple
disks.

The patch also updates the backend.ExportSnapshot docstring....

6c0af70e 10/22/2008 05:09 pm Guido Trotter

Convert ImportOSIntoInstance to OS API 10

- Change ImportOSIntoInstance not to get any "os_disk" and "swap_disk"
arguments but to accept multiple target images to import, and to
return a list of booleans with the result of each import
- Change the relevant rpc call and the only caller to conform...

99aabbed 10/20/2008 05:47 pm Iustin Pop

Convert the job queue rpcs to address-based

The two main multi-node job queue RPC calls (jobqueue_update,
jobqueue_rename) are converted to address-based calls, in order to speed
up queue changes. For this, we need to change the _nodes attribute on
the jobqueue to be a dict {name: ip}, instead of a set....

6b294c53 10/20/2008 05:47 pm Iustin Pop

Convert rpc.call_upload_file to use addresses

This patch allows rpc.call_upload_file to use addresses (if passed), and
also converts the ConfigWriter._DistributeConfig to pass them, since
this is an often-done operation.

Reviewed-by: imsnah

25348212 10/20/2008 05:47 pm Iustin Pop

Convert non-static rpc calls to use addresses

This patch converts all non-staticmethods rpc calls to pass addresses to
the Client calls.

This is done via two new small helpers. These functions also deal with
nodes that are not (yet) in the configuration file, and pass None for...

bdf7d8c0 10/20/2008 05:46 pm Iustin Pop

Add infrastructure for using addresses in rpc.py

The patch adds support for passing node addresses to NodeController
objects, which should speed up the connect sequence.

The patch also adds another very small optimization of computing the
content-length header value in the parent Client class instead of each...

3ef3c771 10/20/2008 05:46 pm Iustin Pop

Improve conformance with the style guide for rpc.py

This patch renames some internal function to camel case, for compliance
with the style guide.

It also fixes the module docstring (how old was that?).

Reviewed-by: imsnah

58b311ca 10/20/2008 03:49 pm Iustin Pop

Convert rpc.py to use the logging module

Reviewed-by: imsnah

d15a9ad3 10/17/2008 05:37 pm Guido Trotter

Cleanup os_add/rename rpc for OS API 10

- remove now unused osdev and swapdev arguments from backend, noded,
rpc, cmdlib
- convert docstrings to epydoc

Reviewed-by: iustinp

5d672980 10/15/2008 04:13 pm Iustin Pop

Add a rpc call for changing the drain flag

A new multi-node call is added that sets/resets the drain flag.

Reviewed-by: imsnah

5b442704 10/14/2008 02:29 pm Iustin Pop

Correctly fill the beparams too over RPC

As for the hvparams, we need to replace the sent instance beparams.

Reviewed-by: ultrotter

26ba2bd8 10/14/2008 01:20 pm Iustin Pop

Implement FillHV for instance-related rpc calls

We fill the instance hvparams with cluster defaults, and send a modified
dict over the wire to the node methods - they don't know anything about
cluster defaults versus instance parameters.

Reviewed-by: ultrotter

6217e295 10/14/2008 01:19 pm Iustin Pop

Export the hypervisor.ValidateParameters over RPC

The newly-added node-specific ValidateParams hypervisor method is
exported over RPC, using the semi-standard (success, message) return
value. Multi-node call, so that we call on both primary and secondary at...

16ad1a83 10/13/2008 04:49 pm Iustin Pop

Fix a few rpc-related errors

This fixes:
- whitespace change, double lines between methods
- duplication of call_upload_file, introduced by mistake in rev 1795
and which went undetected because of the many changes in that ref
(only diff -b shows it clearly)...

caad16e2 10/12/2008 11:40 pm Iustin Pop

Abstract checking own address into a function

Currently, we check if we have a given ip address (i.e. it's alive on
one of our interfaces) but manually calling TcpPing(source=localhost).
This works, but having it spread all over the code makes it hard to...

15396f60 10/10/2008 08:08 pm Michael Hanselmann

Mark call_node_leave_cluster as a static method

Reviewed-by: iustinp

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

e69d05fd 10/08/2008 01:36 pm Iustin Pop

Move the hypervisor attribute to the instances

This (big) patch moves the hypervisor type from the cluster to the
instance level; the cluster attribute remains as the default hypervisor,
and will be renamed accordingly in a next patch. The cluster also gains...

9f0e6b37 10/07/2008 02:39 pm Iustin Pop

rpc.call_instance_migrate: pass the whole instance

Currently the call_instance_migrate call only passes the instance name;
we need to pass the whole object for the hypervisor_type changes (all
the other individual instance rpc calls already pass the instance...

62c9ec92 10/06/2008 06:58 pm Iustin Pop

backend.py change to get cluster name from master

Currently there are three function in backend that need the cluster name
in order to instantiate an SshRunner. The patch changes these to get the
cluster name from the master in the rpc call; once the multi-hypervisor...

eb1328a9 10/01/2008 08:34 pm Michael Hanselmann

Convert rpc.py

Replacing ssconf with utility functions.

Reviewed-by: iustinp

4e071d3b 09/09/2008 03:24 pm Iustin Pop

Export backend.GetMasterInfo over the rpc layer

We create a multi-node call so that querying all nodes for agreement
will be fast.

Reviewed-by: imsnah