Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib.py @ 97c61d46

History | View | Annotate | Download (251.6 kB)

# Date Author Comment
97c61d46 08/14/2009 12:26 pm Iustin Pop

Fix checks in LUSetNodeParms for the master node

There was a check already in the LU for the master node, however is
wasn't correct. This patch disallows any role changes on the master node
via LUSetNodeParms (and as this LU can't change anything else, it...

0d853843 08/12/2009 04:58 pm Iustin Pop

Ignore results from drained nodes in iallocator

Since drained nodes could be (partially or fully) broken in iallocator,
we ignore results from these nodes when building the cluster map in
preparation for sending it to the script.

This is a cheap change for the stable branch; ideally we should not...

aafb303d 08/10/2009 01:41 pm Guido Trotter

Add cluster-init --no-etc-hosts parameter

If --no-etc-hosts is passed in at cluster init time we set a new
parameter in the cluster's object to false, and avoid adding nodes to
the hosts file. The UpgradeConfig function is used to set the value to
True, when upgrading from an old configuration version....

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

export: add meaningful exit code

Currently ‘gnt-backup export’ always returns exit code zero, even in the
face of complete failure during backup (only failure to stop/start the
instance will cause job failure and thus non-zero exit code). This is
bad, since one cannot script the backup....

60975797 08/04/2009 05:36 pm Iustin Pop

Implement gnt-cluster check-disk-sizes

This patch adds a new opcode and lu for checking disk sizes. Currently
it does only top-level disk verification, and also doesn't check
primary/secondary node size mismatches (these two are added as TODOs in
the Exec() function of the LU)....

b4ec07f8 08/04/2009 05:35 pm Iustin Pop

Implement --ignore-size in activate-disks

This patch modified OpActivateDisks, LUActivateDisks and gnt-instance
activate-disks to support and pass this option to
_AssembleInstanceDisks.

The patch is quite trivial I think; there should be no issues from it...

e3443b36 08/04/2009 05:35 pm Iustin Pop

Add ignore size support in _AssembleInstanceDisks

This patch adds an optional parameter to _AssembleInstanceDisks that
allows ignoring of size information by making a copy of the disk
structure and setting the size to zero.

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

b0c63e2b 07/17/2009 03:42 pm Iustin Pop

Yet another fallout from the pylint fixes

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

3df6e710 07/17/2009 02:37 pm Iustin Pop

Fix another issue with hypervisor_name change

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

b119bccb 07/16/2009 04:40 pm Guido Trotter

Make sure enabled_hypervisors list is valid

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

fb4b324b 07/14/2009 06:07 pm Guido Trotter

_GenerateDiskTemplate: use base_index in the name

Currently if a disk is added later the base_index is not considered, and
all the disks are called disk0. This patch fixes it.

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

b8810fec 07/13/2009 05:01 pm Michael Hanselmann

cmdlib: Fix typo in LUQueryClusterInfo

This was broken by my pylint fixes patch.

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

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

a8ae3eb5 06/30/2009 07:33 pm Iustin Pop

Fix node readd issues

This patch fixes a few node readd issues.

Currently, the node readd consists of two opcodes:
- OpSetNodeParms, which resets the offline/drained flags
- OpAddNode (with readd=True), which reconfigures the node

The problem is that between these two, the configuration is inconsistent...

dec0d9da 06/30/2009 07:33 pm Iustin Pop

Cleanup config data when draining nodes

Currently, when draining nodes we reset their master candidate flag, but
we don't instruct them to demote themselves. This leads to “ERROR: file
'/var/lib/ganeti/config.data' should not exist on non master candidates...

e631cb25 06/30/2009 12:01 pm Iustin Pop

Fix error message for extra files on non MC nodes

Currently the message for extraneous files on non master candidates is
confusing, to say the least. This makes it hopefully more clear.

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

75e914fb 06/29/2009 04:01 pm Iustin Pop

Fix adjustement of candidates in cluster modify

The code for adjusting the candidate pool size was done after the config
update, and this means we triggered the save of the config file without
fixing the candidate pool, which aborts with an error.

The patch just moves it above. The old comment was valid, but we anyway...

c120ff34 06/29/2009 01:43 pm Iustin Pop

Add a new node list field

This patch adds a ‘role’ node list field, which shows a one-character
node status. This is a simpler way to see the node status than selecting
all the flags individually.

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

c1ce76bb 06/17/2009 06:21 pm Iustin Pop

Fix handling of 'vcpus' in instance list

Currently running “gnt-instance list -o+vcpus” fails with a cryptic message:
Unhandled Ganeti error: vcpus

This is due to multiple issues:
- in some corner cases cmdlib.py raises an errors.ParameterError but
this is not handled by cli.py...

6dfad215 06/17/2009 03:52 pm Iustin Pop

Fix checking for valid OS in instance create

The current check in LUCreateInstance.CheckPrereq() is wrong - it only checks
if we got an OS, but not if we got a valid OS. This patch fixes it.

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

c98162a7 06/17/2009 03:52 pm Iustin Pop

Show disk size in instance info

The size of the instance's disk was not shown in “gnt-instance info”.
This patch adds it and formats it nicely if possible.

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

39a02558 06/16/2009 06:03 pm Guido Trotter

LUQueryInstances: fix querying for nic data

Currently we support querying for "mac" "ip" or "bridge", meaning "the
one of the first nic. We are not checking that there is a first nic,
though, and thus could incur in errors. This patch fixes it by returning...

5ce92cd3 06/08/2009 12:53 pm Iustin Pop

Merge branch 'master' into next

  • master:
    Wait for a while in failed resyncs
    Fix two issues with exports and snapshot errors
fbafd7a8 06/04/2009 01:06 pm Iustin Pop

Wait for a while in failed resyncs

This patch is an attempt at fixing some very rare occurrences of messages like:
- "There are some degraded disks for this instance", or:
- "Cannot resync disks on node node3.example.com: [True, 100]"

What I believe happens is that drbd has finished syncing, but not all...

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

8a6c7011 05/28/2009 08:55 pm Iustin Pop

Set the size on new DRBDs in replace secondary

Currently the code in cmdlib doesn't set the device size to new DRBD
devices in replace secondary, but we need to do it otherwise it gets
initialized to None.

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

d27776f0 05/21/2009 05:34 pm Iustin Pop

Change failover instance when instance is stopped

Currently, if the instance is stopped, we still check for enough memory
on the target node. This is a little bit too strict, since in case too
many nodes have failed and one is out of the memory, this prevents...

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_*,...

f226f085 05/20/2009 04:14 pm Guido Trotter

Merge branch 'master' into next

Signed-off-by: Guido Trotter <>

88ae4f85 05/19/2009 02:02 pm Iustin Pop

IAllocator: export total disk size for instances

This patch adds for current instance a ‘disk_space_total’ key, similar
to the key for the new instance in case of new allocations.

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

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

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

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

ade0e8cd 05/12/2009 02:30 pm Guido Trotter

LUSetInstanceParam: don't assume memory is integer

LUSetInstanceParam currently assumes that the 'memory' value of a
call_instance_info result is an integer, while the rest of the code
explicitely converts it to int(). Converting it to int works around a...

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

3994f455 05/05/2009 11:33 am Iustin Pop

Fix argument checking in LUSetClusterParams

This patch fixes two issues with LUSetClusterParams and argument
checking.

First, this LU used the wrong function name (CheckParameters instead of
CheckArguments), which means that no parameter checking was done at all;...

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

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

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
issues:
- missing SGML tags (Issue 54), report and patch by superdupont
- wrong variable used in the init.d script, report and patch by
Karsten Keil <>...

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

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/constants.py), and
fixes a style on install.rst.

