Statistics
| Branch: | Tag: | Revision:

root / lib @ 3d942d8b

# Date Author Comment
3d942d8b 01/25/2013 12:58 pm Michael Hanselmann

hv_xen: Abstract running Xen commands

Instead of using the “XEN_CMD” constant in multiple places, that is now
all in a single place and can easily be changed for unit tests (through
a parameter given to the constructor).

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

89c4e365 01/25/2013 12:57 pm Michael Hanselmann

Merge branch 'devel-2.7'

  • devel-2.7:
    hv_xen: Remove config after shutdown was successful

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

effc9cad 01/24/2013 08:30 pm Helga Velroyen

List networks: call client explicitely

This way, it is easier to make it call the haskell
implementation of the network queries.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Michael Hanselmann <>

4b8b172d 01/24/2013 03:35 pm Michael Hanselmann

hv_xen: Remove config after shutdown was successful

If stopping an instance failed, the configuration would already be gone
and other operations depending on it (e.g. migration) would no longer
work. With this patch the configuration file is only removed once the...

c3d839f5 01/24/2013 02:29 pm Michael Hanselmann

hv_xen: Simplify writing configuration

Instead of calling _WriteConfigFileStatic from both derived classes,
those now only return the content (minus the “do not edit” header). The
configuration is then written by the base class, XenHypervisor.

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

0a903309 01/24/2013 02:29 pm Michael Hanselmann

hv_xen: Prepare for unit tests, remove {static,class}method

Unit tests will have to specify a custom Xen configuration directory (a
temporary directory). To this end “hv_xen.XenHypervisor” and its two
derived classes are modified to have fewer static and class methods. A...

d0bb3f24 01/24/2013 02:27 pm Michael Hanselmann

hv_xen: Factorize and test disk configuration

The “_GetConfigFileDiskData” function is moved to module level and
cleaned up (module-level constants for letters and file I/O drivers).

Until now only 24 disks would be supported (e.g. “sda” to “sdx”), when...

06c9a520 01/24/2013 01:58 pm Michael Hanselmann

hv_xen: Refactor getting node information, add tests

Refactor and add tests for getting node (Domain-0) information.

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

b255379d 01/24/2013 01:57 pm Michael Hanselmann

hv_xen: Refactor running & parsing "xm list", add tests

This patch refactors “_RunXmList” and adds some tests.

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

d82dec68 01/24/2013 01:46 pm Michael Hanselmann

Merge branch 'devel-2.7'

  • devel-2.7:
    hv_*: Always return from Verify, style fixes
    _VerifyErrors()._Error() and _ErrorIf() are now consistent
    Handle the result of QueryGroups() correctly

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

cd04dfd2 01/24/2013 12:46 pm Michael Hanselmann

hv_*: Always return from Verify, style fixes

Change all “Verify” methods in hypervisor abstractions to explicitely
return None if no problem was detected. Remove punctuation from error
messages. Update docstrings with “@return” and some small mistakes.

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

9842f020 01/24/2013 10:50 am Helga Velroyen

Check minimum size of networks on creation

When creating a network, so far no size constraints were checked.
We now limit the size of a network to a /30 or bigger, although
tecnically, the ipaddr library supports even /32 networks.

Signed-off-by: Helga Velroyen <>...

0c348b86 01/23/2013 07:49 pm Michael Hanselmann

constants: Add list of known Xen commands

These will be used in unittests.

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

8bb2df7d 01/23/2013 06:34 pm Bernardo Dal Seno

_VerifyErrors()._Error() and _ErrorIf() are now consistent

_Error() didn't contain the logic for demoting errors to warnings and for
marking an operation as failed. Now _ErrorIf() is just a minimal wrapper
for _Error().

Unit tests included.

Signed-off-by: Bernardo Dal Seno <>...

286d0218 01/23/2013 03:25 pm Dimitris Aragiorgis

Handle the result of QueryGroups() correctly

If no group is given for the “gnt-network connect“/“… disconnect”
commands, the client uses the result of “QueryGroups()” which is a list
of lists. Use “itertools.chain()” to handle the return value correctly....

af3aea48 01/23/2013 03:24 pm Dimitris Aragiorgis

