Statistics
| Branch: | Tag: | Revision:

root / lib @ 1fbb19fa

# Date Author Comment
1fbb19fa 03/04/2013 05:18 pm Iustin Pop

Fix handling of disabled (shared) file storage

The vcluster changes broke the disabling of file storage; we can
workaround by (manually) skipping the virtualisation of file storage
paths if they are not enabled.

Note that tests/QA are still broken with disabled file storage; this...

b6322b3e 03/04/2013 12:35 pm Iustin Pop

Fix LUTestAllocator with instance alloc

This is similar to commit 8775e62a; the addition of node_whitelist
broke this LU as well.

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

91c17910 03/04/2013 12:35 pm Iustin Pop

Allow rpc.MakeLegacyNodeInfo to parse non-LVM results

'MakeLegacyNodeInfo' is not the best place for this, but we'd have to
duplicate it if we wanted a LVM-less version, so the easiest is to add
an optional parameter that allows it to accept/skip LVM-less results....

36a566e8 03/04/2013 12:35 pm Iustin Pop

Allow iallocator to work without LVM storage

Currently, the iallocator interface requires LVM storage, due to the
way it computes the node storage information.

By changing the code to understand that GetVGName() can return None,
and by setting the disk_total/disk_free node parameters to the value...

ac84befd 03/01/2013 06:54 pm Dimitris Aragiorgis

Fix networks in _PrepareNicModifications()

Passing --net 0:add,ip=5.5.5.5 failed due to a reference
of a non initialized variable (new_net_obj). Reorder the checks
and add some comments to be readable.

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

ce35bdeb 02/28/2013 04:16 pm Dimitris Aragiorgis

Remove early returns in network LUs

Remove any early returns in LUNetworkDisconnect/LUNetworkConnect
and replace them with if-else statements.

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

e0519c34 02/26/2013 03:53 am Dimitris Aragiorgis

Add networks to _AllIDs()

networks config objects have UUIDs and thus should be included
in _AllUUIDObjects().

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Guido Trotter <>

5a76adf7 02/26/2013 03:53 am Dimitris Aragiorgis

Fix HooksDict() in case of no tags

In this method self.tags might be None and cannot be used
in join(). Use GetTags instead.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Guido Trotter <>

6d96f116 02/26/2013 03:53 am Dimitris Aragiorgis

Fix locking in LUNetworkConnect()

Locks for group instances are aquired only if conflicts are checked.
To this end we must _CheckNodeGroupInstances() only then otherwise
this check will always fail (owned_instances will be []).

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

076a2938 02/26/2013 03:49 am Dimitris Aragiorgis

Fix networks in LUInstanceSetParams()

Params passed in _CreateNewNic() are not yet evaluated and include
the value passed by user for the network. A lookup must be done first
in order to find the corresponding network UUID which should be stored
in the newly created NIC object....

76eeabc7 02/20/2013 06:13 pm Dimitris Aragiorgis

Locking fixes regarding Issue 324

LUNetworkConnect/LUNetworkDisconnect, in case locking is used, might
lock instances that exist in the requested node group. The acquired
locks should be checked if they are correct at the beginning of
CheckPrereq() via _CheckNodeGroupInstances()....

5454737c 02/20/2013 05:26 pm Iustin Pop

Fix small typo in a docstring

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

9394f4d1 02/19/2013 07:21 pm Dimitris Aragiorgis

Minor fixes regarding nic.network change

Make LookupNetwork() return None in case target is None. This fixes
Issue 380. Rapi passes network=None and the lookup should not fail.

Make network client aware of new nic.network.gnt-network info shows
the IPs of each instance inside the network. It parses nic.networks...

c8f4e425 02/19/2013 06:07 pm Dimitris Aragiorgis

Fix issue 378

In case a NIC is not inside a network then netinfo None. Thus
netinfo["name"] fails.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Helga Velroyen <>

aee9a8a0 02/18/2013 12:06 pm Dimitris Aragiorgis

Remove useless code in backend for network hooks

In backend NICs arrive with netinfo filled. If nic.network is not None
nic.netinfo is not too. Thus all the info is derived from HooksDict()
and nic.network must not be checked.

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

68c13560 02/18/2013 12:05 pm Dimitris Aragiorgis

Show network name and not uuid in instance info

This was before the case too. Now is bit trickier because nic.network
is uuid. Info must derive from nic.netinfo.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Helga Velroyen <>

271fee18 02/18/2013 12:03 pm Dimitris Aragiorgis

Implement network locking in Instance queries

This is needed in case more info than each nic's network uuid is to
be returned. We need to lock networks to get valid data. For now
only the name is returned as an extra field. All other can be added
with trivial effort....

