Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib.py @ 0d68c45d

History | View | Annotate | Download (231.9 kB)

# Date Author Comment
0d68c45d 01/21/2009 12:30 pm Iustin Pop

Change the instance status attribute to boolean

Due to historic reasons, the “should run or not” attribute of an
instance was denoted by its “status” attribute having a string value of
either ‘up’ or ‘down’. Checking this is in code was done via hardcoding...

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

96841384 01/20/2009 06:26 pm Iustin Pop

Convert RenameInstance to (status, data)

This allows the rename failures to show the ouput of OS scripts.

Reviewed-by: ultrotter

32388e6d 01/20/2009 04:20 pm Iustin Pop

Fix adding of disks to an instance

The ConfigWriter.AllocateDRBDMinor requires the instance name, not the
instance object. The LUSetInstanceParms is passing wrongly the instance
object, which can cause breakage.

The patch also adds asserts to check for this mismatch in ConfigWriter....

6d2e83d5 01/20/2009 04:20 pm Iustin Pop

Make cluster-verify check the drbd minors space

This patch adds support for verification of drbd minors space in cluster
verify: minors which belong to running instances and should be online
but are not, and minors which do not belong to any instace but are in...

1492cca7 01/20/2009 12:12 pm Iustin Pop

Some small fixes in cmdlib

Reviewed-by: ultrotter

20e01edd 01/20/2009 12:11 pm Iustin Pop

Convert AddOSToInstance to (status, data)

This allows the install and reinstall instance to return (hopefully)
relevant log files from the OS create scripts.

Reviewed-by: ultrotter

dd279568 01/20/2009 12:11 pm Iustin Pop

Convert the start instance rpc to (status, data)

This will record the failure cause in starting up the instance in the
job log (and thus to the user).

Reviewed-by: ultrotter

7d81697f 01/19/2009 07:22 pm Iustin Pop

Fix handling of failures in create instance disks

Commit 2302 only modified _CreateBlockDevOnPrimary to the new style
result, but _CreateBlockDevOnSecondary was forgotten. After the merger
of the two functions, _CreateBlockDevOnSecondary was taken as template...

6b12959c 01/19/2009 04:33 pm Iustin Pop

Use instance.all_nodes instead of hand-building it

This patch replaces a few obvious uses of [instance.primary_node] +
list(instance.secondary_nodes) (or similar usage) with the new
instance.all_nodes.

Reviewed-by: ultrotter

de12473a 01/19/2009 01:10 pm Iustin Pop

Split the block device creation in two parts

Some callers of _CreateBlockDev need recursive behaviour, but not all.
The replace secondary first creates (manually) new LVs to ensure storage
is there, and then it creates the new DRBD. At this point, we need a...

428958aa 01/19/2009 01:10 pm Iustin Pop

Combine the two _CreateBlockDevOnXXX functions

Since only two boolean parameters differ between these two functions, we
combine them as to have less code duplication. This will be needed in
the future as we will need to split off the recursive part off.
...

dab69e97 01/19/2009 01:10 pm Iustin Pop

Switch call_blockdev_create call to (status, data)

This allows errors to be visible at the user level instead of just node
daemon logs.

Reviewed-by: ultrotter

796cab27 01/19/2009 01:10 pm Iustin Pop

Small change in the instance disk creation path

For future propagation of error messages from backend to cmdlib and to
the job log, just having True/False return from the disk creation
function is not enough.

This patch converts these functions (_CreateDisks, _CreateBlockDevOnXXX)...

e6c1ff2f 01/19/2009 12:43 pm Iustin Pop

Use the same root for both _data and _meta LVs

Currently we use a different UUID for the _data and _meta volumes of a
DRBD disk. This is confusing as it's hard to associate the two in the
output of “lvs” or “gnt-node volumes”.

The patch changes so that they use the same prefix....

998c712c 01/16/2009 06:24 pm Iustin Pop

Fix LUExportInstance

Due to deficiencies in our block device implementation, it is a must to
call SetDiskID on disks before passing them to remote nodes. Since in
export/import, we don't touch the disks themselves, this was not needed
before in this function....

aeb83a2b 01/16/2009 12:43 pm Iustin Pop

Fix gnt-backup export with short names