Handle the result of QueryGroups() correctly

If no group is given for the “gnt-network connect“/“… disconnect”
commands, the client uses the result of “QueryGroups()” which is a list
of lists. Use “itertools.chain()” to handle the return value correctly....

76c364d9 01/23/2013 01:41 pm Michael Hanselmann

hv_xen: Compose file name outside error handling

In _ReadConfigFile, the filename should be prepared outside the
try/except block. Fixes bad code formatting, too.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

0d07a850 01/22/2013 04:05 pm Michael Hanselmann

hv_base: Remove empty constructor

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

3b721842 01/22/2013 04:05 pm Michael Hanselmann

Add test for backend._GetBlockDevSymlinkPath

Add a unit test for the trivial “_GetBlockDevSymlinkPath” function in
backend (small changes in the function were required).

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

af89fa76 01/21/2013 05:31 pm Helga Velroyen

Fix format string of KVM output

This fixes a missing 's' in the format string and
the wrong quotes. Those bugs were introduced in
commit 6e043e60.

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

7e7fa841 01/21/2013 01:57 pm Iustin Pop

First part of confd timer changes

This patch changes the resolution of the timers: the watcher timer
goes from 60s to 17s, and the polling-mode timer goes from 2 seconds
to 250ms. The code changes a bit more due to the changes in the units
of the various constants....

525f0f98 01/18/2013 05:12 pm Christos Stavrakakis

Fix type of 'node_whitelist' request parameter

If opportunistic_locking is used, then 'node_whitelist' parameter passed
to the allocator is set to the LU's owned node locks. However, LU owned_locks
has type of 'set' while IReqInstanceAlloc expects type of...

347fa0f1 01/18/2013 05:12 pm Michael Hanselmann

hv_xen: Add test for CPU pinning configuration

Add a unittest for a function formatting CPU pinning information for
Xen's configuration.

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

6e043e60 01/18/2013 05:12 pm Guido Trotter

kvm: deduplicate 'get output' code

We had the same code twice, and were about to add a third time. Better
to collapse it into just one function.

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

6f4070cd 01/18/2013 05:12 pm Guido Trotter

kvm: extract a regexp matching out of a for loop

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

f0db563d 01/18/2013 05:12 pm Guido Trotter

kvm: remove last version-based feature detection

This was left behind because it required a different kvm invocation.
Now that we can add new ones cheaply (two constants) it's easy to get
rid of it. Differently than in other cases we support old version which...

a8e8c0c6 01/18/2013 04:30 pm Michael Hanselmann

Make Xen config path a build-time option

Stop hardcoding the path in “hv_xen.py”.

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

94d5cee9 01/18/2013 03:39 pm Michael Hanselmann

burnin: Don't keep hypervisor class around

Just determine whether it can migrate and keep that value instead of the
full hypervisor class.

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

d38bef8e 01/18/2013 12:13 pm Constantinos Venetsanopoulos

Run pre-migrate hooks on primary node too

Signed-off-by: Constantinos Venetsanopoulos <>
Reviewed-by: Guido Trotter <>

82e3bf85 01/16/2013 08:57 pm Dimitris Aragiorgis

Check if KVM machine version is supported

If machine version is passed as an hv param, a check is made
in target node whether this version is included in the supported
ones derived from kvm -M ? command.

Signed-off-by: Dimitris Aragiorgis <>...

e32e1fb9 01/16/2013 07:09 pm Bernardo Dal Seno

Verify that templates are compatible with exclusive storage

cluster-verify reports instances with disk templates not compatible with
exclusive storage but that are running on nodes with the exclusive storage
flag set.

Signed-off-by: Bernardo Dal Seno <>...

525939d9 01/16/2013 07:09 pm Bernardo Dal Seno

cluster-verify checks uniformity of PV sizes

When exclusive_storage is set, cluster-verify complains if the size of PVs
is not uniform across a node group.

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

14fe92c7 01/16/2013 07:09 pm Bernardo Dal Seno

New RPC call for node verify in dns-only RPC client

This will be used in node-add.

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

58bc6241 01/16/2013 07:09 pm Bernardo Dal Seno

add-node checks PVs