f98e1175 02/18/2013 12:03 pm Dimitris Aragiorgis

Changes in query to support nic.network as uuid

Queries now return the network uuid as well as it's name. Here we
only use info provided be LUInstanceQueryData context.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Helga Velroyen <>

434b96a2 02/18/2013 12:03 pm Dimitris Aragiorgis

Modify query LUs to supoprt nic.network as uuid

Make _InstanceQuery gather all network info related to instance's
NICs and in case of NETQ_INST in _NetworkQuery get all network
uuids directly from nic.network

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

922610c9 02/18/2013 12:03 pm Dimitris Aragiorgis

Add GetInstanceNetworks() config method

This will be needed for Instance Queries. It walks through the
instance's NICs and returns a list network uuids that the NICs
are attached to.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Helga Velroyen <>

5a292b36 02/18/2013 12:03 pm Dimitris Aragiorgis

cmdlib changes to support nic.network as uuid

Refactor Instance related LUs to support nic.network as
a uuid. This removes all the unnecessary invocations to
LookupNetwork().

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Helga Velroyen <>

9ccacbc8 02/18/2013 12:02 pm Dimitris Aragiorgis

Make network config methods take uuid as argument

This will be needed in the following patches where nic.network
will refer to network's uuid and not name.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Helga Velroyen <>

473d87a3 02/15/2013 12:14 pm Iustin Pop

Rename lib/objectutils to outils.py

Back when this was introduced, I mentioned that it breaks heavily tab
completion (ob<TAB> doesn't work anymore), but at that moment I didn't
have a suggestion what to name it. I think outils is good and short
enough, and doesn't conflict with anything else, so here it goes....

20ba96f5 02/13/2013 12:34 pm Michele Tartara

Fix wrong type in a docstring of the RAPI subsystem

Signed-off-by: Michele Tartara <>
Reviewed-by: Michael Hanselmann <>

45bc4635 02/12/2013 03:47 pm Iustin Pop

Finish the remote→restricted commands rename

The documentation still points to /etc/ganeti/remote-commands,
although the code is already using restricted-command. Update the
documentation and a few docstrings accordingly.

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

37a978e7 02/12/2013 03:39 pm Helga Velroyen

Force conflicts check in LUNetworkDisconnect

Until now if one disconnects a network with --no-conflicts-check
and then remove it, there is a possibility to leave instances with NICs
referencing non-existing networks. This causes network queries,
instance removal and modification to fail....

1b68f268 02/12/2013 03:39 pm Helga Velroyen

If _UnlockedLookupNetwork() fails raise error

Make _UnlockedLookupNetwork() raise OpPrereqError (instead of returning
None) in case it does not find the requested network. Remove useless and
duplicate code such as:

if net_uuid is None:
raise...

This is a cherry-pick of commit 1cce2c4....

ae8de7e3 02/12/2013 03:39 pm Guido Trotter

Change default xen root path to /dev/xvda1

All recent-enough versions of linux see the xen paravirtual device as
/dev/xvd*.

This doesn't break old installations, as the default is only used on new
clusters.

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

bdecfea2 02/12/2013 03:39 pm Stratos Psomadakis

Fix rbd showmapped output parsing

'rbd showmapped' output formatting differs between older and newer versions of
the ceph tools. Try to use json output formatting if available (currently
available only in the ceph master branch). For bobtail, argonaut and older...

74e642cd 02/12/2013 01:30 pm Michael Hanselmann

Improve reporting on errors.AddressPoolError exceptions

This patch improves the error messages given when a
“errors.AddressPoolError” exception is caught. Includes some small style
fixes.

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

5cfa6c37 02/11/2013 05:31 pm Dimitris Aragiorgis

Remove network_type slot (Issue 363)

This slot was not used by Ganeti so the same info can be
provided via tags. In order not to break configuration data
we add a FromDict() method in Network config object that
removes the deprecated network_type (if found) and then invoke...

48616625 02/11/2013 05:31 pm Dimitris Aragiorgis

Remove family and size from network objects

This info is not used by Ganeti and therefore is removed.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Guido Trotter <>

7e8f03e3 02/11/2013 05:31 pm Dimitris Aragiorgis

Make use of HooksDict() for networks

This can be used in hypervisor code as well. For consistency
export *NETWORK_NAME and not *NETWORK throughout the code.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Guido Trotter <>

3697def0 02/11/2013 04:21 pm Bernardo Dal Seno

Moved uniformity check for exclusive_storage flag

Cluster-verify used to check that the value of exclusive_storage is uniform
within node groups. Now, it's impossible to change the flag for a single
node, so that check has been removed and an equivalent one has been added...

250a9404 02/11/2013 04:21 pm Bernardo Dal Seno

"exclusive_storage" cannot be changed on single nodes

There's never been support for a configuration where nodes in the same node
group have different values of the exclusive_storage flag. This patch
disables the possibility to change the flag for individual nodes....

45f62156 02/11/2013 04:20 pm Bernardo Dal Seno

Upgrades made on loading the configuration are always saved

Before, only some upgrades were written back to the configuration file. A
little refactoring of _UpgradeConfig() has been done to write unit tests.

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

7f5edc60 02/11/2013 12:28 pm Iustin Pop

Show correct daemon name on Luxi connect errors

Since now confd also serves a Luxi endpoint, the current message in
cli.FormatError is misleading when actually failing to connect to
it. The patch adds a somewhat hackish way to show the right daemon
name....

ee9516c8 02/08/2013 01:40 pm Guido Trotter

ConfigData: run UpgradeConfig on network objects

Although this does nothing for now, running it is safe, and consistent
with how other objects behave.

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

d89168ff 02/08/2013 01:40 pm Guido Trotter

OS environment: add network information

1) Move the hooks environment dict generator inside the object. This
also adds missing values such as network family and uuid.
2) Use the same generator both for the os environment and for the
instance hooks.
3) Update manpage and hooks documentation....

