| Branch: | Tag: | Revision:

root / lib @ d04aaa2f

# Date Author Comment
d04aaa2f 05/19/2009 11:39 am Iustin Pop

Add -H/-B startup parameters to gnt-instance

This patch modifies the start instance script, opcode and logical unit
to support temporary startup parameters.

Different from 1.2, where only the kernel arguments were supporting
changes (and thus xen-pvm specific), this version supports changing all...

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

dcbd6288 05/18/2009 07:39 pm Guido Trotter

Fix gnt-job list argument handling

Currently QueryJob returns "None" when a wrong job ID is passed.
Handle this in gnt-job list, by printing an error for each wrong job,
and still giving output for all the jobs which actually do exist.

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

b4874c9e 05/15/2009 11:45 am Guido Trotter

Instance reinstall: don't mix up errors

If the remote info rpc call fails we can't assume that the instance is

Signed-off-by: Guido Trotter <>

f1926756 05/15/2009 11:42 am Guido Trotter

Don't check memory at startup if instance is up

Signed-off-by: Guido Trotter <>

b2482333 05/13/2009 03:58 pm Guido Trotter

LUSetClusterParams: improve volume group removal

Currently LUSetClusterParams will remove the volume group if the vg_name
field passed in is not true, but not None. Setting the target volume
group to False or the empty string, though, is a bad idea because it's...

7a56b411 05/13/2009 02:45 pm Guido Trotter

LUQueryClusterInfo: return a few more fields

Some fields can be set at cluster init, and perhaps even modifed with
SetClusterParams but there's no way to know them. With this patch we
export them in the cluster info query.

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

bd45767b 05/07/2009 11:13 am Carlos Valiente

Remove some superfluous imports

This is for Python 2.6 compatibility.

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

7ffe8fba 05/05/2009 06:06 pm Carlos Valiente

Avoid DeprecationWarning on Python >= 2.6

Python 2.6 complains about module 'sha' being deprecated. It makes
execution of Ganeti commands a bit annoying, and when you run
'ganeti-watcher' in cron jobs, you get a mail message after every

Tests pass under under Python 2.6 and Python 2.4....

34e71fea 05/05/2009 04:19 pm Karsten Keil

Fix compatibility with DRBD 8.2

This patch adds (and suppresses) the extra ipv4/ipv6 words before the
actual address that newer DRBD versions add.

[: slightly changed the patch to conform to style
guide, and changed the commit message]
Signed-off-by: Iustin Pop <>...

01e2ce3a 05/05/2009 04:19 pm Iustin Pop

Fix compatibility with DRBD 8.3