add-node now performs a few checks on LVM before adding a node to the
cluster.

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

39eb39dc 01/16/2013 07:09 pm Bernardo Dal Seno

Moved checks within LUClusterVerifyGroup

Almost all instance-specific checks have been moved from the Exec method to
the _VerifyInstance method. This cleans up Exec, which was becoming too big
even for pylint…

Signed-off-by: Bernardo Dal Seno <>...

b496abdb 01/16/2013 07:09 pm Bernardo Dal Seno

bdev.GetPVInfo() returns list of LVs

This will be used for checks related to exclusive storage.

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

d5a690cb 01/16/2013 07:09 pm Bernardo Dal Seno

cluster-verify checks that PVs are not shared

When exclusive_storage is set, cluster-verify complains if PVs are shared
among unrelated LVs.

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

8c3d6797 01/16/2013 07:09 pm Bernardo Dal Seno

Small cleanup in constants.py

- compat.UniqueFrozenset used in one more place, for consistency.
- The order of NV_XXX constants is fixed so that all values are now sorted
by name.

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

22d9752a 01/16/2013 07:09 pm Bernardo Dal Seno

cluster-verify checks uniformity of exclusive_storage flag

The value of the flag should be the same for nodes within the same group.

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

11064155 01/16/2013 07:09 pm Bernardo Dal Seno

utils.LvmExclusiveCheckNodePvs() returns more info

utils.LvmExclusiveCheckNodePvs() now returns the size of the smallest and
biggest PVs of a node. They will be used for cross-node consistency checks.

Signed-off-by: Bernardo Dal Seno <>...

13d3acab 01/16/2013 03:56 pm Michele Tartara

Add reporting infrastructure for data collectors

This commit adds the part of the JSON report generation code that will be
common to all the data collectors, according to the format specified in the
design document.

Signed-off-by: Michele Tartara <>...

4b9638dc 01/16/2013 01:10 pm Guido Trotter

kvm: make kvm path configurable as an hv parameter

This fixes Issue 225.

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

b73f1c59 01/16/2013 01:07 pm Guido Trotter

make _{Generate,Execute}KVMRuntime accept kvm help

Currently kvm --help is called twice at instance startup, this makes
sure it's called only once.

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

3b59ec02 01/16/2013 01:07 pm Guido Trotter

kvm: make auxiliary functions accept a kvm path

This will be used to be able to customize the path in an hv parameter.

Also fix two comments that still mentioned version-based checking.

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

4ab75599 01/16/2013 01:06 pm Dimitris Aragiorgis

Add KVM machine version as hv param

This is needed in case an instance must be booted with an exact type of
machine version (due to e.g. outdated drivers). If this hv param
explicitly defined (during instance creation/modification) then the kvm
process will be started having this version for the -M option. Otherwise...

8e55e20f 01/16/2013 12:19 pm Michael Hanselmann

Move burnin to ganeti.tools.burnin

Similar to other scripts, “tools/burnin” just becomes a wrapper script.

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

5ce58234 01/15/2013 04:43 pm Michael Hanselmann

Link man pages in documentation

This patch depends on “Option to include man pages in documentation”. In
the documentation build including man pages, all “:manpage:`…`”
references are converted to links. For man pages not provided by Ganeti,
Sphinx' standard formatting is used....

3e77a36c 01/14/2013 05:52 pm Dato Simó

Add initial constants and Haskell ADTs for auto repair

In this commit, the AutoRepairType and AutoRepairResult types are defined,
with the possible values specified in doc/design-autorepair.rst.

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

7f83345f 01/14/2013 04:36 pm Guido Trotter

kvm: simplify _GetMachineVersion

Use a multiline regexp rather than a single line one, and then split
lines in the code.

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

2fddb144 01/14/2013 04:36 pm Guido Trotter

Allow -soundhw option to kvm

For all of us that love to listen to music on our kvm virtual machines,
the -soundhw option is paramount.

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

156681c1 01/14/2013 04:36 pm Guido Trotter

kvm: support usb devices

All in one go, comma separated usb devices of all types.

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

e6f24d89 01/14/2013 04:36 pm Guido Trotter

kvm: Add kvm_extra parameter

