Statistics
| Branch: | Tag: | Revision:

root / lib @ 4c91d2ad

# Date Author Comment
4c91d2ad 11/01/2012 03:00 pm Iustin Pop

Improve logging of new job submissions

This addresses issue 290: when receiving new jobs, logging is
incomplete, and we don't have the job ID and/or summaries
logged. Only later, when the job is queried for or being processed, we
know more.

This is not good when troubleshooting, so let's improve the initial...

a9d40c65 11/01/2012 03:00 pm Iustin Pop

Improve handling of lock exceptions

There are two issues with lock exceptions right now:

- first, we don't log the original error; this is fine for now
(locking.py always returns the same error here), but in general is
brittle: if locking.py would start returning more information, we'd...

0d324688 10/30/2012 04:07 pm Iustin Pop

Fix runtime memory increases

Commit 2c0af7da which added the runtime memory changes functionality
had a small typo (wrong name); I've rewritten this to only compute the
delta once, for simplicity.

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

8e66b9bf 10/30/2012 02:17 pm Iustin Pop

Fix validation of vgname in OpClusterSetParams

This variable can be empty, when we want to disable LVM, so we can't
use TMaybeString.

Fixes issue 285.

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

e5dfc531 10/30/2012 02:17 pm Iustin Pop

Fix removal of storage directory on shared file storage

This patch makes _RemoveDisks symmetric to _CreateDisks with respect
to file-based storage: _CreateDisks uses "in constants.DTS_FILEBASED",
whereas _RemoveDisks was not update and only uses "==
constants.DT_FILE". This results in stale directories left on the...

15361a18 10/30/2012 02:17 pm Iustin Pop

Switch non-redundant check to disk template-based

Currently, the warning/notice about non-redundant instances in cluster
verify is based non empty secondaries list (how old is this?); the
proper way to check this nowadays is via DTS_MIRRORED.

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

6022a419 10/29/2012 01:59 pm Iustin Pop

Add option to force master-failover without voting

This fixes issue 282.

Signed-off-by: Iustin Pop <>
Reviewed-by: Bernardo Dal Seno <>

d976957d 10/26/2012 11:06 am Iustin Pop

Update instance modify message

Currently the message does not say explicitly that instance-initiated
reboots are useless to trigger the use of new parameters, per the
thread on the user mailing list. Let's improve it a bit.

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

ba147ff8 10/19/2012 04:57 pm Iustin Pop

Fix disk adoption interaction with ipolicy checks

In Ganeti 2.6, disk adoption is broken due to the ipolicy checks being
done before we read volume size from remote nodes. We fix this by
simply moving these checks to after the disk adoption code which
updates the disk size; it's not that nice that we fail a (almost)...

9b99be28 10/11/2012 12:15 pm Michael Hanselmann

verify-disks: Explicitely state nothing has to be done

Example output:
$ gnt-cluster verify-disks
Submitted jobs 4327
Waiting for job 4327 ...
No disks need to be activated.

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

50c1e351 10/05/2012 07:32 pm Bernardo Dal Seno

Better list of replace-disks arguments + typos fixed

The man page and the bultin-in help for gnt-instance replace-disks were
inconsistent. Also fixed some typos in man pages.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Michael Hanselmann <>

e4cf42d4 10/05/2012 07:14 pm Michael Hanselmann

jqueue: Look at archived jobs when watching

First: This enables the use of “gnt-job watch $id” for archived jobs.

Now, the reason for actually making this work is that during
sufficiently large group or node evacuations jobs are archived before
the client gets to poll for their output. This led to situations where...

f0f8d060 10/04/2012 02:58 am Michael Hanselmann

Show old primary/secondary node on disk replacement

People unfamiliar with Ganeti's internals might be confused with the
different hostnames showing up later in the process.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

64be07b1 10/03/2012 06:00 pm Michael Hanselmann

gnt-instance reinstall: Don't always exit with success

If one or more jobs failed the exit status should be set accordingly.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

2ef3383e 10/03/2012 05:58 pm Michael Hanselmann

LUClusterVerify: Ignore /proc/drbd if DRBD is disabled

This fixes issue 190. The problem was that the check for DRBD was
enabled if LVM storage is used and didn't depend at all on whether DRBD
is enabled.

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

320a5dae 09/27/2012 05:41 pm Bernardo Dal Seno

Always_failover doesn't require --allow-failover anymore

If an administrator sets always_failover, it means that there is no need
for another explicit approval to failover instead of migrating.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Michael Hanselmann <>...