DRBD 8.3 changes two more things compared to 8.2:
- /proc/drbd format changed in multiple ways; the part we're
interested is the ‘st:’ to ‘ro:‘ change (in the changelog named as
“Renamed 'state' to 'role'”
- “drbdsetup /dev/drbdN show” changed the ‘device’ stanza from:...

c803b052 05/05/2009 02:00 pm Iustin Pop

RunCmd: log command line for missing cmd case

In case of missing programs, currently utils.RunCmd doesn't show any
information to help debugging, only 'No such file or directory'. This
patch adds error handling for the ENOENT case such that at least we have...

572e52bf 05/05/2009 01:58 pm Iustin Pop

Abstract Linux node information in hv_base

Currently both hv_fake and hv_kvm implement practically identical code
to get the node information. Since future container-like hypervisors
will also need this functionality, this patch moves it into the base
class (as a separate function) which can then be called from classes...

81b7354c 05/04/2009 04:51 pm Iustin Pop

Small optimisation in utils.WriteFile

Currently we always try to remove the new file, even if the rename
succeeded. This patch tracks the existence of the new file and doesn't
try to remove it if we managed to rename it.

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

d64769a8 05/04/2009 04:09 pm Iustin Pop

Include node name in hypervisor validation errors

The current validation routine just says "failed", without specifying
the node name. This is very confusing, and we should log the node name

Signed-off-by: Iustin Pop <>
Reviewed-by: Alexander Schreiber <>

8eb148ae 05/04/2009 04:09 pm Iustin Pop

Fix gnt-cluster getmaster on non-master nodes

The current implementation of “gnt-cluster getmaster” doesn't work on
non-master nodes, which is a regression from 1.2. This patch implements
it (again) via ssconf.

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

a6ab004b 04/24/2009 05:36 pm Iustin Pop

LUDiagnoseOS: change locking and error handling

Since the “list OSes” call is exported via RAPI, this can be used pretty
easily to DOS the master daemon during long jobs.

The implementation of LUDiagnoseOS makes an RPC call to all nodes; we
lock nodes here in order to prevent node removal....

ea9ddc07 04/24/2009 11:43 am Iustin Pop

Fix verify-disks with broken volume groups

When a remote node returns invalid LVM data, we check it, but we don't
stop and continue with the rest of the checks (which require a valid
volume group). This raises an internal error and breaks verify disks.

This seems unchanged for a long while, I don't know why it surfaced just...

9a198532 04/24/2009 11:43 am Iustin Pop

Prevent errors when xenvg is broken cluster verify

When vg_name is not returned at all, we currently abort with an internal
error. This is because we don't catch KeyError.

This patch adds a custom message for this case, and also adds KeyError
to the list of catched exceptions, just for safety....

949bdabe 04/15/2009 02:11 pm Iustin Pop

A bunch of doc and other small fixes

This patch adds a couple of both externally and internally reported
- missing SGML tags (Issue 54), report and patch by superdupont
- wrong variable used in the init.d script, report and patch by
Karsten Keil <>...

7dd106d3 04/06/2009 11:20 am Iustin Pop

Fix Xen soft reboot via polling

This patch fixes the Xen soft reboot ("xm reboot") via polling for a specific
time for either changed domain ID or decreased CPU run-time.

This sould prevent the race-conditions discussed on the mailing list for

5d60b3bd 04/06/2009 11:20 am Iustin Pop

Add a new ssconf file with the cluster tags

Since the cluster tags are/should be more-or-less static, add them as an
ssconf key, so that querying them is possible without creating a
job/requiring the masterd to be running.

Reviewed-by: imsnah

8a088b79 03/20/2009 03:07 pm Guido Trotter

Fix _NOQUOTE regexp

Allow expressions longer than one character to match.

Reviewed-by: imsnah

53d47a06 03/20/2009 03:06 pm Guido Trotter

Mainloop: avoid calculating timeout every time

set timeout_needs_update to False after calculating the timeout.

Reviewed-by: imsnah

19498d6c 03/12/2009 02:08 pm Guido Trotter

kvm: use the correct vnc bind address

There is a bug in kvm, when binding vnc to a specific address the
constant 'vnc_bind_address' is passed in, instead of the actual
requested address. This patch fixes it.

Reviewed-by: iustinp

6b405598 03/10/2009 05:02 pm Guido Trotter

Xen: Remove one hardcoded constant


Reviewed-by: imsnah

c614e5fb 03/09/2009 05:12 pm Iustin Pop

Handle ghost instances in temp DRBD map

Currently cluster-verify doesn't handle the (admitedly invalid) case where we
have reservation for instances that were removed in the meantime.

This patch adds a check for this and prevents code errors in cluster-verify in...

82759cb1 03/09/2009 05:12 pm Iustin Pop

Fix error handling in replace-disks with new node

Currently the _CreateSingleBlockDev function only raises OpExecError and not
BlockDeviceError. This means that we don't release the instance's temporary
minors properly, and this creates problems later if the instance is removed...

35e994e9 03/02/2009 02:19 pm Iustin Pop

Export tags to cluster verify hooks

This patch export the cluster and node tags to the cluster verify hook
scripts. The tags are exported as a space-separated list, which allows
easy parsing from the shell (e.g. “for tag in $GANETI_CLUSTER_TAGS; do
...”) and therefore requires the previous “Don't allow spaces in tag...

28ab6fed 03/02/2009 02:19 pm Iustin Pop

Don't allow spaces in tag names

This patch restricts the use of spaces in tags, as this does not allow
nice exporting of tags to environment in hooks. One can use underscores
or dashes instead of spaces.

Reviewed-by: schreiberal

77031881 03/02/2009 02:18 pm Iustin Pop

Update the iallocator documentation

This updates the iallocator documentation to 2.0, bumps up the
iallocator version (and moves a constants to lib/, and
fixes a style on install.rst.

Reviewed-by: ultrotter

1b2c8f85 03/02/2009 02:18 pm Iustin Pop

Fix a bug in utils.EnsureDirs

This fixes a bug introduced in rev 2562 and also fixes the indentation.

Reviewed-by: ultrotter

9afb67fe 02/27/2009 07:09 pm Guido Trotter

Use EnsureDirs in KVM as well.

The KVM hypervisor has also code to ensure a list of directories exist.
Substitute it with our new utils function.

Reviewed-by: iustinp

9dae41ad 02/27/2009 07:08 pm Guido Trotter

Create runtime dir in bootstrap

Some hypervisors (KVM) need RUN_GANETI_DIR to exist even at cluster init
time. This patch creates it in InitCluster just before hv parameter
checking. Since the code to make list of directories is already repeated
twice in the code, and this would be the third time, we abstract it into...

cc9e1230 02/27/2009 07:08 pm Guido Trotter

LUVerifyCluster: Handle the "no volume group" case

If we're only file based and out volume group is set to "None" there's
no point in asking nodes for their volume groups, logical volumes, and
drbd devices, and checking those.

Reviewed-by: iustinp

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

69efe319 02/26/2009 02:32 pm Michael Hanselmann

Fix typos in utils.WriteFile's docstring

Reviewed-by: iustinp

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

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

Fix xen-hvm and KERNEL_ARGS

xen-hvm doesn't have KERNEL_ARGS, and I just changed blindly all old
extra_args to HV_KERNEL_ARGS. This makes xen-hvm work again.

Reviewed-by: imsnah

f3e2e4c6 02/25/2009 02:50 pm Iustin Pop

Update some version-related constants

Since we are quite close to final RPC and hooks APIs, we update the hooks and
protocol_version constants.

Reviewed-by: imsnah

2c2690c9 02/25/2009 01:23 pm Iustin Pop

Update some hooks settings

While reviewing the hooks document, I realised we are not correctly
exporting the instance properties.

This patch fixes:
- export the disk and disk template in all LUs, not only (hardcoded)
in the instance create
- removes the instance create INSTANCE_ prefix on some non-instance...

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

a985b417 02/24/2009 05:25 pm Iustin Pop

Simplify a little the hypervisor routines

Instead of “instance.hvparams”, we use a shorter “hvp” name to make readability

Reviewed-by: imsnah

f9d6542d 02/24/2009 05:24 pm Iustin Pop

Add definitions for the root_args hypervisor param

This patch adds a new hypervisor parameter for the hypervisors that can
actually start and instance with external kernels.

Reviewed-by: imsnah

9854f5d0 02/24/2009 01:23 pm Iustin Pop

Make gnt-instance info work with offline nodes

This simply makes LUQueryInstanceData return the same information as for
a static query when one or both of the nodes are down.

Reviewed-by: imsnah

74aa2478 02/19/2009 05:49 pm Iustin Pop

Update version numbers to beta2

Note that the RAPI change is in a docstring (i.e. example), not in code.

Reviewed-by: ultrotter

3213d3c8 02/17/2009 02:44 pm Iustin Pop

Show more details for failed xen commands

This patch also logs the output of the xm commands in case of failures;
some corner cases were forgotten in the last redo.

Reviewed-by: imsnah

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

1cd8141c 02/16/2009 02:09 pm Guido Trotter

Convert default root partition to msdos style

As discussed with 2.0 msdos partition style should be the default in the
instance OS, so we're changing the default instance params accordingly.
A followup patch will update the debootstrap os.

Reviewed-by: iustinp

bf4a90af 02/13/2009 06:17 pm Iustin Pop

RAPI: documentation updates

This patch fixes the version and does some update to the RAPI resources

Reviewed-by: imsnah

6e99c5a0 02/13/2009 05:54 pm Iustin Pop

RAPI: fixes related to write mode

This patch fixes many small issues related to write functions:
- update documentations w.r.t. how to add users
- update the instance add function for latest API
- add instance delete
- fix addition of tags
- update some error messages...

bfc30ec0 02/13/2009 05:35 pm Iustin Pop

Some small improvements to the fake hypervisor

This patch modifies the fake hypervisor to substract the memory “used”
by “running” instances from the free memory, so the actual node
information changes based on the running instances.

Also some style changes and fixes are added....

d8dcf3c9 02/13/2009 03:49 pm Guido Trotter

SetInstanceParams: export nic changes to hooks

Currently we export the old instance "as is" and any nic changes get
lost, so hooks won't know of a different ip, bridge, or mac address.
This patch fixes it by putting the nics in the override dict, if any
changes are done....

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

1f8588f6 02/13/2009 01:38 pm Iustin Pop

RAPI: format error messages as JSON

This patch changes the format of the HTTP error messages from text/html, which
is hard to parse from RAPI clients, to JSON which can be automatically parsed.

The error message is an object, which contains always three keys:...

77e1d753 02/13/2009 01:38 pm Iustin Pop

Make RAPI return 502/504 errors for luxi errors

This changes the RAPI error codes for luxi errors; a timeout error is
now reported properly as 504, while any other luxi error is reported as

It would be good to convert even more errors into proper return codes in...

0f6be82a 02/12/2009 08:13 pm Iustin Pop

job queue: log the opcode error too

Currently we only log "Error in opcode ...", but we don't log the error itself.
This is not good for debugging.

Reviewed-by: ultrotter

5c44da6a 02/12/2009 07:35 pm Guido Trotter

LUSetInstanceParams: Fix nic handling

Use constants.VALUE_NONE rather than hardcoding the string "none"
If we're adding a nic fill the nic_dict with default values
Check if the mac is syntactically valid, if we have one
Don't allow the mac to be 'auto' when modifying a nic...

e4640214 02/12/2009 07:35 pm Guido Trotter

ConfigWriter.AddInstance check instance mac

There is a race condition in CreateInstance, since the mac address is
generated early and only added to the config (and thus really assured to
be unique) only at this point. Since it's possible that another instance...

295728df 02/12/2009 07:35 pm Guido Trotter

Instance Creation: generate nics earlier

We want the real nic to be shown to the hooks and the allocators, so
we'll generate them in CheckPrereq. We also write a comment about the
race condition we generate. This race condition existed even before, so
moving this generation will just lenghen it a bit. A separate patch...

fd965830 02/12/2009 07:09 pm Iustin Pop

Handle better broken disks

While running burnin:
File "/usr/lib/python2.4/site-packages/ganeti/", line 497, in str
val += ", size=%dm)>" % self.size
TypeError: int argument required

This happened while handling another error, so we lose the original...

25ae22e4 02/12/2009 07:04 pm Iustin Pop

Do not check 'None' disk IDs for duplicates

In case of 'None' logical or physical IDs, we don't need to check them
for duplicates. This case can happen for DRBD devices in case of newly
added disks, for example.

Reviewed-by: imsnah

e7d81ba0 02/12/2009 07:04 pm Iustin Pop

Prevent race condition on MAC addresses

This patch adds a temporary set for MACs that have been requested but
are not yet in the configuration (as part of an instance NIC). The MACs
of an instance are automatically removed from this set when the instance...

5b460366 02/12/2009 07:03 pm Iustin Pop

Some small fixes

This patch removes the admin_ram LUQueryInstances field (is broken
anyway) and fixes the VNC address checks in the Xen Hypervisor.

Reviewed-by: imsnah

8aec325c 02/12/2009 07:03 pm Iustin Pop

Fix LUQueryInstances fields.

The query fields are now regular expressions. We need to quote the dots,
otherwise invalid fields will be accepted but they will lose special
formatting in the cli scripts.

Reviewed-by: imsnah

9b977740 02/12/2009 11:15 am Guido Trotter

Apply the right permissions to /etc/hosts

In the current Ganeti version when modifying /etc/hosts we mistakenly
give it the permissions of the temporary file we create to define its
content, which is by default 0600. This breaks most non-root
applications, and thus must be corrected. This patch forces the mode to...

1dff8e07 02/12/2009 09:34 am Iustin Pop

Fix RPC result handling in _AssembleInstanceDisks

For (status, data)-style RPC calls, the result data is in the ‘payload’
attribute. This was missed in the conversion patch, with the only side
effect that gnt-instance activate-disks didn't show a nice output...

4b98ac29 02/12/2009 09:31 am Iustin Pop

ConfigWriter: add checks for duplicate disk IDs

This patch adds a safety check for duplicate disk logical/physical IDs,
in order to prevent possible software bugs.

Reviewed-by: imsnah

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

Reviewed-by: ultrotter

aed77cea 02/11/2009 08:29 pm Guido Trotter

FileStorage: abort creating over an existing file

In FileStorage there is a TODO:
decide whether we should check for existing files and
abort or not
After Ganeti ate my instance data I decided. Let's abort.
In general there is no reason we should overwrite existing files, and...

43e99cff 02/11/2009 06:23 pm Guido Trotter

_GenerateDiskTemplate: correct file disk index

Currently when adding disks the base for the index is not taken into
account, and disk 0 is added twice.

Reviewed-by: iustinp

ccd905ac 02/11/2009 12:19 pm Guido Trotter

HTS_USE_VNC, rename and remove KVM

Currently we use the HTS_USE_VNC constant only to copy the vnc password
file. While KVM uses vnc it currently has no password support, nor we'll
be on time making one for 2.0, so renaming the constant to
HTS_COPY_VNC_PASSWORD and only putting Xen HVM in it. In the future...

82e12743 02/10/2009 06:05 pm Iustin Pop

Some fixes to node add and re-add

The patch changes the pre-checks in node-add and re-add:
- if the node is not already in the cluster, refuse to re-add
- when re-adding, reuse the secondary IP from the cluster
- when re-adding, reset the offline and drained flags, so that RPC...

a5728081 02/10/2009 05:06 pm Guido Trotter

Instance parameters: force typing

We want all the hv/be parameters to have a known type, rather than a
random mix of empty string, boolean values, and None, so we declare the
type of each variable and we enforce/convert it.

- Add some new constants for enforceable value types...

c9d443ea 02/10/2009 04:47 pm Iustin Pop

Implement modification of the drained flag

This patch adds LU and cli-level support for modification of the node
drained flag. It is similar to the offline changes.

Reviewed-by: imsnah

733a2b6a 02/10/2009 04:46 pm Iustin Pop

Prevent allocations on drained nodes

This patch adds checks for drained nodes in the logical units that
allocate or move instances around. We also update an error message (not

Reviewed-by: imsnah

22f0f71d 02/10/2009 04:46 pm Iustin Pop

cluster verify: show correctly drained nodes

This patch changes slightly the output of gnt-cluster verify for drained
nodes, and also adds a note with the total number of drained nodes
(similar to the offline nodes note).

Reviewed-by: imsnah

5bf07049 02/10/2009 04:46 pm Iustin Pop

ConfigWriter: handle the drained node flag

This patch changes the master candidate pool computations in
ConfigWriter to properly handle drained nodes. They are now excluded
from counting towards the reachable number of candidates.

The patch also adds verification of consistency for the node status....

0b2454b9 02/10/2009 04:45 pm Iustin Pop

Allow query of the drained node attribute

This patch exports the drained attribute:
- LUQueryNodes accepts now the drained field
- RAPI exports it for node objects
- gnt-node info shows it now (along newly-added master_candidate and
offline flags)...

af64c0ea 02/10/2009 04:45 pm Iustin Pop

Add a ‘drained’ attribute to node objects

This attribute will be used to prevent any allocation on the node (any
of replace-disks with new secondary this node, failover to the node,
migration to the node).

The patch adds the attribute and initializes it correctly in cluster...

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

Some error message cleanups

Reviewed-by: imsnah

9c793cfb 02/10/2009 04:45 pm Iustin Pop

Cleanup of DRBD8._CheckMetaSize

This patch converts the _CheckMetaSize method to raise exceptions
instead of logging and returning False. This fits now in the new rpc
return types, so it's a cheap change.

Reviewed-by: ultrotter

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

7a6b9510 02/10/2009 03:40 pm Iustin Pop

RAPI: fix a pylint warning

Child classes of _R_TAGS must define TAG_LEVEL, but for good style let's
define it also here to at least ensure we don't get a 'Unknown
attribute' exception.

Of course, this also silences a pylint warning.

Reviewed-by: amishchenko

12649e35 02/10/2009 01:59 pm Guido Trotter

LUSetInstanceParams: use the correct hvparams

In LUSetInstanceParam we used to save the dict without defaults for the
instance params as hv_inst, but to use the populated one for the
instance (hv_new). Fixing this leads to instances without all the
parameters set....

5c418644 02/10/2009 12:53 pm Guido Trotter

KVM: Correct CheckParameterSyntax docstring

The comment is not really true anymore, as we have a lot of parameters

Reviewed-by: iustinp

9798fcae 02/10/2009 12:53 pm Guido Trotter

KVM: Fix _CallMonitorCommand error message

1) Only instance_name is available
2) There was a missing string parameter

Reviewed-by: iustinp

11344a50 02/09/2009 05:17 pm Guido Trotter

KVM: Add usb mouse type parameter

In some cases 'mouse' may work better than 'tablet', so we'll handle
both by allowing the user to specify a parameter. By default no mouse is

Reviewed-by: iustinp

8745c3d7 02/09/2009 05:16 pm Guido Trotter

KVM: allow netboot

With this patch we allow KVM instances to be booted off the network.
The only issue is that this is not compatible with virtio nics, so
we disallow them, when booting from the net.

Reviewed-by: iustinp

37f88dc6 02/09/2009 05:16 pm Guido Trotter

KVM: actually support different nic types

When executing the KVM runtime we load the nic type from the runtime
hvparams and use it to specify the nic model type. As for the disk we
translate the DEV_PARAVIRTUAL type to 'virtio'.

Reviewed-by: iustinp

c2672466 02/09/2009 05:16 pm Guido Trotter

KVM: export hvparams in the runtime

They'll be used to set the nic type when we execute the runtime, since
the nics are processed later. We need to save the hvparams because we
want to use the same one as when we saved the runtime, rather than use
the current instance ones, to avoid applying only some changed...

1213604d 02/09/2009 05:16 pm Guido Trotter

KVM: actually support different disk types

By passing the relevant if= value to the disk we support different disk
types. The only change is that we'll translate "paravirtual" to
"virtio" to keep only one "paravirtualized" value, around ganeti. The
if= value is calculated outside the disks loop, as it's the same for all...

5155ede7 02/09/2009 05:16 pm Guido Trotter

Xen-HVM: Improve the invalid disk/nic type error

Copy the message from the KVM one, adding a missing 'the' and a list of
possible values, to help the user in his decision.

Reviewed-by: iustinp