As requested in Issue 261 and many other times.

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

7589346f 01/14/2013 04:36 pm Guido Trotter

kvm: Add -vga option

As requested in Issue 69.

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

0ad7f5d8 01/14/2013 04:23 pm Guido Trotter

kvm: use help based feature detection

As discussed on the list some people backport features to different kvm
versions, making the version based detection system unreliable. We
change wherever we can to detection on the help output.

This also fixes Issue 250...

2c368f28 01/14/2013 04:03 pm Guido Trotter

Add a non negative int hypervisor parameter check

...and use it for a few parameters for which it makes sense.

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

a900a30c 01/14/2013 04:03 pm Guido Trotter

kvm: always pass -usb

This will be the default anyway and it was a mistake to pass it only if
the mouse was specified.

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

e3b89628 01/14/2013 04:03 pm Guido Trotter

kvm: abstract getting --help output

This will be used later, for now nothing changes.

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

4888a609 01/14/2013 04:03 pm Guido Trotter

kvm: allow setting smp cores, threads, sockets

This was requested in Issue 322.
Note that maxcpus is not implemented yet, as it should be considered in
a cpu-hotplug global context.

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

14fd6c81 01/14/2013 12:54 pm Guido Trotter

kvm: add serial console speed

The serial port speed changed between versions of qemu (what didn't?), so
the old hardcoded default doesn't do anymore. Upgrade it to a parameter.

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

60a7335b 01/11/2013 06:16 pm Dimitris Aragiorgis

Add locking to _NetworkQuery

Make use of _GetNames() to get the final network UUIDs.
Get networks info after having aquired the locks. Refactor
the code to use new local variables:

- "network_uuids" returned from _GetNames()
- "all_networks" that are the latest network info...
e6ba3320 01/10/2013 03:11 pm Dimitris Aragiorgis

Add machine version in kvm runtime file

kvm -M ? returns the supported machines (e.g. pc-1.1).
Add _GetDefaultMachineVersion() function to get the default value.

Upon kvm runtime file creation (this is in _GenerateKVMRuntime() invoked
only in StartInstance()) append this info in kvm_cmd. During...

dbb4f850 01/09/2013 05:23 pm Guido Trotter

Remove fixed FIXME

This was fixed in stable-2.6, commit 053c356

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

23d95cff 01/09/2013 12:48 pm Bernardo Dal Seno

Unit tests for bdev and utils.lvm

Also amended a comment of a tested method.
The tests are for methods introduced in commit 63c73073 (LVM disk creation
uses dedicated PVs).

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

8d459129 01/07/2013 07:00 pm Michael Hanselmann

Add "use_locking" parameter to network query opcode

This was extracted from a patch by Dimitris Aragiorgis with the subject
“Add locking to _NetworkQuery”. The rest of the patch did no longer
apply and will require more work.

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

19e1b715 12/27/2012 03:33 pm Iustin Pop

Return master ip script output in case of failure

Currently only the exit code is returned, which is somewhat pointless:
for failures, we already know it's ≠ 0, so we don't have enough
information (reported on the mailing list). By logging the output as
well (if any), the user will have more information available for...

8775e62a 12/27/2012 03:33 pm Iustin Pop

Fix LUInstanceRecreateDisks with iallocator

Recent iallocator changes (commit fb60bc6a, “iallocator: Add node
whitelist”) broke the parameter validation for LUInstanceRecreateDisks
(the other LUs were manually fixed already):

$ gnt-instance recreate-disks -I hail --dry-run instance3...
b954f097 12/22/2012 11:47 am Constantinos Venetsanopoulos

Add the gnt-storage client

Add a new client called 'gnt-storage'.
The client interacts with the ExtStorage interface, similarly to
the way gnt-os interacts with the OS interface.

For now, only two commands are supported: 'info' and 'diagnose'.

'diagnose' calculates the node status of each provider on each node,...

108c0a3e 12/21/2012 10:26 pm Iustin Pop

Merge branch 'devel-2.6'

  • devel-2.6:
    Final update of NEWS file for 2.6.2 and version bump
    Fix job completion with big job queues
    confd: reduce noise during normal config reload
    Change hbal handling of !auto_balance instances
    Small corrections in man pages...
ce003543 12/21/2012 08:50 pm Iustin Pop

Fix build breakage after exclusive storage commits

This fixes:

htest/Test/Ganeti/Rpc.hs:50:14:
Couldn't match expected type `Rpc.RpcCallNodeInfo'
against inferred type `Data.Map.Map String Bool
-> Rpc.RpcCallNodeInfo'...

478a3308 12/21/2012 08:42 pm Iustin Pop

Merge branch 'stable-2.6' into devel-2.6

No conflicts, really trivial.

  • stable-2.6:
    Final update of NEWS file for 2.6.2 and version bump
    Fix job completion with big job queues
    confd: reduce noise during normal config reload
    Change hbal handling of !auto_balance instances...
6ebfef42 12/21/2012 07:06 pm Bernardo Dal Seno

LUs raise an error if they cannot handle exclusive_storage

This happens when the exclusive_storage flag is set, and the requested
operation is incompatible with the flag or not yet supported.

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

2a196443 12/21/2012 07:06 pm Bernardo Dal Seno

Refactor checks for a new template in LUInstanceSetParams

All the checks have been moved to a private method, so as to make
CheckPrereq() smaller and more readable (pylint was complaining about it).

Signed-off-by: Bernardo Dal Seno <>...

61481c52 12/21/2012 06:52 pm Bernardo Dal Seno

Free disk space reporting follows exclusive storage rules

When exclusive_storage is set, nodes report only the space that could be
used to create new disk according to the rules set in the
design-partitioned doc (i.e., non-empty disks are ignored and the space...

319322a7 12/21/2012 06:45 pm Bernardo Dal Seno

Call node_info RPCs with the exclusive_storage flag

The flag is read from the configuration and passed to the RPC.

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

1a3c5d4e 12/21/2012 06:45 pm Bernardo Dal Seno

Add exclusive_storage parameter to node_info RPC

The flag is passed to the low-level functions that need it, but it's not
yet used. Also, RPCs get just a default value for now.

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

c1912a48 12/21/2012 05:47 pm Michael Hanselmann

gnt-* list-fields: Show friendly field type

For people writing query filters (documented in ganeti(7)) knowing a field's
type can be useful.

$ gnt-instance list-fields name be/memory
Name Type Title Description
name Text Instance Instance name...

5e2e45b7 12/21/2012 04:06 pm Michael Hanselmann

Improve assertion message in LUClusterVerifyGroup

In issue 240 this assertion fails. While reproducing was not possible
with the master branch, having a more verbose message can't hurt.

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

63c73073 12/21/2012 01:40 pm Bernardo Dal Seno

LVM disk creation uses dedicated PVs

When exclusive_storage is set, PVs are allocated according to the
design-partitioned design doc.

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

d4724b14 12/21/2012 01:40 pm Bernardo Dal Seno

Call blockdev_create RPCs with the exclusive_storage flag

The flag is read from the configuration and passed to the RPC.

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

ee1478e5 12/21/2012 01:40 pm Bernardo Dal Seno

Add exclusive_storage parameter to blockdev_create RPC

The flag is passed to the low-level functions that need it, but it's not
yet used.

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

59726e15 12/21/2012 01:40 pm Bernardo Dal Seno

Added class to contain information about a PV

This makes the code more readable and easier to upgrade.
bdev.LogicalVolume.GetPVInfo and the code that depends on it have been
refactored to use the new class.

utils.CheckVolumeGroupSize() has been moved to lib/utils/lvm.py, where more...

911ee606 12/21/2012 11:32 am Michael Hanselmann

opcodes: Common parameter for target groups

Also add a missing parenthesis at the end.

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

ee93aa8a 12/21/2012 11:32 am Michael Hanselmann

gnt-network: Fix CLI issues with node groups

The original implementation reserved the name “all” to specify all node
groups. That would prevent the use of a node group actually named “all”.

This patch changes the order and definition of the command line...

3924c9e0 12/21/2012 11:29 am Michael Hanselmann

gnt-network CLI improvements

- Use unpacking instead of addressing indivdual list items
- Add “--submit” and “--priority” support where possible
- Re-use LUXI client where possible
- Fixed some typos

There is still an issue that a node group named “all” can not be...

f2212a5d 12/21/2012 11:29 am Michael Hanselmann

Improve network query algorithm

Similar to commit 572a277. Directly iterate over “self.wanted” instead
of iterating through all networks and checking if they're wanted.

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

070b780d 12/21/2012 11:29 am Michael Hanselmann

Change network error text

This error is thrown if a network name already exists, not if the
network itself (e.g. “1.2.3.0/24”) is defined.

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

503574ec 12/21/2012 11:27 am Michael Hanselmann

Format network field "group_list" in client

The field is now a list of tuples containing the group name, mode and
link.

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

f1222089 12/21/2012 11:24 am Dimitris Aragiorgis

Fix iallocator for nodegroups with no tags

_ComputeNodeGroupData() raises error if a group has no tags
when list(gdata.tags) is invoked. Use “gdata.GetTags()” instead.

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

80a0546b 12/20/2012 06:16 pm Michele Tartara

Add function for generating UUIDs in the Haskell codebase

Its first use will be to generate the salt for ConfD requests of the Haskell
client, as in the Python client.

Unit test added as well.

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

53258324 12/20/2012 05:08 pm Michael Hanselmann

objects.NIC: Look up mode only once, capitalize acronym

Look up “NIC_MODE” only once, capitalize “NIC” in error messages.

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

eac9b7b8 12/20/2012 05:08 pm Michael Hanselmann

Add utility to format dictionary as key=value strings

This will be used in QA to format network interface parameters.

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

aa6c1bb1 12/20/2012 05:06 pm Constantinos Venetsanopoulos

Adjust LUInstanceSetParams wrt the `ext' template

Initial support for the `ext' template in gnt-instance modify.
Take care of all needed checks in CheckArguments and CheckPrereqs
wrt ExtStorage Providers and ext-params.

ExtStorage disk addition and specification of arbitrary ext-params...

938adc87 12/20/2012 05:06 pm Constantinos Venetsanopoulos

Multiple ExtStorage Providers and ext-params

Add support for passing parameters to the ext template (ext-params).
Take advantage of disk-params, that don't seem to make much sense in
this template (ExtStorage Providers are not predefined and we don't
know their needs) and use them to pass the ext-params dynamically to...

376631d1 12/20/2012 05:06 pm Constantinos Venetsanopoulos

Implement the External Storage Interface

With this commit we introduce the External Storage Interface
to Ganeti, abbreviated: ExtStorage Interface.

The ExtStorage Interface provides Ganeti with the ability to interact
with externally connected shared storage pools, visible by all...

32ba31be 12/20/2012 03:37 pm Michael Hanselmann

Stop all daemons on cluster initialization

Addresses issue 145. When daemons are still running from a previous
cluster instance, starting the daemons again will fail.
“ConfigWriter.IsCluster” only looks at the configuration file, which
could already have been deleted....

5f30ea3f 12/20/2012 12:37 pm Michael Hanselmann

netutils: Normalize all FQDNs

Addresses issue 147. Only the hostnames resolved using
“netutils.Hostname($name)” were normalized, but those returned by the
class method “GetSysName” weren't.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

044fff06 12/20/2012 11:57 am Michael Hanselmann

More style updates for network-related code

Error message formatting, else/if merging to elif, docstrings.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

cfa79a23 12/20/2012 11:57 am Michael Hanselmann

cmdlib: Additional opportunistic locking check

If opportunistic locking is requested in the opcode, but no iallocator
is used (not specified or no default), an error will be raised.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

4a6fce31 12/19/2012 07:44 pm Michael Hanselmann

Detect wrong Python module structure

If, for one reason or another, a module named "ganeti.ganeti" can be
succesfully imported (e.g. through a symlink in the wrong place), error
which are diffcult to debug can occur. This piece of code tests for the
unlikely case of that happening....

ff0c9604 12/19/2012 07:26 pm Guido Trotter

One more offline+shutdown fix

Currently gnt-instance shutdown --force of an offline instance
resets the offline status. Which of course is bad and completely
unintended. Fix. (caught by the new qa tests)

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