Statistics
| Branch: | Tag: | Revision:

root @ 377ae13e

# Date Author Comment
377ae13e 02/22/2012 03:12 pm Michael Hanselmann

http.server: Move error message formatting to handler class

Like before this patch moves more functionality from the actual server
class into a separate handler class. At the same time the function is
changed to return both content-type and body instead of relying on a...

cca5b3fc 02/22/2012 03:12 pm Michael Hanselmann

noded: Shorter docstring for mlockall(2) executor

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

e0003509 02/22/2012 03:12 pm Michael Hanselmann

Split handling HTTP requests into separate class

Until now HTTP requests were handled in the same class as incoming
connections (http.server.HttpServer). With this change the request
handling is delegated to a separate class which can be re-used in tests...

c81f452f 02/22/2012 03:12 pm Michael Hanselmann

http.server: Factorize request handling

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

09037780 02/22/2012 02:03 pm Michael Hanselmann

Remove deprecated “QueryLocks” LUXI request

This has been deprecated since Ganeti 2.4 and hasn't been used by
Ganeti's code since. I'm not aware of any external users.

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

48796673 02/21/2012 09:18 pm Michael Hanselmann

Add result checks for OpTags*

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

415feb2e 02/21/2012 05:34 pm René Nussbaumer

opcodes: Annotate the OP_RESULT of query operations

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

3ccb3a64 02/21/2012 05:23 pm Michael Hanselmann

Replace single- with double-quotes

In at least two cases "%s" is replaced with str(), too.

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

0f85ebd9 02/21/2012 04:34 pm Iustin Pop

Fix asyncnotifier unit tests

On my workstation, if I run the following two tests in this exact
order:

- TestSingleFileEventHandler.testError
- TestSingleFileEventHandler.testReplace