Reviewed-by: ultrotter

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

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

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

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

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

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

LUSetInstanceParams: Fix nic handling

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

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

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

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

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

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
configuration
- 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
style-compliant).

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

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

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

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

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

024e157f 02/09/2009 04:04 pm Iustin Pop

Add a new instance query flag ‘disk_usage’

This patch adds a new instance query flag called disk_usage that
retrieves the overall space used by an instance on each of its nodes.
This can be used when balancing the cluster or checking N+1 status.

The flag is also exported in RAPI. Note the flag is currently broken for...

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

0105bad3 02/09/2009 12:41 pm Iustin Pop

Export the cpu nodes and sockets from Xen

This is a hand-picked forward patch of commit 1755 on the 1.2 branch
(hand-picked since the trees diverged too much since then):

The patch changed the xen hypervisor to compute the number of cpu
sockets/nodes and enables the command line and the RAPI to show this...
0959c824 02/09/2009 11:24 am Iustin Pop

cmdlib: simplify some rpc error handling cases

By using the RemoteFailMsg() or the payload field of RpcResult, we can
simplify a few functions in cmdlib.

Reviewed-by: ultrotter

4978db17 02/09/2009 11:24 am Iustin Pop

LUCreateInstance: only set running flag at the end

In lockless queries, it's better if we see the instance in ADMIN_down
rather than ERROR_down during the time it's installed. As such, we
change the LU to only mark the instance 'up' at the time we are ready to...

