Statistics
| Branch: | Tag: | Revision:

root / lib / backend.py @ bcb1a39e

History | View | Annotate | Download (83 kB)

# Date Author Comment
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 <>...

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...
a48b08bf 08/05/2009 02:19 pm Iustin Pop

Fix detecting of errors in export

This should fix issue 61, by explicitely calling bash (which is is now a
non-explicit dependency) and setting the pipefail command.

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

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

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

83052f9e 07/24/2009 03:05 pm Guido Trotter

Remove <DAEMON>_PID constants

The <DAEMON>_PID constants were created to reference a daemon pid file,
but actually contain a daemon's name, because the various functions that
work with pidfiles abstract the filename from the daemon name
themselves. Removing the constants and using the actual daemon name...

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

4a34c5cf 07/20/2009 07:58 pm Guido Trotter

Generate a shared HMAC key at cluster init time

This key is shared on all nodes (via cmdlib._RedistributeAncillaryFiles)
and will be used for HMAC authentication of confd messages.

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

e5a45a16 07/20/2009 02:06 pm Iustin Pop

Fix backend import errors from GetHypervisorClass

The merge of commit 360b0dc into branch-2.1 broke import of backend,
since it uses hypervisor.GetHypervisor() which returns an instance of
the hypervisor. Some of the hypervisors create directories at init time,...

b397a7d2 07/19/2009 09:26 pm Iustin Pop

Merge branch 'next' into branch-2.1

Conflicts:
lib/backend.py: non-trivial conflict but easy to solve

360b0dc2 07/19/2009 09:21 pm Iustin Pop

backend: Only build once the list of upload files

The list of upload files is built currently at every UploadFile() call.
This patch moves it to a separate variable which is initialized only
once.

This won't make much difference but I regard it as cleanup....

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

9a5cb537 06/30/2009 07:33 pm Iustin Pop

backend.DemoteFromMC: don't fail for missing files

If the config file is missing when the DemoteFromMC() function is
called, it will raise a ProgrammerError. Instead of changing the
utils.CreateBackup() file which is called from multiple places, for now
we only change the DemoteFromMC() function to not call it if the file is...

cc208ed0 06/29/2009 05:41 pm Guido Trotter

Merge branch 'master' into branch-2.1

  • master:
    Fix adjustement of candidates in cluster modify
    Add a new node list field
    Fix HTTP server library handling of credentials
    Fix a typo in backend.InstanceReboot docstring
    Fix handling of 'vcpus' in instance list...
d1a7d66f 06/29/2009 04:12 pm Guido Trotter

Introduce OS api version 15

Also, since Ganeti 2.1 will be compatible with both 10 and 15, change
the OS_API_VERSION constant to be an OS_API_VERSIONS set, and update the
places in the code that used that constat to use something else.

In particular:
- in the qa for now we just create a fake version 10 OS...

63b9b186 06/29/2009 04:12 pm Guido Trotter

_OSOndiskAPIVersion: save a loop

The api_versions list is first stripped and then converted to integer.
Combining the two operations.

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

3374afa9 06/26/2009 04:45 pm Guido Trotter

Use ReadFile.splitlines() rather than readlines

A few places in the code open a file "manually" rather than using our
wrapper function, because they need an array with the lines. Combining
the result of utils.ReadFile with splitlines() we get rid of the
exceptions....

7ead9575 06/26/2009 04:45 pm Guido Trotter

Rename _OSOndiskVersion to _OSOndiskAPIVersion

This makes what versions we're talking about clearer.

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

396b5733 06/23/2009 06:29 pm Iustin Pop

backend.StartMaster: fix variable name

As per comments for patch “Convert node_start_master to new style
result”, the ‘payload’ variable is renamed to ‘err_msgs’.

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

73e5a4f4 06/23/2009 02:30 pm Iustin Pop

Fix a typo in backend.InstanceReboot docstring

The documentation for the reboot was wrong. This patch fixes it and
updates the docstring with more details.

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

29921401 06/18/2009 01:49 pm Iustin Pop

Fix various pylint warnings