0e2b7c58 09/12/2012 04:15 pm Michael Hanselmann

rpc: Remove duplicated logic, fix unittests

Commit 5fce6a89 changed RpcRunner._InstDict to add the disk parameters
on all encoded instances. It didn't remove a special case in
“_InstDictOspDp”. Update and fix unittests as well.

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

5fce6a89 09/12/2012 02:39 pm Constantinos Venetsanopoulos

Annotate disk params on instance_start

We call _GatherAndLinkBlockDevs during the process, which in turn
calls _RecursiveFindBD. This needs disk parameters to work.

See also commit b8291e0.

This was reported by Ansgar and Damien.

Signed-off-by: Constantinos Venetsanopoulos <>...

ef86bf28 09/12/2012 01:48 pm Michael Hanselmann

cmdlib: Handle locking.ALL_SET correctly when copying locks

When locks are copied “locking.ALL_SET” must be handled separately
(ALL_SET has the value None). Reported by Constantinos Venetsanopoulos
who saw failover for RDB-based instances not working.

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

09123222 09/04/2012 02:22 pm René Nussbaumer

Fix gnt-debug iallocator

There was an issue with the recent ipolicy introduction which lead to a
bug in gnt-debug iallocator. It was not providing the spindle_use field
and therefore it wont let you create a valid iallocator request.

Signed-off-by: René Nussbaumer <>...

8ad0da1e 09/03/2012 07:09 pm Iustin Pop

Fix warnings/errors with newer pylint

To help developing Ganeti on newer distributions, let's try to fix
pylint warnings/errors. I'm using pylint from current Debian wheezy:
pylint 0.25.1, astng 0.23.1, common 0.58.0, and we have 3 things that
needs fixing....

fc3f75dd 09/03/2012 06:18 pm Iustin Pop

Fix decorator uses which crash newer pylint

Pylint version:

pylint 0.25.1,
astng 0.23.1, common 0.58.0

crashes when passing the fully-qualified decorator name with:

File "/usr/lib/pymodules/python2.7/pylint/checkers/base.py", line 161, in visit_function...
6a3166cb 08/22/2012 03:18 pm Constantinos Venetsanopoulos

Fix computation of disk sizes in _ComputeDiskSize

Currently, hail fails with FailDisk when trying to add an instance
of type: 'file', 'sharedfile' and 'rbd'.

This is due to a "0" or None value in the corresponding dict inside
_ComputeDiskSize, which results in a "O" or non Int value of the...

f08e5132 08/15/2012 12:59 pm Iustin Pop

Add verification of RPC results in _WipeDisks

Due to an oversight, the pause/resume sync RPC calls in _WipeDisks
lack the verification of the overall RPC status, and directly iterate
over the payload. The code actually doing the wipe does verify
correctly the results. This can result in jobs failing with a hard to...

7db596df 08/10/2012 06:02 pm Iustin Pop

Fix double use of PRIORITY_OPT in gnt-node migrate

This breaks the command, as optparse considers that an error.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

2ed0e208 07/27/2012 12:16 pm Iustin Pop

Fix 'explicitely' common typo

It seems that 'explicitely' is wrong, and that the right form is
'explicitly'. This is just fixing the typo plus adjusting affected
paragraphs.

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

350506c6 07/26/2012 06:38 pm Iustin Pop

Fix issue in LUClusterVerifyGroup with multi-group clusters

In case LUClusterVerifyGroup is run on a group which doesn't contain
the master node, the following could happen:

- master node is selected due to the explicit check
- if the order of nodes in the 'absent_nodes' list is such that the...

4bf27dab 07/26/2012 06:33 pm Iustin Pop

Fix node group modification of node parameters

Commit 904b3bfe tried to fix the deletion of custom ndparams from
group, but instead broke both modification and deletion: because we
run ForceDictType on self.op.ndparams instead of the updated
new_ndparams, we can neither delete nor set properly spindle_count...

7d5ceafd 07/25/2012 12:42 pm Iustin Pop

Merge commit 'v2.5.2' into stable-2.6

  • commit 'v2.5.2':
    Fix RST formatting in NEWS file
    Update NEWS and bump version for release 2.5.2
    Fix boot=on flag for CDROMs
    KVM: only pass boot flag once

Conflicts:
NEWS (trivial, merged the entries)...

24be50e0 07/24/2012 06:10 pm Iustin Pop

Fix boot=on flag for CDROMs

This generalises commit 4304964a to cdroms too, since they have
somewhat the same logic. We just abstract the needs_boot_flag into a
separate variable, and then reuse it in the cdrom section.