bc8e4a1a 02/04/2009 05:11 pm Iustin Pop

Enable lockless node queries

Similar to the instance list, this patch enables lockless node queris.
“gnt-node list” accepts now the “--sync” flag which enables locking, the
default is lockless.

Reviewed-by: imsnah

ec79568d 02/04/2009 12:30 pm Iustin Pop

Implement lockless query operations

This patch adds the framework for, and enables lockless OpQueryInstances. This
means that instances will be shown in ERROR_up or ERROR_down state, even though
this is not an error (but just an in-progress job).

The framework is implemented as follows:...

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

bafc1d90 02/03/2009 12:55 pm Iustin Pop

Small patch for handling errors in node add

This small path hopefully fixes the handling of ssh verify errors in
node add (note: untested).

Reviewed-by: ultrotter

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

7a735d6a 02/01/2009 11:48 am Guido Trotter

LUQueryClusterInfo: filter hvparams

We don't need to show hvparams for hypervisors which are not enabled on
the cluster.

Reviewed-by: iustinp

2928f08d 01/29/2009 05:51 pm Guido Trotter

LUAddNode: copy the vnc password file also for KVM

Before we used to copy the file if xen-hvm was enabled on the cluster,
no we'll do that if any enabled hypervisor is in the new HTS_USE_VNC
group.

Reviewed-by: iustinp

5431b2e4 01/29/2009 05:47 pm Guido Trotter

GetShellCommand: get hvparams and beparams

Sometimes the hypervisor will use the instance hv and/or be parameters
to determine the best shell command. This is not possible, though,
currently, as the instance hv/beparams are not filled, so we have to
pass the filled versions separately....

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

a7f5dc98 01/29/2009 05:08 pm Iustin Pop

LUQueryInstances: keep the given order of names

Currently LUQueryInstances keeps the ordering of instances only in some cases,
and in others it will reorder the list. This patch fixes this by more clearly
separating the various cases (names passed or not and locking or not locking),...

68c6f21c 01/28/2009 09:06 pm Iustin Pop

Fix gnt-cluster modify -H and offline nodes

Reviewed-by: ultrotter

6ec66eae 01/27/2009 05:41 pm Iustin Pop

Fix the mode attribute of newly-created disks

Currently, only the LUSetInstanceParams correctly sets up the mode
attribute via a manual operation. We remove this and instead do the
correct setting in the generic _GenerateDiskTemplate function, so that
we set the mode correctly for all disk creations....

9939547b 01/23/2009 03:33 pm Iustin Pop

Fix batcher for 2.0-style disks and nics

This patch fixes the gnt-instance batch-create command, and in doing so
also slightly changes two other functions:
- we change utils.ParseUnit so that it accepts integer values also
(both ParseUnit(5) and ParseUnit("5") return the same value)...

1325da74 01/23/2009 02:36 pm Iustin Pop

Make iallocator work with offline nodes

This patch changes the iallocator framework to work with and properly
export to plugins offline nodes. It does this by only exporting the
static configuration data for those nodes, and not attempting to parse
the runtime data....

3b559640 01/23/2009 02:36 pm Iustin Pop

Remove checking of DRBD metadata for validity

Currently the DRBD code checks that the metadata devices are valid
before creation, initial disk attachment and add children.

However, the process for checking validity requires a free DRBD minor,
and this conflict with parallel checking....