There were multiple issues:
- copy-paste resulted in wrong indentation
- wrong function name
- missing spaces around assignment
- overriding built-in names (type, dir) or already defines ones
(errors, hypervisor)

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

541741d3 06/16/2009 03:27 pm Guido Trotter

Fix backend.{Start,Stop}Master

Commit c26a6bd21c17641f718369caed88ae16947fa774 changed GetMasterInfo
not to return a tuple anymore, but didn't update its two callers in
backend.py, which were trying to extract the values from the second
tuple element. This causes a stack trace in node-daemon.log....

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...
c57f169e 06/16/2009 02:25 pm Guido Trotter

Merge branch 'master' into next

  • master:
    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
c26a6bd2 06/15/2009 08:08 pm Iustin Pop

Simplify the RPC result framework in backend.py

Since now all functions fail via _Fail, the return True, … is redundant
as all normal return paths have it, and thus the True value can be added
in the ganeti-noded handler.

This means that all functions can now forget about the special result...

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

Convert all backend function to exception

Instead of returning (False, msg) from rpc endpoints, we raise always
exceptions (the non-endpoint, internal functions can remain as is). This
means that the error paths are agnostic to how the failure is signalled...

5a533f8a 06/15/2009 08:08 pm Iustin Pop

Simplify usage of backend._FindDisks

Since all users of _FindDisks now return new-style results, we can
simply make it raise an exception and not deal with the status field.

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

8e70b181 06/15/2009 08:08 pm Iustin Pop

Remove old invalid-os related functionality

We no longer need OS objects to be able to represent invalid OSes. This
cleans up the code handling those cases.

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

255dcebd 06/15/2009 08:08 pm Iustin Pop

Big rewrite of the OS-related functions

Currently the OSes have a special, customized error handling: the OS
object can represent either a valid OS, or an invalid OS. The associated
function, instead of raising other exception or failing, create custom
OS objects representing failed OSes....

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

Convert the jobqueue rpc to new style result

This patch converts the job queue rpc calls to the new style result.
It's done in a single patch as there are helper function (in both jqueue
and backend) that are used by multiple rpcs and need synchronized
change....

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

Convert the file storage rpcs to new style result

This patch converts all three file-storage rpc (create, delete, rename)
to new style result. This is done in a single patch as they all use a
helper function which itself needs to/can be converted.

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

87f5c298 06/15/2009 08:08 pm Iustin Pop

Convert iallocator_runner rpc to new result style

This patch converts this rpc into the new style. Since the function
already had some error handling, we remove this custom error reporting
and replace it with our (new-style) result type. This allows significant...

3fb4f740 06/15/2009 08:08 pm Iustin Pop

Convert hooks_runner rpc to new style result

This also converts (and fixes) unittests and mock objects to deal with
this change, and the custom hook verifier in cmdlib.LUClusterVerify.

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

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

Convert write_ssconf_files to new style

The patch also adds logging of errors from the ConfigWriter in case the
RPC fails (although today we don't have failure modes).

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

2a52a064 06/15/2009 08:08 pm Iustin Pop

Convert master_info rpc to new style result

This was more tricky as the backend function is used by other function
in backend.py. As such, it must be handled specially - it must raise
always an exception and not simply return False, err.

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

10bfe6cb 06/15/2009 08:08 pm Iustin Pop

Convert node_volumes rpc to new style result

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

0623d351 06/15/2009 08:08 pm Iustin Pop

Conver node_leave_cluster rpc to new style result

This patch converts this rpc call to the new style result, and also
changes in the process the meaning of the QuitGanetiException's
arguments and the node daemon rpc call exception handler.

The problem with the exception handler is that we used a two-stage one,...

6c00d19a 06/15/2009 08:08 pm Iustin Pop

Convert node_stop_master rpc to new style result

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

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

Convert node_start_master to new style result

This is used in multiple places outside cmdlib.py, so it's a more
interesting patch.

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

6f68a739 06/15/2009 08:08 pm Iustin Pop

Convert node_verify rpc to new result style

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

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

Convert instance_list rpc to new style result

Since backend.GetInstanceList() is used both as RPC endpoint and as
internal function, it can't return (status, value). Instead it returns
only valid instance info, and failures are denoted by exceptions; and...

2fa74ef4 06/15/2009 08:08 pm Iustin Pop

Convert all_instances_info rpc to new result style

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

7ad1af4a 06/15/2009 08:08 pm Iustin Pop

Convert instance_info rpc to new style result

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

944bf548 06/15/2009 08:08 pm Iustin Pop

Convert instance_os_import rpc to new style result

This changes from a list of booleans to «status, error messages». This
means that instead knowing which disk has failed (position based), we
get a list of all failures (with details how they failed).

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

35c0c8da 06/15/2009 08:08 pm Iustin Pop

Convert bridges_exist to new style result

This was a very simple (boolean) RPC, so converting it to actually have
more value with the new style results was more difficult.

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

e480923b 06/15/2009 07:37 pm Iustin Pop

Convert vg_list rpc to new style result

This doesn't have known failure modes but converting will help later.

We also now call directly utils.ListVolumeGroups() instead of the
backend.ListVolumeGroups() so that we don't have to undo the (status,
value) result type....