Note that the logic of what 'if=' type to pass to KVM was very...

2b846304 07/24/2012 06:10 pm Iustin Pop

KVM: only pass boot flag once

This addresses issue 230: passing two methods of booting to KVM can,
depending on the KVM version, confuse it.

Note that commit 4304964a introduced a partial fix for this (but only
for disks, and keyed on KVM versions). However, it didn't fix cdrom...

8b057218 07/19/2012 03:15 pm René Nussbaumer

Fix setting ipolicy on node groups

On node groups we don't have the std field. However, the InstancePolicy
object always verifies that the std value is within a given range. As we
fill it up with defaults if not set (as it happens to be on node groups)
and the min value is higher than the default std value (taken from...

2da31181 07/19/2012 12:22 pm Iustin Pop

Fix --no-headers for the new list-drbd command

Sorry, I forgot that with GenerateTable this needs to be handled
manually. Fixed now and tested in both ways.

(But to be honest, this should be abstracted in GenerateTable, instead
of the 'if' test in all its callers.)...

7acbda7b 07/19/2012 11:11 am Iustin Pop

Add a new gnt-node command list-drbd

This uses confd to query the DRBD minors, which is very special; no
other command currently does so.

Since the backend is only implemented in the Haskell version of confd,
we have checks that 1) confd is enable, and 2) hs confd is also...

792f8e55 07/19/2012 11:02 am Iustin Pop

Add a new unused confd query

This is not implemented currently.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

5c755a4d 07/19/2012 11:01 am Iustin Pop

Fix a docstring in bdev's DRBD8 class

It seems this was not updated since the move to static minors…

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

5dbee5ea 07/18/2012 03:47 pm Iustin Pop

Ensure that disk.params is always defined (and a dict)

Commit cce46164 fixed upgrading from other 2.6 versions, but
accidentally broke upgrading from 2.5 (disk.params was left as None,
which breaks FillDict). The simplest way to handle params is to always...

1b5b1c49 07/18/2012 02:42 pm René Nussbaumer

Another small consistency fix with if branches

While looking at the testability of this piece of code, I found another
consistency problem. We have two if branches instead of one, with
elif's.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

734a2a7c 07/18/2012 02:01 pm René Nussbaumer

Fix inconsistency in the LUXI protocol w.r.t. args

This inconsistency was found during rebalancing. Hbal failed because,
Ganeti couldn't load the opcode. After digging through the cause, an
inconsistency with the "args" field in the LUXI protocol was triggered...

cce46164 07/17/2012 03:56 pm René Nussbaumer

Fix UpgradeConfig of Disk object regards disk params

This bug was found during disk parameter debugging. While looking at the
config some values seem present on the disk parameters, but that's not
expected behaviour. This patch fixes this, and also fixes the "broken"...

96c3d5d4 07/13/2012 02:41 pm René Nussbaumer

Allow reinstall even when secondaries are offline

Signed-off-by: René Nussbaumer <>
Reviewed-by: Agata Murawska <>

03e5cdd5 07/11/2012 03:21 pm Agata Murawska

Ignore offline node errors when removing disks

When we delete DRBD disks from some instance, we do not want to get
errors due to nodes other than that instance's primary being offline.

Signed-off-by: Agata Murawska <>
Reviewed-by: Iustin Pop <>...

d908ba61 07/07/2012 11:16 am Iustin Pop

Allow instance disc activation with offline secondaries