We need to pass the fully-qualified node to _CheckNodeOnline, not the short
one.

Reviewed-by: imsnah

53c776b5 01/13/2009 05:21 pm Iustin Pop

Forward port the live migration from 1.2 branch

This is forward port via copy (and not individual patches cherry-pick)
of the latest code on the 1.2 branch related to the migration.

The changes compared to 1.2 are the fact that we don't need the
IdentifyDisks step anymore (the drbd rpc calls are independent now), and...

a2d59d8b 01/13/2009 05:20 pm Iustin Pop

Port replace disk/change node to the new DRBD RPCs

In replace disks to new secondary, since Attach (and therefore
call_blockdev_find) is not modifying the devices anymore, we need to
switch this LU to the new call_drbd_disconnect_net and
call_drbd_attach_net functions....

ea33068f 01/13/2009 04:43 pm Iustin Pop

Fix modification of instance memory

... as found by the QA script - bug was introduced by me in commit 2117.

Reviwed-by: imsnah

4cfb9426 01/12/2009 02:42 pm Iustin Pop

Fix some errors in instance modify --disk remove

The RpcResult introduction still left some bugs (after multiple patches):
- we don't correctly check the result type
- rename a variable to prevent a conflict

Reviewed-by: imsnah

f57c76e4 01/12/2009 12:27 pm Iustin Pop

Fix an error handling case in instance info

The checking for invalid instance names in LUQueryInstanceData is broken
since commit 1642.

Reviewed-by: imsnah

afee0879 01/12/2009 11:14 am Iustin Pop

Introduce a very simple LU to force config updates

This LU can be used to force a push of the config in case it's needed,
for example after an upgrade to update the ssconf_release_version file.

Reviewed-by: imsnah

94a02bb5 01/09/2009 04:26 pm Iustin Pop

Fix gnt-os for offline nodes

We shouldn't query offline nodes in gnt-os. This patch adds an utility
function to ConfigWriter that returns the names of online nodes and uses
it in LUDiagnoseOS to query only the good nodes.

Reviewed-by: imsnah

7e9366f7 01/09/2009 02:22 pm Iustin Pop

Cleanup replace-disks modes and options