58bc8fbc 02/08/2013 12:04 pm Iustin Pop

Make gnt-os list work with no OSes

When absolutely no OSes are present on the cluster, the result of
OpOsDiagnose is an empty list. This is currently handled in gnt-os as
an error condition, probably due to how OpOsDiagnose used to return
errors in the past....

11eb5cd0 02/08/2013 11:59 am Michael Hanselmann

baserlib: Fix two mistakes in docstring

The method names were wrong due to copy & paste.

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

9411474b 02/05/2013 10:36 am Iustin Pop

Fix Haskell log file naming after virtual cluster changes

Commit 3329f4de changed the Haskell log file from constants to
functions, but introduced a bug: it uses now the daemon name instead
of the correct log file, which means "ganeti-confd.log" instead of...

1f4b9d39 02/04/2013 03:06 pm Iustin Pop

Switch KVM to multi-error verify results

This uses the new _FormatVerifyResults helper function to return
multiple errors.

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

0628a50a 02/04/2013 03:06 pm Iustin Pop

Make LXC fail verification if cgroup is not mounted

Since LXC now relies on cgroup memory limits to enforce memory, let's
make hypervisor verification (and thus cluster-verify) return errors
when the cgroup filesystem is not mounted.

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

53fde1ac 02/04/2013 03:06 pm Iustin Pop

Add a helper function for hypervisor verification

This will allow easier multi-error results from hypervisors; right
now, we only report the first error, which is not nice.

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

e4157912 02/04/2013 09:48 am Guido Trotter

hv_lxc: fix whitespace errors

The latest lxc patches included a few whitespace style errors, that make
lint fail. This patch fixes those.

Signed-off-by: Guido Trotter <>
Reviewed-by: Helga Velroyen <>

f078c799 02/02/2013 12:52 pm Faidon Liambotis

LXC: add support for the memory controller

Add support for the memory resource controller, useful to actually place
memory limits on instances.

Support is still optional, in case the kernel doesn't have it compiled
in, or in the case of Debian has it dependent on a kernel command-line...

2e5a6203 02/01/2013 05:53 pm Faidon Liambotis

LXC: adapt hv for newer lxc userspace tools

Currently hv_lxc depends on the behavior and output of older LXC tools,
which have since changed, making it unable to function in current
distributions (e.g. Debian wheezy).

Adapt the tools and expectation for the output and make it into a...

fb251c2c 01/31/2013 01:10 pm Iustin Pop

Disable live-RPC queries under split query

Currently, the node listing RPC is very slow due to missing
parallelisation. For the 2.7 release, we reset these back to masterd,
hoping to revert them by the time 2.8 is ready.

There are a number of queries that I've left pointing to confd, as...

6f1e1921 01/30/2013 06:05 pm Michael Hanselmann

hv_kvm: Original error message, keyword parameter

- Include original error message when creating TAP interface failed
- Pass keyword parameter as such

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

bc0fed4b 01/25/2013 03:25 pm Guido Trotter

kvm: fix bug while fetching -device list

_GetKVMOutput expects the command to succeed, but unfortunately on some
versions of kvm "-device ?" will output a correct list of devices, while
exiting with an error code.

To fix this we accept failure in that case (note that this doesn't...

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

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

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

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