Currently, this is not allowed, so one can't run a replace-disks; this
breaks any non-invasive method of recovering the redundancy of the
instance if its disks are already stopped (but it still works if the...

28a45bfc 07/06/2012 03:29 pm René Nussbaumer

RAPI regression beparams/memory fix

For compatibility with the old Ganeti version, we want to keep the
beparams/memory field around for another release. This patch fixes this
regression.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

cc706abc 07/05/2012 11:41 am Iustin Pop

Fix redistribution of files w.r.t. offline nodes

Currently, _RedistributeAncillaryFiles computes two lists: the list of
online nodes (for all files redistribution), and the list of
vm_capable nodes, for hypervisor-specific files. However, the
vm_capable list includes offline nodes too, leading to warning...

770461fe 07/05/2012 11:35 am René Nussbaumer

Fix cluster verify error on master-ip-setup script

This error does not show up until we exceed the pool of master
candidates and have nodes which are not master candidates.

The background is that we check for master-ip-setup script on master
candidates and expect them not to be on the other nodes. However, we...

f0d22861 06/29/2012 11:38 am Constantinos Venetsanopoulos

Allow param `modify' during gnt-instance modify

With the new gnt-instance modify syntax for addition and removal of
disks/NICs on arbitrary indexes, we hit an assertion if the user
passes `modify' as one of the disk's parameters. E.g::

gnt-instance modify --disk 2:modify,size=3G instance1...
b8291e00 06/28/2012 11:04 am René Nussbaumer

Annotate disk params on instance_os_add

We call _OpenRealBD during the process and this needs disk parameters to
work. This was reported by Constantinos.

The fix is very ugly though.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

55de1d68 06/27/2012 11:03 am René Nussbaumer

Annotate disks upon blockdev_shutdown

Signed-off-by: René Nussbaumer <>
Reviewed-by: Agata Murawska <>

4504bfcb 06/27/2012 11:03 am René Nussbaumer

Annotate disks on blockdev_remove

This annotates the disks for the blockdev_remove where it is
appropriate. It leaves out 2 cases were we can't reliably annotate disk
parameters due to lack of knowledge what we should annotate. Those cases
affects only lvs used for drbd, so it doesn't affect the bug reported by...

b5cbddd9 06/27/2012 11:02 am René Nussbaumer

Annotate disk params on blockdev_getmirrorstatus_multi

This is also related to the bug reported by Constantinos,
as we've only one getmirrorstatus_multi call in whole cmdlib, we just
annotate them while we are building the disk list.

Signed-off-by: René Nussbaumer <>...

70817cee 06/27/2012 11:02 am René Nussbaumer

Annotate disk parameters on blockdev_getmirrorstatus

Not annotating them works for DRBD but not for RBD as reported by
Constantinos.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Agata Murawska <>

80b898f9 06/20/2012 11:03 am Iustin Pop

Fix bug in instance net changes

_PrepareNicModification returns the invalid type, which triggers an
assert resulting in a mysterious error:

Failure: command execution error:

Without any explanation. We fix this by removing the return value from
_PrepareNicModification, and instead returning the expected type...

e0b57a5c 06/19/2012 02:02 pm Michael Hanselmann

bdev: Fix DRBD error reporting for syncer rate

The function is supposed to return a list, not a string. Without this
patch the error message ends up as “C, a, n, ', t, , c, h, a, n, g, e,
…”.

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

0fb66bb1 06/18/2012 02:48 pm Iustin Pop

Fix inconsistent punctuation in rapi docs and opcodes

While reviewing the RAPI docs (for commit 003306f9), I realised that
the punctuation used in RAPI is inconsistent, especially with regards
to definition lists.

This patch changes all such lists to not have punctuation, except for...

003306f9 06/15/2012 05:38 pm Iustin Pop

Export more information in RAPI group queries

Sadly we don't have a way to test that, for example, all
(G|N|I)Q_CONFIG fields are exported in RAPI, so for now we don't test
this; but we should, in the future.

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

32be86da 06/15/2012 04:48 pm René Nussbaumer

Verify user supplied dicts against defaults

This verifies the user (especially in nested dicts) does not
provide a key which is not seen in the defaults dict for that dict.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

e4a4391d 06/15/2012 04:48 pm René Nussbaumer

Verify the options on diskparameters

This prevents from setting for example drbd options on the plain disk
template.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

ad48eacc 06/14/2012 02:18 pm Michael Hanselmann

query2: Add <, >, <=, >= comparison operators

These can be used, for example, to get jobs submitted after a certain
timestamp.

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

d8960502 06/14/2012 01:04 pm Iustin Pop

Fix creation of plain instances with --no-wait-for-sync

As reported on the devel mailing list by Christos Stavrakakis,
creation of plain instances is broken when the --no-wait-for-sync flag
is passed, because in that case WaitForSync is not called, hence...

3bc145d8 06/12/2012 04:52 pm Bernardo Dal Seno

Fixed typos, formatting, etc and added a comment

This patch only touches comments and man pages.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Iustin Pop <>

5c3d5dfd 06/12/2012 01:02 pm Iustin Pop

Fix epydoc raises L{...} usage

For epydoc raise statement, it already expects an exception which will
be hyperlinked; if passing an L{…} construct, it will instead break
the formatting (the @raise will not be recognised, but merged into the
previous paragraph)....

be0b29bd 06/11/2012 05:52 pm Iustin Pop

Merge branch 'stable-2.5' into stable-2.6

  • stable-2.5:
    Fix race condition in test for *FileID functions
    Move KVM keymap from GenerateRuntime to ExecuteRuntime
    Add the keymap directory to the list of runtime KVM dirs

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

839642c2 06/11/2012 04:29 pm Iustin Pop

Move KVM keymap from GenerateRuntime to ExecuteRuntime

Per issue 243, "side-effects" are GenerateRuntime are bad as they
execute only on the initial node of the instance. By moving the
write-out of the keymap file to ExecuteRuntime, it will be done both
at start and at migrate time....

2911f46c 06/11/2012 04:29 pm Iustin Pop

Add the keymap directory to the list of runtime KVM dirs

Commit 4f580fef added the keymap support, but missed that this
directory needs to be ensured/created at hypervisor init time.

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

b59092f7 06/08/2012 05:33 pm Iustin Pop

Improve error message for auto-promote/node modify

This has been reported internally 3-4 times already, and the current
version (from 8b437a6e) is still not good enough, it seems.

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

c09254c2 06/08/2012 02:02 pm Iustin Pop

Move the ssconf file prefix constant to constants.py

This way, it can be reused in the Haskell code too.

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

e375fb61 06/01/2012 06:12 pm Iustin Pop

Fix a type issue and bad logic in cluster verification

Commit 2e04d454 introduced the new offline state for the instance
state, but being a big monolithic patch it sneaked in something that
doesn't make sense.

The checks for extra instances (either wrongly up or just unknown) are...

0625d08f 05/31/2012 12:09 pm René Nussbaumer

Support xl as a xen interface command

xm and xl are mostly compatible, there is just a change in migrate,
which for now we simple bridge by comparing the command string.

Also XEN_CMD is now set during configure time. This will then be fixed
in Ganeti 2.7 when we make it an hvparams....

592eb0df 05/30/2012 02:08 pm René Nussbaumer

Fix GenericCurlConfig when pycurl is linked against nss

Redhat links its pycurl against NSS/ so this check fails and therefore
makes ganeti-watcher unusable.

Even though this seems to fix the problem and works, further testing on
this might be needed.

Signed-off-by: René Nussbaumer <>...

a1cef552 05/29/2012 03:48 pm Iustin Pop

Document that the disk/hypervisor state is not used

This didn't get completed in time for 2.6, so we document that it's
not working as is. Well, it's not broken, just not used by anything.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

40b068e5 05/29/2012 12:12 pm Iustin Pop

Re-wrap some lines in watcher code

These were using exactly 80 chars, and I like them smaller.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

ef40c537 05/22/2012 02:01 pm René Nussbaumer

_MaybeParseUnit: The elements are dicts not arrays

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

cd415612 05/22/2012 11:25 am René Nussbaumer

Make it possible to reset vcpu/spindle ratio to default

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

ff39194f 05/22/2012 11:17 am Iustin Pop

Add man page documentation for cpu_mask hv parameter

This is adapted from the design doc.

Also fixes a typo in cmdlib.py.

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

eb70f6cf 05/22/2012 10:56 am René Nussbaumer

gnt-group: Adding vcpu/spindle ratio to ipolicy flags

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

31d827d1 05/22/2012 10:56 am René Nussbaumer

gnt-cluster modify: Add ipolicy for spindle ratio opt

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

ad5cc6bd 05/22/2012 10:56 am René Nussbaumer

cli: Add ipolicy_spindle_ratio to CreateIPolicyFromOpts

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

83d4ba5e 05/21/2012 12:21 pm René Nussbaumer

gnt-instance info: Rework beparams listings

This patch reworks the beparams listing to the new style. However, due
to this process the naming of the fields with mixed casing changed to
lowercase and is therefore not 100% compatible with the previous versions....

38ef0c2c 05/15/2012 06:48 pm Michael Hanselmann

constants: Add FIXME regarding CPU pinning bitfield

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

0c2e59ac 05/15/2012 02:38 pm Iustin Pop

Beautify disk ipolicy violations in cluster-verify

Currently, we only get:

instance3: ['disk-size value 512 is not in range [1024, 1048576]'

which doesn't explain which disk we are talking about. This patch
extends the verification functions to take an additional parameter...

0fd5547a 05/15/2012 02:38 pm Iustin Pop

Fix _ComputeNewInstanceViolations logic

This function did the opposite: was computing which old instance
violated the specs but no longer do it now. new - old is the expected
behaviour.

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

ea0f78c8 05/15/2012 02:38 pm Iustin Pop

Beautify a couple of error messages

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

703fa9ab 05/15/2012 02:38 pm Iustin Pop

Move some ipolicy functions from objects to cli

These are only used in CLI programs to parse command line options and
such they do not belong in object.py (I will change them more and I
don't want to add more code in objects.py).

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

d67e0a94 05/15/2012 02:38 pm Iustin Pop

Allow units in ipolicy disk/mem CLI changes

This makes "gnt-cluster modify --specs-mem-size max=16g" work. The
downside (due to how we iterate) is that error messages are not very
clear:

$ gnt-cluster modify --specs-mem-size max=16a
Failure: prerequisites not met for this operation:...
e78a6817 05/14/2012 06:34 pm Michael Hanselmann

LUInstanceCreate: Run rename script on instance import

If an instance is imported with a different name, network settings may have to
be changed. Since import scripts may not already to the right thing, we decided
to run the rename script. The same technique is already used for inter-cluster...

7228ca91 05/14/2012 02:51 pm René Nussbaumer

gnt-group add: Fix diskparam fill

This was a pretty non-obvious bug. A cluster looks sane after
gnt-cluster init, however on a daemon restart the diskparameters had the
default filled in. The same applies to gnt-group add. This is due to the
nature that UpgradeConfig() from NodeGroups did just populate them with...

b3230b32 05/14/2012 02:51 pm René Nussbaumer

gnt-group modify: Fix an update issue with diskparams

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

216d23c0 05/11/2012 05:20 pm René Nussbaumer

gnt-group: Add info command

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

64da5a53 05/11/2012 05:20 pm René Nussbaumer

cli: Make FormatParameterDict recursive

This is useful if you have nested parameter dicts like in diskparams.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

2c758845 05/11/2012 05:20 pm René Nussbaumer

query: Expose diskparamters through query

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

f9bbf32b 05/11/2012 05:20 pm René Nussbaumer

gnt-cluster info: Print and format disk parameters

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

615b7a0f 05/11/2012 05:01 pm Iustin Pop

Merge branch 'devel-2.5'

  • devel-2.5:
    Update NEWS and bump version for 2.5.1 release
    Fix gnt-group --help display
    Fix hardcoded Xen kernel path
    Fix grow-disk handling of invalid units
    Accept both PUT and POST in noded
    Preserve bridge MTU in KVM ifup script...
5fa90892 05/11/2012 04:40 pm Iustin Pop

Merge commit 'v2.5.1' into devel-2.5

  • commit 'v2.5.1':
    Update NEWS and bump version for 2.5.1 release
    Fix gnt-group --help display
    Fix hardcoded Xen kernel path
    Fix grow-disk handling of invalid units
    Accept both PUT and POST in noded
    Preserve bridge MTU in KVM ifup script...
1a63f285 05/11/2012 03:38 pm Iustin Pop

Remove some duplicate code in the Xen config writing

Should be straightforward; the only difference from before is that we
will remove the 'auto' file even during migration finalise.

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

3ad56046 05/11/2012 12:03 pm Iustin Pop

Fix gnt-group --help display

Copy-paste mismatch :)

Signed-off-by: Iustin Pop <>
Reviewed-by: Bernardo Dal Seno <>
(cherry picked from commit 36c70d4ddc508dd1ffdcc806d617d5100f4cb265)

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

3ac3de7a 05/11/2012 12:03 pm Iustin Pop

Fix hardcoded Xen kernel path

We already have a ./configure-time variable for this, but it seems to
be actually unused.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>
(cherry picked from commit 3c4afa2e93d9499ce39c1aed575dacb549d35083)...

b53874cb 05/11/2012 12:03 pm Iustin Pop

Fix grow-disk handling of invalid units

The reason why grow-disk was doing:

$ gnt-instance grow-disk instance3 0 -64
Unhandled Ganeti error: Invalid format

Is because it does it's own ParseUnit call, and doesn't transform that
into a nicer message.

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

37c4d509 05/11/2012 12:03 pm Iustin Pop

Accept both PUT and POST in noded

This is a partial cherry-pick from
7530364ddbe949bc34fc26f25ba3f5d921beb021 on master:

Currently, noded requires PUT, even though the semantics of the RPC
calls do not match a PUT. We change the code accept both PUT and POST,...

0fc1764f 05/11/2012 12:02 pm Michael Hanselmann

Update synopsis for “gnt-cluster repair-disk-sizes”

Mention that instances can be passed on the CLI when “--help” is used.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Andrea Spadaccini <>
(cherry picked from commit eb5ac108d146644200df98b9f90dae003dcea426)...