In 1.2, due to the md+drbd7 legacy, we had a complex choice of replace
modes, and the new drbd8 modes where forced into this syntax, with some
complicated rules of transition from one mode to another (if REPLACE_ALL...

82e37788 01/08/2009 06:39 pm Iustin Pop

Fix cluster verify/node net test for offline nodes

For offline nodes, we shouldn't add them to the NV_NODELIST and
NV_NODENETTEST tests since they most likely won't succeed.

The patch makes gnt-cluster verify happy again in such cases.

Reviewed-by: imsnah

2b17c3c4 01/07/2009 04:38 pm Iustin Pop

_AssembleInstanceDisks: fix rpcresult handling

Commit 2117 changed _AssembleInstanceDisks to correctly parse the
failure status of the new RpcResult structure, but it didn't fix the
storing of only the result payload. Since RpcResult is not JSON
serializable, LUActivateInstanceDisks is failing....

699777f2 12/19/2008 09:31 pm Michael Hanselmann

ganeti.cmdlib: Check remote API certificate on "gnt-cluster verify"

Reviewed-by: amishchenko

513e896d 12/16/2008 06:24 pm Guido Trotter

LUConnectConsole: fix primary_node online check

The primary node is part of the instance, not of the opcode.

Reviewed-by: iustinp

a0add446 12/14/2008 02:03 pm Iustin Pop

cleanup: fix IAllocator hypervisor usage

Two problems: the iallocator.hypervisor wasn't initialized to None in
the constructor, so pylint doesn't realize it's initialized later with
setattr.

Second, 'hypervisor' is a module, so we shouldn't use it as a variable....

4504c3d6 12/14/2008 02:03 pm Iustin Pop

cleanup: LUReplaceDisks unused vars

And a small whitespace fix.

Reviewed-by: amishchenko

9ca87a96 12/14/2008 02:03 pm Iustin Pop

cleanup: do not hide upper-scope name

hypervisor is a module, so we shouldn't use it as an argument.

Reviewed-by: amishchenko

43017d26 12/14/2008 02:03 pm Iustin Pop

cleanup: fix use of _CheckNodeOnline

A few cases of wrong variable name.

Reviewed-by: amishchenko

8153e7e3 12/14/2008 02:03 pm Iustin Pop

cleanup: LUAddNode, LUSetNodeParams unused variable

This is a leftover from the abstraction of AdjustCandidatePool, and it
also requires the config lock, so it's better to remove it.

Reviewed-by: amishchenko

d1dc3548 12/14/2008 02:02 pm Iustin Pop

cleanup: LURenameCluster wrong variable name

Reviewed-by: amishchenko

832261fd 12/09/2008 11:33 am Iustin Pop

Warn for instances living on offline nodes

The patch also changes the result to error for non-reachable secondary nodes
(as for primary nodes).

Reviewed-by: ultrotter

ee513a66 12/08/2008 07:45 pm Iustin Pop

Fix _AdjustCandidatePool

Currently the ConfigWriter.MaintainCandidatePool returns node names, and
_AdjustCandidatePool uses them as such, but then it passes these to
context.ReaddNode which in turn passes them to jqueue.JobQueue.AddNode which
uses them as objects.Node instances....

3a5ba66a 12/08/2008 01:46 pm Iustin Pop

gnt-node modify: add the offline attribute

This patch changes gnt-node modify and the associated opcode/lu to allow
modification of the node offline attribute.

Setting a node into offline mode automatically demotes it from the
master role.

Reviewed-by: ultrotter

0a66c968 12/05/2008 01:41 pm Iustin Pop

Make cluster verify understand offline nodes

This patch changes cluster verify to not alert on offline nodes, but
instead just show a note at the end with the number of such nodes.

It also removes warnings in verify-disks and hooks about failures to
make rpc calls to such nodes....

7527a8a4 12/05/2008 01:32 pm Iustin Pop

cmdlib: check node stats in prereqs

This patch adds checks for offline nodes in most instance LUs so that we
can work with offline secondaries, but not with offline primaries. Some
cases (like grow disk, which needs both sides up) are not allowing
offline nodes at all....

a5961235 12/05/2008 01:20 pm Iustin Pop

Add two utility functions to cmdlib

These will be used for parameter checking and node status checking.

Reviewed-by: ultrotter

ec0292f1 12/05/2008 01:14 pm Iustin Pop

Add function to compute the master candidates

Since some nodes can be offline, we can't just take the length of the
node list as the maximum possible number of master candidates.

The patch adds an utility function to correctly compute this value and
replaces hardcoded computations with the use of this function. It then...

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

cbfc4681 12/05/2008 04:58 am Iustin Pop

watcher: handle offline nodes better

This patch changes the LUQueryInstances to show a different state for
offline nodes and also modifies the watcher to understand the offline
state in its checks.

Reviewed-by: ultrotter

9ddb5e45 12/05/2008 04:53 am Iustin Pop

node list: add the offline field

Reviewed-by: ultrotter

fc0fe88c 12/05/2008 04:53 am Iustin Pop

Add a new node parameter 'offline'

This patch adds a new node parameter called offline that will be used to
mark nodes which should be touched by commands.

We also add this flag at cluster init, node add, and export it to
iallocator scripts.

Reviewed-by: ultrotter

eb1742d5 12/04/2008 04:52 pm Guido Trotter

LURemoveNode, promote nodes to master candidates

If after the remove node there are not enough master candidates, we'll
try to promote them.

Reviewed-by: imsnah

b04285f2 12/03/2008 07:23 pm Guido Trotter

LUQueryExports: fix rpcresult handling

call_export_list is a multi node call, so we need to go through the
results, extrapolate the good ones, and return a failure value for the
bad ones.

Reviewed-by: imsnah

0fff97e9 12/03/2008 07:23 pm Guido Trotter

LUAddNode: Auto-make master candidates

When a node is added, if there are not enough master candidates, we'll
automatically promote it.

Reviewed-by: imsnah

f08ce603 12/03/2008 07:22 pm Guido Trotter

LUAddNode: Check the correct result

This is a typo in the conversion to RpcResult

Reviewed-by: imsnah

3a26773f 12/03/2008 11:57 am Iustin Pop

A few fixes related to master candidates

This patch:
- fixes cluster verify when all nodes are master candidates, but the
candidate_pool_size is higher
- warn when the master node is not marked as candidate
- disable setting master node to regular node...

ec85e3d5 12/03/2008 11:55 am Iustin Pop

Fix cluster rename and known_hosts

This patch rewrites and distributes ganeti's known_hosts file in case of
a cluster rename.

We also fix a problem in the node add (from where I copied the
known_hosts file distribution).

Reviewed-by: ultrotter

25361b9a 12/02/2008 04:35 pm Iustin Pop

Fix gnt-cluster verify w.r.t. rpc changes

This partially reorganizes the cluster verify LU:
- introduce constants for the node verify rpc call
- move from additional rpc calls to a single rpc call, the
call_node_info, which gaters all data needed...

55cf7d83 12/02/2008 02:58 pm Iustin Pop

Fix cluster rename

With the recent configwriter/ssconf changes, cluster rename becomes
trivial. This patch gets rids of the code and just updates the cluster
object.

Reviewed-by: imsnah

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

d4b72030 12/02/2008 12:53 pm Guido Trotter

Use the new utils.CheckBEParams function

Where we used/forgot to validate beparams we now use the new common function.

Reviewed-by: imsnah

8edcd611 12/02/2008 12:25 pm Guido Trotter

Handle default/none values in hv/be params

When a value is set to constants.VALUE_DEFAULT we have to remove it from
the specific instance dict, as this way it will be populated from the
cluster before. If instead it's specified as constants.VALUE_NONE we'll...

b9322a9f 12/02/2008 12:19 pm Guido Trotter

ImportExport: make src_node and src_path optional

If src_node is not there we'll default to using the currently exported
instance name as src_path. Also, if src_path is not absolute we'll look
for it in EXPORT_DIR.

Reviewed-by: iustinp

c0cbdc67 12/02/2008 12:19 pm Guido Trotter

LUCreateInstance: handle import without src_node

If we get called with no source node we'll thread src_path as an
instance name exported in EXPORT_DIR in one of the nodes and look for
it with the export_list rpc call.

Reviewed-by: iustinp

9c8971d7 12/02/2008 12:19 pm Guido Trotter

LUCreateInstance: keep src node lock on import

Currently the node lock also guards against removing the import at the
wrong time, so if we're importing an instance image we want to keep the
source node locked. In the future we might want to put export locks at a...

112f18a5 12/02/2008 07:06 am Iustin Pop

Adjust cluster-verify to check for candidate role

Currently cluster verify checks all nodes for the same set of files,
even if the nodes are not master candidates.

This patch adds back checking of ssconf files for consistency and splits
the checksum check into different error reporting messages based on...

3e83dd48 12/02/2008 07:06 am Iustin Pop

Prevent demotion from candidate based on pool size

In gnt-cluster modify we prevent demotion from the candidate role if
there are not enough master candidates left.

Reviewed-by: imsnah

4b7735f9 12/02/2008 07:06 am Iustin Pop

Add cluster candidate pool size parameter

This patch adds a new cluster paramater "candidate_pool_size" which
tracks the desired size of the list of nodes with the master_candidate
flag set.

Reviewed-by: imsnah

b31c8676 12/02/2008 07:05 am Iustin Pop

Add a gnt-node modify operation

This patch adds the OpCode, LogicalUnit and gnt-node command for
modifying node parameters, more specifically the master candidate flag
for a node.

Reviewed-by: imsnah

0e67cdbe 12/02/2008 07:04 am Iustin Pop

Add master/master_candidate fields to node list

This patch adds listing of the master_candidate field (as Y/N) and of
the master role (again Y/N) for nodes.

Reviewed-by: imsnah

d599d686 12/01/2008 08:02 am Iustin Pop

Fix errors when the node info RPC is incomplete

[Forward-port from the 1.2 branch]

If ganeti starts before xend, the node information will not have all the
fields filled in. The patch changes so that missing keys will be treated
as unknown (this applies to other cases as well, not only xend not...

726d7d68 11/27/2008 05:13 am Iustin Pop

Fix gnt-backup export

This patch fixes a bug in disk calculation for gnt-backup export, which
completely broke one-disk instance export.

The patch also corrects some error messages and style issues.

Reviewed-by: ultrotter

268b8e42 11/27/2008 05:13 am Iustin Pop

Fix a message in LUExportInstance

We never verified the node name before, so this is most likely not a
non-retrieve but a wrong name case.

Reviewed-by: ultrotter

112050d9 11/27/2008 05:12 am Iustin Pop

Fix instance creation

This patch fixes the diskless and drbd/file based instances. Sorry :(

Reviewed-by: ultrotter

24991749 11/25/2008 02:57 pm Iustin Pop

Implement support for multi devices changes

This big patch adds support for:
- changing NIC/disks in the multi-device model
- adding/removing NICs
- adding/removing disks

The patch is big and not very nice; the error checking paths are not
very clear....

4be4691d 11/25/2008 02:57 pm Iustin Pop

Slight change to the LU initialization code

This patch adds support for a separate LU.CheckArguments() method which
should do syntactic checks without holding locks and without polluting
the ExpandNames which is a lock-related function. See for example the...

b637ae4d 11/25/2008 02:51 pm Iustin Pop

Fix a bug in LUSetInstanceParams

The wrong names were reused in a copy-paste.

Reviewed-by: imsnah

b6fdf8b8 11/25/2008 02:50 pm Iustin Pop

Show disk access mode in gnt-instance info

The mode parameter needs to be exported and shown in the info output.

Reviewed-by: imsnah

e2a65344 11/25/2008 02:50 pm Iustin Pop

Change _GenerateDiskTemplate iv_name generation

Currently the _GenerateDiskTemplate assumes it does initial creation of
disks (i.e. it starts with index 0).

For dynamic disk adds, we need to pass an additional offset. This patch
adds this offset and modifies its sole current caller....

b4364a6b 11/24/2008 11:48 am Guido Trotter

LUCreateInstance: Fix import mac AUTO mode

Previously on import LUCreateInstance used to recycle the mac if the instance
name was the same than the one used at export time. Now we do the same, but
apply the setting separately for each nic.

Reviewed-by: iustinp

e36e96b4 11/24/2008 11:47 am Guido Trotter

LUCreateInstance unlock all nodes mid-way

When creating a new instance, after saving the instance data to the config file
and creating the disks, but before waiting for sync and installing the OS, we
release the node locks, to allow for more instance creations to proceed in...

18640d69 11/24/2008 11:47 am Guido Trotter

IAllocator: subtract down instances from free mem

Currently free_memory just reports the amount of free ram, as seen by the
hypervisor. We adjust this amount by subtracting the memory for any instance
which is down, and the difference for any instance which is configured to have...

8cc7e742 11/24/2008 11:46 am Guido Trotter

IAllocator: use the right hypervisor

Since the hypervisor is instance dependent we'll get one on instance creation,
and use the one in the instance config on relocation.

Reviewed-by: iustinp

b57e9819 11/24/2008 11:46 am Guido Trotter

IAllocator: fill i_list in a more proper way

- reuse the previously called cluster_info, rather than calling it again
- get all the instances from the config atomically, to prevent race conditions
- use a list comprehension, for simplicity

Reviewed-by: iustinp

90a7547a 11/24/2008 11:45 am Guido Trotter

Parallelize instance operations on the same node

With static minors we don't have a race condition anymore when
starting/stopping/rebooting/reinstalling more than one instance on the same
node, so we'll drop node locking altogether.

Reviewed-by: iustinp

dafc7302 11/24/2008 11:44 am Guido Trotter

Convert iallocator to the new _ComputeDiskSize

_ComputeDiskSize's API was changed for multidisk support in r2010, but
iallocator's call to it were not fixed. Converting them now.

Reviewed-by: iustinp

e4376078 11/23/2008 05:35 pm Iustin Pop

Documentation updates for cmdlib.py

This makes cmdlib.py not throw epydoc errors anymore.

Reviewed-by: ultrotter

a2d2e1a7 11/21/2008 05:35 pm Iustin Pop

Move FieldSet class to utils.py

Since we can use the FieldSet class in cli.py to nicely format disk
sizes and such, we move it to utils.py and also move its associated
unittest. I didn't remove the cmdlib.py unittest file as that's not the
good direction :)...

3e0cea06 11/21/2008 05:35 pm Iustin Pop

Change disk index validation to FindDisk

This patch replaces the hand validation of the disk index with the
instance.FindDisk method (actually reverting to previous method, before
the multi-disk, but now with indexes).

Reviewed-by: ultrotter

ad24e046 11/21/2008 05:34 pm Iustin Pop

Change GrowDisk to work with multi-disk

This patch changes the instance.FindDisk method to take index arguments
(instead of iv_names), and changes GrowDisk and list instances
accordingly.

Reviewed-by: ultrotter

d418ebfb 11/21/2008 08:22 am Iustin Pop

Change replace secondary to work with multi-disk

Also fix an error in the CheckPrereq.

Reviewed-by: imsnah

54155f52 11/20/2008 08:22 am Iustin Pop

Convert replace-disks (same nodes) to multi-disk

This patch changes the drbd8 replace disk only (no secondary change) to
work in with multi-disk. This mode of replaces works correctly with
replacing only a subset of disks.

Reviewed-by: imsnah

08db7c5c 11/20/2008 08:22 am Iustin Pop

Initial multi-disk/multi-nic support

This patch adds support for mult-disk/multi-nic in:
- instance add
- burnin

The start/stop/failover/cluster verify work as expected. Replace disk
and grow disk are TODO.

There's also a change gnt-job to allow dictionaries to be listed in...

41a776da 11/20/2008 08:19 am Iustin Pop

Add more disk/nic listing options in gnt-instance

This adds some more listing cases (useful for scripting/rapi):
- disk.sizes for a list of all sizes
- nic.(ips|macs|bridges)

Reviewed-by: imsnah

71c1af58 11/18/2008 12:06 pm Iustin Pop

Allow querying of variable number of parameters

This patch adds support for querying in gnt-instance list of:
- disk.count
- nic.count
- disk.size/$N
- nic.(ip|mac|bridge)/$N

The patch also disables the exception raised when the header description...

31bf511f 11/18/2008 12:04 pm Iustin Pop

Convert cmdlib.py to _FieldSet

This patch converts the current usage of _CheckOutputFields to the
FieldSet class, but it doesn't start to use its variable matching
features.

Reviewed-by: ultrotter

6de7c41d 11/18/2008 12:00 pm Iustin Pop

Add a FieldSet class for variable parameter sets

This patch adds a _FieldSet class that can be used for the new variable
parameter sets: e.g. the sda_size will change to disk/0.size (or
similar) and we need to both check validity and extract the index of the...

cb4e8387 11/11/2008 12:58 pm Iustin Pop

Fix instance rename

As can be seen from the patch, we remove from the locking manager
inst.name. However, we do this right after cfg.RenameInstance, which
changes inst.name to the new name. So we need to remove old_name not
the new name.

The real question is why does the glm allow me to remove a not-existing...

bb2ee932 11/11/2008 05:12 am Iustin Pop

Fix gnt-instance reinstall

Commit 1881 changed a rpc call but didn't fix all its users. This should
fix it (but I can't test as HTTP is broken).

Reviewed-by: imsnah

cd4d138f 11/05/2008 06:37 pm Guido Trotter

Update LUGrowDisk _WaitForSync call

The _WaitForSync call changed in r1794 but the GrowDisk call wasn't updated
then. This makes GrowDisk work in trunk.

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

1a05d855 10/23/2008 01:41 am Oleksiy Mishchenko

RAPI: Export beparams as dict. The patch also enables LUQueryInstances to accept beparams as valid field.

Reviewed-by: iustinp

09acf207 10/22/2008 05:09 pm Guido Trotter

LUCreateInstance: import multiple disks

Previously we used to handle only one disk. Now we'll import all the
ones present in the export, in order, on the instance's disks. Any disk
which was present on the original instance but wasn't exported is just
skipped in the target instance....

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

19d7f90a 10/22/2008 05:08 pm Guido Trotter

LUExportInstance: snapshot all disks

Rather than just snapshotting the "sda" disk, we'll snapshot all of the
instance disks. If we can't snapshot a disk for any reason we'll log an
error and proceed anyway: in this case the resulting export will miss a
disk. This also changes all the warning messages to self.LogWarning()....