29d376ec 06/15/2009 07:37 pm Iustin Pop

Convert volume_list rpc to new style result

This is a big change, because we need to cleanup its users too.

The call and thus LUVerifyDisks LU used to differentiate between failure
at node level and failure at LV level, by returning different types in
the RPC result. This is way too complicated for our needs....

35fbcd11 06/15/2009 07:37 pm Iustin Pop

Convert export_remove rpc to new style

This converts the export_remove rpc to new style result and also fixes
and old TODO by adding exception handling (and conversion to failure).

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

1b7bfbb7 06/15/2009 07:37 pm Iustin Pop

Convert export_list rpc to new style result

This is used in multiple places, so it has a little more changes than
the previous ones.

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

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

9b201a0d 06/15/2009 07:37 pm Iustin Pop

Convert finalize_export rpc to new style results

This rpc doesn't have explicit failure modes, but once all RPCs are
converted and we can catch and convert expceptions to failure in noded,
we will have meaningfull error messages.

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

ba55d062 06/15/2009 07:37 pm Iustin Pop

Convert snapshot_export rpc to new style

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

87812fd3 06/15/2009 07:37 pm Iustin Pop

Convert blockdev_snapshot rpc to new result style

This also slightly changes the code in cmdlib that uses it for more
clarity.

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

3efa9051 06/15/2009 07:36 pm Iustin Pop

Convert blockdev_getmirrorstatus rpc to new style

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

c738375b 06/15/2009 02:10 pm Iustin Pop

Fix a wrong function name in backend.DrbdAttachNet

Commit cf8df3f30c2dcd0ab398d835fa9f64d61578a4f7 "bdev: forward-port
ReAttachNet/DisconnectNet" forward-ported 1.2's bdev.DRBD8.ReAttachNet()
to 2.0 while renaming it to AttachNet(), but commit
6b93ec9d798ed53089a06bc0ced58ef1d8a9e4b0 "Forward-port DrbdNetReconfig"...

1ba9227f 06/15/2009 01:52 pm Guido Trotter

OSEnvironment: convert to NIC parameters

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

2cc6781a 06/09/2009 12:07 pm Iustin Pop

rpc: Add a simple failure reporting framework

This patch adds a simple failure reporting tool, similar to bdev's
_ThrowError. In backend, we move towards the new-style RPC results (of
type (status, payload)) and thus functions which use this style can very...

9205a895 06/08/2009 07:44 pm Iustin Pop

Convert call_blockdev_removechildren to new result

This patch converts blockdev_removechildren to new result type and
slightly changes a message in addchildren to match this (paired)
function.

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

2cc1da8b 06/08/2009 07:44 pm Iustin Pop

Convert call_blockdev_addchildren to new result

This patch converts the blockdev_addchildren rpc call to the new result
format.

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

6b5e3f70 06/08/2009 07:43 pm Iustin Pop

Convert rpc call_blockdev_rename to (status, data)

This small patch converts the call_blockdev_rename to the new result
type.

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

464f8daf 05/28/2009 05:05 pm Iustin Pop