the second test will fail, because there is no "unregister" of
previous tests (and the poll() done by asyncore will fire on the...

3bd0f3d8 02/21/2012 04:32 pm Iustin Pop

Small fixup to rapi docstrings

The fast that most classes don't override the @cvars means that direct
references to FillOpcode can fail (they do on my workstation, but not
on buildbot?). Anyway, for safety, it's best to qualify the name.

Additionally a small typo is fixed....

09cbac87 02/21/2012 04:32 pm Iustin Pop

Small update to LogicalUnit.ExpandNames docstring

… to make even more obvious what's the difference between a declared
lock level with an empty list of locks and no lock level.

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

37e61a77 02/21/2012 02:35 pm Iustin Pop

Export ndparams in RAPI node query

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

8930b0f0 02/21/2012 02:33 pm Iustin Pop

Add ndp/* fields to group/node query

Also change the meaning of group ndparams to mean the actual (not
custom) nd params, and add custom_ndparams for the current meaning of
ndparams.

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

f25b8f58 02/21/2012 02:33 pm Iustin Pop

Export ndparams in iallocator

Strangely, these were not exported at all before.

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

a194dc28 02/21/2012 02:32 pm Iustin Pop

Add ipolicy parameter spindle_ratio

This will represent the instance (count) per spindle_count of their
node(s). Debatable whether we need to add a per-instance
spindle_weight.

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

432e8e2f 02/21/2012 02:32 pm Iustin Pop

Add new spindle_count node parameter

Currently this is not handled by Ganeti, just recorded.

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

2a27dac3 02/21/2012 02:30 pm Iustin Pop

Fix upgrading of ndparams

Currently, we only upgrade the ndparams if they are missing
completely, which creates problems if we add any new parameters on an
already-upgraded cluster.

Fix this by adding an UpgradeNDParams function.

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

765ada2b 02/21/2012 02:28 pm Iustin Pop

Small fixes to objects.UpgradeDiskParams

Fix a typo, and cleanup the code a bit.

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

202fb4e0 02/20/2012 06:57 pm Michael Hanselmann

opcodes: Add result checks for OpBackup*

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

5fa3d337 02/20/2012 02:57 pm Michael Hanselmann

Improve opcode result check test to have a whitelist

Only whitelisted opcodes may not have a result check.

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

82c54b5b 02/20/2012 01:27 pm Michael Hanselmann

config: Add check for disk's “iv_name”

This check verifies “iv_name” of all instance disks. If one is wrong
(which shouldn't happen in the first place), cluster verification will
warn:

“ERROR: cluster: Instance 'inst.example.com' has wrongly named disks:...

aa12a891 02/20/2012 12:50 pm René Nussbaumer

opcodes: Fix OP_RESULT for OobCommand

The result is a list of a list with elements with size of 2.

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

956631b6 02/17/2012 06:54 pm Michael Hanselmann

cli: Handle negative numbers when parsing key-value assignments

To remove the last disk, or to add a NIC to the end, one can use the
index 1. This wouldn't work as intended as “” is a special prefix.

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

5401c39d 02/17/2012 05:39 pm Michael Hanselmann

utils.text: Add function to truncate string

The function adds an ellipse if the string was actually truncated. Also
start using it in mcpu for result checks (where the message is also
slightly changed to use a colon).

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

8c2d770c 02/17/2012 03:16 pm Michael Hanselmann

Fix breakage introduced by fa6dd6bb56

Forgot “enumerate”.

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

0356a13d 02/17/2012 03:16 pm Michael Hanselmann

LUInstanceSetParams: Update disk's “iv_name”

When modifications are made, disks may not have the same index anymore.
Updating all disks fixes this.

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

35554b4f 02/17/2012 01:34 pm Michael Hanselmann

ApplyContainerMods: Fix issues with indices

When adding an item the index given to the callback function would be
incorrect under certain conditions. This patch also adds assertions and
more tests.

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

fa6dd6bb 02/17/2012 12:52 pm Michael Hanselmann

cmdlib: Remove some users of “iv_name”

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

e2569c1d 02/17/2012 12:52 pm Michael Hanselmann

ConfigWriter: Stop using “iv_name”

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

ea642319 02/17/2012 12:52 pm Michael Hanselmann

ConfigWriter.RenameInstance: Stop using iv_name, safer operation

Stop using the disk index encoded in “iv_name” when renaming an instance.

This patch also changes the code to operate on a copy of the instance
until the major changes have been applied. In the case of a failure we...

a71f835e 02/17/2012 12:52 pm Michael Hanselmann

gnt-instance modify: Support new-style NIC/disk modifications

This patch adds support for adding/removing NICs/disks at arbitrary
indices on the command line. To add a disk at a specified index, use
“--disk 3:size=16G”. To remove the second disk, use “--disk 2:remove”....

c363310d 02/17/2012 10:59 am René Nussbaumer

opcodes: Adding missing OP_RESULTs

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

ee938820 02/17/2012 10:59 am René Nussbaumer

mcpu: Make the op result exception more verbose

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

002f91c5 02/15/2012 05:16 pm Michael Hanselmann

cmdlib: De-duplicate code in _GenerateDiskTemplate

There has been a lot of duplicated code in _GenerateDiskTemplate,
and some cases of very similar, but not quite same duplicates. This
patch merges them.

Generating a disk's “logical_id” attribute is done via a...

a8e3e009 02/15/2012 05:16 pm Michael Hanselmann

Add unittest for cmdlib._GenerateDiskTemplate

This is in preparation to de-duplicating significant chunks of code in
cmdlib._GenerateDiskTemplate.

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

a85f23fa 02/15/2012 12:20 pm Michael Hanselmann

rapi.testutils: Add exported functions to verify opcode input/result

These can be used by third-party code to verify mock code. Further work
on mocks is forthcoming, so this is only a start.

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

e6a8d799 02/14/2012 02:44 pm Michael Hanselmann

cmdlib: Fix “unpack non-sequence” error

The callback is expected to return a two-valued tuple.

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

d505bc48 02/13/2012 08:04 pm Iustin Pop

Fix doc bug introduced in 12637df

Commit 12637df changed/generalised how we build fields in the sphinx
extension, however it resulted in this uncaught-so-far result:

$ echo QUERY_FIELDS_GROUP | ./autotools/docpp
<generator object BuildValuesDoc at 0x28fd370>...

bdd6931c 02/13/2012 07:17 pm Guido Trotter

htools: allow rbd disk template

Notes:
- it'd be nice if there was a way to automatically generate the
DiskTemplate list instead of manually specifying it. After all we
have C.diskTemplates
- Of course this actually does nothing, as for other...

efcfa99d 02/13/2012 07:16 pm Michael Hanselmann

ApplyContainerMods: Return changes from callbacks

… instead of passing the list of changes as a parameter.

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

cd79cd83 02/13/2012 05:44 pm Iustin Pop

Use the ipolicy constants for key names

Sorry, I missed this when I wrote the code originally.

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

c0f1033f 02/13/2012 05:20 pm Michael Hanselmann

LUInstanceSetParams: Convert to generic algorithm for NIC/disk changes

Unfortunately this got a bit messier than I intended, but then again it
cleans up a lot of messy code with heaps of local variables
(“this_nic_override”) and LU attributes (“nic_pnew”, “nic_pinst”). Most...

8301885b 02/13/2012 05:20 pm Michael Hanselmann

cmdlib: Add generic algorithm for modifying NICs/disks

While preparing this patch series I identified at least three different
implementations of the algorithm for adding/removing/changing
NICs/disks. These two functions and corresponding unittests provide a...

0813170b 02/13/2012 04:02 pm Michael Hanselmann

Fix unittest breakage after commit a2aadb34b

Thou shalt run “make check” before sending patches.

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

b8925b86 02/13/2012 03:25 pm Michael Hanselmann

LUInstanceSetParams: Assertion on disk template/disk changes

Disk changes aren't allowed at the same time as a disk template change.

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

a2aadb34 02/13/2012 03:23 pm Michael Hanselmann

OpInstanceSetParams: Make two type checks public

They'll be used for tests in cmdlib.py.

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

e9c3d864 02/13/2012 03:23 pm Michael Hanselmann

OpInstanceSetParams: Accept more flexible NIC/disk modifications

Start accepting a new form of NIC/disk modifications for adding/removing
arbitrary NICs/disks. Unlike before the index must always be given. An
index of “-1” stands for the last item.

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

bf629e45 02/13/2012 03:23 pm Michael Hanselmann

constants: Add constant for modifying existing NIC/disk

Until now it would not be possible to add/remove a NIC/disk in an
arbitrary position. This constant will be used in the data structures
necessary to add/remove arbitrary NICs/disks.

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

20a32e74 02/13/2012 03:23 pm Michael Hanselmann

opcodes: Add comments to two parameter tests

These comments appear in the RAPI documentation.

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

7ed400f0 02/10/2012 05:10 pm Stratos Psomadakis

rbd disk template documentation and manpages

Add documentation and modify manpages for the RBD disk template.

Signed-off-by: Constantinos Venetsanopoulos <>
Signed-off-by: Stratos Psomadakis <>
Signed-off-by: Iustin Pop <>...

631aedf9 02/01/2012 10:24 am Michael Hanselmann

Re-added constant mistakenly removed in 58f0ce16873

“INSTANCE_DOWN” is still being used.

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

f0fd35b1 02/01/2012 10:11 am René Nussbaumer

rapi.client: Removing constants not needed anymore

They were not referenced through the whole code and were marked internal
only.

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

ddc1de7c 02/01/2012 08:24 am Michael Hanselmann

Add stricter checks for OpInstanceSetParams.{nics,disks}

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

ff8067cf 02/01/2012 08:24 am Michael Hanselmann

Add ht.TMaybeListOf type check

Replaces some uses of TOr(TNone, TListOf(…)).

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

8f227489 02/01/2012 08:24 am Michael Hanselmann

Stricter check for OS modifications passed to OpClusterSetParams

Don't just check the first element of each item, but also make sure the
OS name is a string and not empty.

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

58f0ce16 02/01/2012 08:19 am Michael Hanselmann

LUInstanceSetParams: Allow no-op change of instance offline status

With this patch marking an instance already marked offline (or online)
as offline/online again becomes a no-op. Also removed the unused
INSTANCE_UP variable.

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

3016bc1f 01/31/2012 07:44 am Michael Hanselmann

OpInstanceSetParams: Merge {off,on}line_inst parameters

Instead of having two separate parameters, a single boolean parameter is
used. Unfortunately we need a third state to say “no change”, so the
value can be None, True or False (similar to other parameters). There...

784b6603 01/27/2012 05:44 pm René Nussbaumer

ipolicy: Make the keys of the dict consistent

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

827ac163 01/27/2012 04:56 pm Guido Trotter

N+1: verify using minimum memory

Since instances can be started, failed over and migrated with less than
their maximum memory N+1 will use the minimum memory for verification.

Note that this accounts only for the instances being moved being
resized, and not for the ones already on the node, as ganeti will not...

d4fcd298 01/27/2012 04:56 pm Guido Trotter

admin.rst: add information about maxmem/minmem

- Specify how maxmem and minmem are used at startup, failover and
migrate
- Add a paragraph about how to manually change the runtime memory, and
what Ganeti will and won't do automatically as of version 2.6...

2a50e2e8 01/27/2012 04:56 pm Guido Trotter

walkthrough.rst: updates for maxmem/minmem

- Fix two example outputs
- Improve N+1 resolution section specifying how different memories
affect N+1 calculation depending on the node

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

3c1e4af0 01/26/2012 08:45 pm Iustin Pop

Fix integer overflow in Node unittest

When using a really random "extra cpus" variable, this can overflow
(especially on 32 bit) and thus the final value can be < 0, thus the
test will fail to fail.

It doesn't make sense to test with huge values, so let's just generate...

e14ddb6e 01/26/2012 06:33 pm Guido Trotter

Use allow_runtime_chgs in cmdlib

- Report the attribute value in the hooks runtime variable.
- Use it to abort migration if not enough memory is available on the
target node.

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

8c0b16f6 01/26/2012 06:33 pm Guido Trotter

cli/opcodes: add a --no-runtime-changes migrate opt

This will be used for now to avoid ballooning memory at live migration time.

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

e57602c2 01/26/2012 06:33 pm Guido Trotter

Migrate/Failover: allow less-than-max-mem op

Failover works magically after we relax the check: the start operation
will just use less memory, if less memory is available.

For migrate we need to balloon down the source memory before the
migration, if the target node doesn't have enough capacity....

c113a9ab 01/26/2012 06:33 pm Guido Trotter

Failover and Migrate: acquire node resource locks

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

081d8528 01/26/2012 06:33 pm Guido Trotter

cmdlib._CheckNodeFreeMemory: return free memory

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

1b01390b 01/26/2012 04:30 pm René Nussbaumer

doc/rapi.rst: Document ipolicy parameter

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

e8fa4ff6 01/26/2012 03:34 pm Iustin Pop

Add vcpu_ratio definition to the IPolicy type

This will be "naturally" read in the JSON-based backends (Luxi/Rapi),
and we add explicit code for handling it in the Text backend.

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

487e1962 01/26/2012 03:34 pm Iustin Pop

Remove Node.mCpu, replaced with the ipol vcpu_ratio

Since the iPolicy contains the vcpu_ratio now, we can remove the
per-node mCpu value (which was the initial way to set this attribute).

Furthermore, we need to re-set the hiCpu value when changing the
policy....

5f3b040a 01/26/2012 03:34 pm Iustin Pop

Temporary fix for hspace's NPU calculation

hspace computes the NPU (normalised CPU units) via the
(used|pool|avail) VCPU divided by the (currently cluster-wide) max
vcpu_ratio.

However, in the future we'll have variable vcpu_ratios, so we can't
the calculation as such. We temporarily change to computing the...

284e9822 01/26/2012 03:34 pm Iustin Pop

Change meaning of the --max-cpu option

Instead of always overriding, we should update the nodes's maxcpu
setting only when the option is specified. Otherwise this will be read
from the cluster or from the Ganeti constant for non-live backends.

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

e54d6628 01/26/2012 03:34 pm Iustin Pop

Remove obsolete constant for vcpu_ratio

This is superseded now.

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

33e17565 01/26/2012 03:34 pm Iustin Pop

Re-indent code for readability

Otherwise the docstrings for members take too many lines.

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

90c2f1e8 01/26/2012 03:34 pm Iustin Pop

Track 'normalised' used CPUs in Cluster.CStats

This will be used in hspace for proper tracking of used/pool/unavail
npus.

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

76a20994 01/26/2012 03:34 pm Iustin Pop

Add a new type for holding allocation statistics

The current RSpec type doesn't cut it anymore (and it's used in other
places), so let's introduce a separate type for holding these
statistics.

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

80d7d8a1 01/26/2012 03:34 pm Iustin Pop

Switch over some hspace stats from RSpec to AllocInfo

This patch changes the allocation delta stats from RSpec to
AllocInfo. There's nothing interesting about it, but it should allow
more correct computations of Npus in hspace.

I also moved the AllocStats type alias from Cluster.hs to Types.hs...

37483aa5 01/26/2012 03:34 pm Iustin Pop

Expand the tiered alloc unittest to check allocation stats

This was missing before, so with the new metric (NCpus), it's a good
time to test this.

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

1e7acc3b 01/26/2012 03:34 pm Iustin Pop

Fix gnt-cluster modify check of passed options

… and add the disk_templates/vcpu_ratio new entries. Since the default
ispecs_* are dicts, we can't compare them to none.

Additionally, add a QA test for this case (empty cluster modify).

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

e6244d00 01/26/2012 03:34 pm Iustin Pop

Export the cluster ipolicy in iallocator

And remove a strange comment (the commit which introduced it,
d61df03e, doesn't explain it). Also document these new keys in
iallocator.rst.

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

976b78ba 01/26/2012 03:34 pm Iustin Pop

Add ipolicy_vcpu_ratio to command line

This allows changing this value from the command line.

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

ff6c5e55 01/26/2012 01:53 pm Iustin Pop

Add new ipolicy parameter vcpu_ratio

This adds the new parameter and changes the validation routines to
handle IPOLICY_PARAMETER value as floats. Very very ugly code :(,
should be redone much cleaner.

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

ffa339ca 01/26/2012 01:47 pm Iustin Pop

Clarification on what objects.InstancePolicy is

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

12378fe3 01/26/2012 01:47 pm Iustin Pop

Rename IPOLICY_PARAMETERS to IPOLICY_ISPECS

As opposed to the initial situation, the PARAMETERS will be more than
just the min/std/max ispecs. Let's rename it, before re-adding the
PARAMETERS constant with a different meaning.

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

ad0e078e 01/26/2012 01:46 pm Iustin Pop

Remove two extraneous imports

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

735e1318 01/25/2012 03:36 pm Michael Hanselmann

gnt-instance recreate-disks: Allow specifying new size

With this change a new disk size can be specified when recreating disks.

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

cf572b13 01/25/2012 03:24 pm René Nussbaumer

LUClusterSetParams: When ipolicy is updated warn for new violations

We need to loop over all node groups to apply their modification to make
sure that the new ipolicy actually affects their instance

Signed-off-by: René Nussbaumer <>
Reviewed-by: Guido Trotter <>...

68ab64cf 01/25/2012 03:24 pm René Nussbaumer

LUGroupSetParams: Warn if the new ipolicy will violate some ipolicies

If we modify the ipolicy we need to verify if any instance would now
violate the new ipolicy and warn about it. Any instance which already
violates the old one is ignored.

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

92ff96e8 01/25/2012 03:24 pm René Nussbaumer

cmdlib: Add a helper function for a set of violating instances

This helper will be used with the Op*SetParams and ipolicy verifications

Signed-off-by: René Nussbaumer <>
Reviewed-by: Guido Trotter <>

d04c9d45 01/24/2012 06:39 pm Iustin Pop

Rename ispecs-disk-templates to ipolicy-disk-templates

The ispecs (min/std/max) are different from the other ipolicy
variables (disk templates for now, more in the future). As such, let's
rename the ispecs-disk-templates to ipolicy-disk-templates for
consistency with this logical difference....

d62cbd3a 01/24/2012 03:57 pm Michael Hanselmann

fmtjson: A tool to format JSON data

While debugging an issue recently I had the pleasure of looking at a
long, single-line string of JSON data. This simple utility makes it
possible to format such data into a readable format.

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

7181fba0 01/23/2012 07:53 pm Constantinos Venetsanopoulos

Implement rbd disk template

Introduce the rbd disk template, which handles provisioning and
management of instance disks as block devices mapped to rbd volumes
on a RADOS cluster.

The rbd template is of type DTS_EXT_MIRROR, meaning rbd-based
instances can failover or migrate to any node, without...

447af814 01/23/2012 03:39 pm Nikos Skalkotos

Open VDI Port when spice_use_vdagent is enabled

To use the features spice agent provides, a dedicated virtio-serial
channel must be created in qemu-kvm. The communication between the agent
and the other spice components takes place over this channel.

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

c90d8e61 01/23/2012 03:17 pm Iustin Pop

Fix iallocator group objects

… this is yet another manual serialisation of objects :(

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

38a6e2e1 01/23/2012 03:02 pm Iustin Pop

Fix upgrading the cluster ipolicy

When running from git HEAD, just initialising the ipolicy when
non-existing is not good enough; we need to upgrade also missing keys,
etc.

This has downsides though, as it means we'll always 'rewrite' the
ipolicy, which might create silent data loss for unhandled changes...

f626cef4 01/23/2012 01:37 pm Michael Hanselmann

LUInstanceRecreateDisks: Actually acquire node resource locks

Before this change an assertion would fail as the resource locks weren't
actually acquired.

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

a81075bf 01/23/2012 01:21 pm Michael Hanselmann

cmdlib._CheckInstanceState: Use instance name in error message

The variable “instance” is an instance object, so to not get a
serialized version of the instance, the “name” attribute must be
used.

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

e53ea88d 01/23/2012 01:21 pm Michael Hanselmann

Unbreak build after merge 2ea64524ce

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

a24aed2a 01/23/2012 01:21 pm Michael Hanselmann

gnt-cluster command: Add option to prepend node name to output

With this patch a new option (“-M”, like dsh) is added to “gnt-cluster
command” to prepend the node name to all output lines.

$ gnt-cluster command -M uname -a | grep Linux
node18.example.com: Linux node18.example.com [...]...

e9ed4f2e 01/20/2012 07:55 pm Michael Hanselmann

cmdlib: Drop use of “len(…) != 0”

Found by Constantinos Venetsanopoulos.

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