Change the bdev init signatures

This patch changes all the bdev.BlockDev constructors to take an
additional ‘size’ parameter, all the backend functions that call those
functions to pass it and also changes backend.BlocdevCreate() to not use
the size passed via the rpc call but instead directly disk.size (this is...

1b54fc6c 05/28/2009 03:18 pm Guido Trotter

Convert UploadFile (and its callers) to new rpc

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

4501a443 05/28/2009 03:18 pm Guido Trotter

UploadFile: allow ancillary files

Currently UploadFile is restricted to a static set of files, and thus
gnt-cluster redist-conf (silently) fails to upload all config files.
With this patch we add the new static files we distribute, and all
hypervisor-provided ancillary files....

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

030b218a 05/25/2009 01:12 pm Iustin Pop

Fix backend.OSEnvironment be/hv parameters

Commit 67fc3042c20f5893abf71a0b4c445c356f9603b9 added some more
variables to be exported to OSEnvironment, but it has two bugs:
- wrong variable name (env vs. result)
- in OSEnvironment we don't have the automatic converstion to strings...

67fc3042 05/21/2009 04:05 pm Iustin Pop

Export more instance information in hooks

Currently we miss in hooks the instance's hypervisor, hypervisor
parameters and backend parameters. This forces hooks to query back into
ganeti, which is dangerous due to possible luxi sockets exhaustion.

This patch adds these three as INSTANCE_HYPERVISOR, INSTANCE_HV_*,...

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

b33b6f55 02/25/2009 05:03 pm Iustin Pop

Fix mixed pvm/hvm clusters and instance listing

The current implementation of the combining of the instance lists will
only do this for instances whose all four-fields match in both
hypervisors; however, this is broken for the dynamic fields (state,
times) which can change between the invocations of the two different...

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

ae48ac32 02/16/2009 04:50 pm Iustin Pop

Fix some bugs in reboot

There are two issues fixed in this patch:
- first, the recent RPC changes caused loss of data in hard reboot
type; we weren't reporting any results from the stop/start instance
calls;
- second, in soft or hard reboots, we didn't initialized the disk...

f6eaed12 02/16/2009 02:17 pm Iustin Pop

Convert IOErrors for /proc/drbd into our errors

If /proc/drbd can't be opened, this raises an IOError, but all the
error-handling behaviour in backend treats only BlockDeviceErrors. This
creates a plain failure in cluster verify and in other RPC calls.

This patch simply converts EnvironmentErrors into BlockDeviceErrors, and...

ea5a5b74 02/13/2009 02:28 pm Guido Trotter

Remove two fixed FIXME and convert one to TODO

The cli FIXME is not something broken, but rather some better handling
feature we'd rather have, and the two backend FIXME are done (disks have
their read only parameter set, and the error is raised and thus reaches...

1fae010f 02/12/2009 09:30 am Iustin Pop

Switch the instance_shutdown rpc to (status, data)

This patch changes the return type from this RPC call to include status
information and renames the backend method to match the RPC call name.

The patch is a little bigger than the reboot one, since this call is...

489fcbe9 02/12/2009 09:30 am Iustin Pop

Switch the instance_reboot rpc to (status, data)

This small patch changes the return type from this RPC call to include
status information and renames the backend method to match the RPC call
name.

Reviewed-by: ultrotter

33bc6f01 02/10/2009 04:45 pm Iustin Pop

Some error message cleanups

Reviewed-by: imsnah

1063abd1 02/10/2009 04:44 pm Iustin Pop

Change the disk assembly to raise exceptions

This big patch converts the bdev Assemble() methods and the supporting
functions to raise exceptions instead of returning False. This is a big
patch, since the assembly functions touch other functions: add children,...

0c6c04ec 02/10/2009 04:44 pm Iustin Pop

Change BlockDev.Remove() failure result

Currently, the Remove() methods of block devices return True/False.
This doesn't permit any error detail reporting.

This patch changes the return type to None for success, and raises
BlockDeviceError in case of failure. This permits the details to be...

e1bc0878 02/10/2009 04:44 pm Iustin Pop

Switch the blockdev_remove rpc to (status, data)

This converts the backend and cmdlib modules to a (status, data)
implementation of the blockdev_remove rpc call. bdev.py is not yet
converted, so we don't actually have error information.

We also fix a bug in _RemoveDisks by not reusing a variable....

746f7476 02/10/2009 04:44 pm Iustin Pop

Change BlockDev.Shutdown() failure result

Currently, the Shutdown() methods of block devices return True/False.
This doesn't permit any error detail reporting.

This patch changes the return type to None for success, and raises
BlockDeviceError in case of failure. This permits the details to be...

cacfd1fd 02/10/2009 04:44 pm Iustin Pop

Switch the blockdev_shutdown rpc to (status, data)

This converts the backend and cmdlib modules to a (status, data)
implementation of the blockdev_shutdown rpc call. bdev.py is not yet
converted, so we don't actually have error information.

We also fix a bug in _ShutdownInstanceDisks by not reusing a variable....

53c14ef1 02/10/2009 04:43 pm Iustin Pop

Convert blockdev_assemble rpc to (status, data)

This converts the RPC call blockdev_assemble to the new-style result
format. Note that we won't usually have error information, but it's the
first step toward it.

Reviewed-by: ultrotter

821d1bd1 02/09/2009 04:03 pm Iustin Pop

Uniformize some function names in backend.py

Currently, the names of the functions in backend.py that are actually
RPC procedures and are called from ganeti-noded are not corresponding to
the RPC names. This makes it hard to actually see which functions are...

23829f6f 02/09/2009 04:03 pm Iustin Pop

rpc.call_blockdev_find: convert to (status, data)

This patch converts the call_blockdev_find - which searches for block
devices and returns their status - to the (status, data) format. We also
modify the backend function name to match the rpc call.

Reviewed-by: ultrotter

1268d6fd 02/09/2009 12:31 pm Iustin Pop

Fix handling OS errors in AddOSToInstance

This patch fixes the error handling in the add OS to instance function
with regard to invalid OSes. Previously, we didn't handle any such
errors, with the end result that the user would have to look in the node
daemon log....

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

backend.DrbdAttachNet: don't ignore Open() errors

Currently the return value or errors from the block device Open() method
are ignored. This patch catches any BlockDeviceErrors and returns a
well-formatted result.

Reviewed-by: ultrotter

26f15862 02/03/2009 04:45 pm Iustin Pop

An attempt at fixing some encoding issues

This patch unifies the hardcoded re-encoding attempts into a single
function in utils.py. This function is used to take either an unicode or
str object and convert it to a ASCII-only str object which can be safely...

15552312 02/02/2009 04:49 pm Iustin Pop

A couple of small changes to the OS environment

This patch correctly exports the mode of disks (rw/ro) and also exports
the instance OS.

Reviewed-by: imsnah

a1b805fb 02/02/2009 01:23 pm Iustin Pop

Return error messages in node add ssh handling

When the rpc call node_add fails, we don't have any error message. This
patch changes the call to return (status, data) so that the user can see
the correct error message.

Reviewed-by: imsnah

e9ce0a64 01/29/2009 05:09 pm Iustin Pop

Implement software release version checks too

Currently the LUVerifyCluster only reports the protocol version changes,
not software ones. This is useful to know/monitor, so we add this too as
a warning.

Reviewed-by: ultrotter

ca77edbc 01/21/2009 08:23 pm Guido Trotter

ShutdownInstance: log instance name, not object

When an instance fails to shut down we currently log its whole object,
rather than just the instance name.

Reviewed-by: iustinp

c979d253 01/21/2009 04:12 pm Iustin Pop

Fix some more pylint errors

Two are real errors (invalid names) and one is style error (overriding
name from outer scope).

Reviewed-by: ultrotter

cd42d0ad 01/21/2009 12:03 pm Guido Trotter

Implement the new live migration backend functions

MigrationInfo, AcceptInstance and AbortMigration are implemented as
hypervisor specific functions, and by default they do nothing (as
they're not always necessary).

This patch also converts hv_base.MigrateInstance docstring to epydoc,...

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