Statistics
| Branch: | Tag: | Revision:

root / lib / constants.py @ 59baad7a

History | View | Annotate | Download (60.2 kB)

# Date Author Comment
fe05a931 04/10/2013 06:09 pm Michele Tartara

Fix job queue directory permission problems

If split users are used, the queue directory could only be accessed
by masterd, but also confd needs to be able to read it, e.g. when it
is queried as part of "gnt-job list"

This commit fixes the permissions in such a way to allow proper access rights....

c148e448 04/03/2013 08:14 pm Klaus Aehlig

Introduce a constant for the copyable disk templates

This list contains the disk templates suitable for moving
an instance by copying the files. A requirement is that
they're not accessed externally or shared between nodes;
in particular, sharedfile is not suitable....

d8f0b7c1 03/12/2013 06:52 pm Guido Trotter

Make diskless instances externally mirrored

This addresses Issue 237.

Mirroring no disk is a no-op. As such we can treat them like mirrored
instances, since the data they need (none) will be present on all nodes.

This is definitely enough to failover or migrate instances with a manual...

e38bc4eb 03/11/2013 08:57 pm Bernardo Dal Seno

Unit tests for objects.FillIPolicy() + small fix

IPOLICY_DEFAULTS is now a legal policy (the disk-templates entry was a set
instead of a list, before).

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Guido Trotter <>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

b8028dcf 12/19/2012 06:29 pm Michael Hanselmann

Replace frozenset with compat.UniqueFrozenset

This is not a trivial s/frozenset/compat.UniqueFrozenset/, but rather
only replaces “frozenset” where appropriate. Most of the places are
“static” information that doesn't change after the module has been
loaded....

45317e3a 12/19/2012 03:45 pm Iustin Pop

Remove some unused Python code

This patch removes code which is no longer used due to refactoring:

- http.InitSsl, last usage removed in commit 33231500 (“Convert RPC
client to PycURL”)
- rapi.baserlib.MakeParamsDict, last usage remove in commit 4e5a68f8...

0ea11dcb 12/19/2012 03:14 pm Bernardo Dal Seno

Add exclusive_storage node parameter

Unit tests updated and expanded with an inheritance check.

The flag has no effect yet.

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

57fb6fcb 12/14/2012 04:28 pm Guido Trotter

Very very very basic openvswitch support

This is a "better than nothing" support, just for kvm and just joining
the machine to the opevswitch bridge with the right command.

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

61e062dd 12/12/2012 02:08 pm Michele Tartara

Move the path of the DRBD status file to the Constants file

It will be needed by the DRBD data collector, that will be added shortly.

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

af54b7d7 12/11/2012 01:01 pm Michael Hanselmann

constants: Remove duplicate DRBD barrier option

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

69e5fefc 12/06/2012 04:07 pm Michael Hanselmann

Add tool to configure node daemon

The design for this is in “doc/design-node-add.rst”. The tool receives a
JSON data structure on stdin and configures the node's daemon after
verifying the received values.

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

2556424d 11/21/2012 05:54 pm Iustin Pop

Small style fixes (' vs ") in network code

This is just trivial fixes; I think I caught all of them.

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

1fdeb284 11/21/2012 03:43 pm Michael Hanselmann

Rename configure option for restricted commands

It is no longer “--enable-remote-commands”, but rather
“--enable-restricted-commands”.

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

e81eef56 11/20/2012 07:51 pm Dimitris Aragiorgis

Replace string values with proper constants

_UnlockedCommitIp is used either for releasing or reserving an
IP inside a network. New constants RELEASE_ACTION/RESERVE_ACTION
are used to decide which is the case.

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

3c286190 11/20/2012 07:51 pm Dimitris Aragiorgis

Fixes to pass pep8 (make lint)

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

8140e24f 11/20/2012 07:51 pm Dimitris Aragiorgis

Add tags in network objects

Support:
- gnt-network add --tags.
- gnt-network list-tags/add-tags/remove-tags/.
- gnt-network list -o +tags

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

eaa4c57c 11/20/2012 07:50 pm Dimitris Aragiorgis

IP pool related objects, opcodes and constants

Config objects: * Introduce L{Network} with
- IPv4 network field (mandatory)
- IPv4 gateway, IPv6 (network/gateway), mac prefix, type (optional) * Modify existing config objects to support networks:
- Add new slot 'network' to L{NIC} config object...

9108958f 11/16/2012 04:09 pm Michael Hanselmann

configure: Add option to enable remote commands

By default remote commands are disabled and need to be explicitely
enabled at build time.

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

f215debf 11/06/2012 08:01 pm Guido Trotter

Use SSH_LOGIN_USER rather than root for xl ssh

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

55d1ebfa 11/06/2012 07:27 pm Michael Hanselmann

Fix NameError in constants.py introduced in merge 46c1f82

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

46c1f828 11/06/2012 06:26 pm Guido Trotter

Merge branch 'devel-2.6'

  • devel-2.6:
    Disable E1101 on ganeti/http/server.py:424
    Fix live migration under xl
    Don't check for xend port when using xl

Conflicts:
lib/hypervisor/hv_xen.py: trivial

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

053c356a 11/06/2012 04:32 pm Guido Trotter

Fix live migration under xl

Until now the only way to make live migration work in conjunction with
"xl" was to add ssh known_hosts keys for every node's secondary ip on
every other node.

With this command we remove the target key verification: this is not...

72b35807 10/26/2012 05:35 pm Michael Hanselmann

Check allowed file storage paths during cluster-verify

Some paths, such as /bin or /usr/lib, should not be used for file
storage. This patch implements a check during cluster verification to
fail in case such a path has been used.

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

ebae9e37 10/26/2012 03:37 pm Michael Hanselmann

prepare_node_join: Move daemon SSH files to constants

This dictionary will also be useful in “gnt-node add”.

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

c87440f5 10/25/2012 03:16 pm Michael Hanselmann

Drop SSHS_FORCE constant

It is not actually used.

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

d12b9f66 10/23/2012 06:32 pm Michael Hanselmann

Add initial implementation of prepare-node-join

This is a new tool as per the design document “design-ssh-setup”. It
receives a JSON data structure on its standard input and configures the
SSH daemon and root's SSH keys accordingly. Unit tests are included....

8a3c9e8a 10/23/2012 03:59 pm Michael Hanselmann

ssh.GetUserFiles: RSA support, unit tests

This patch changes “ssh.GetUserFiles” to support two different kinds of
SSH keys, RSA and DSA. Before it would always use DSA. Newly written
unit tests are included.

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

1eaddbc6 10/16/2012 06:05 pm Michael Hanselmann

Add new constant for pending job status

This constant contains the job status' “queued”, “waiting” and
“cancelled”.

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

8bd977e9 10/11/2012 03:34 pm Sébastien Bocahu

Add support for cpu_cap and cpu_weight Xen params

This patch adds support for Xen's CPU scheduler 'cpu_cap' and
'cpu_weight' parameters.

Ganeti default values (cap: 0=unlimited, weight: 256) are Xen defaults.

cpu_cap is not validated correctly because of actual Ganeti limitation...

ee045466 10/11/2012 12:56 pm Michael Hanselmann

Move constant for /etc/hosts to pathutils

Needed for coming patches.

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

43a8f36a 10/05/2012 07:23 pm Bernardo Dal Seno

Explicitly ask for the default iallocator in commands

Now "gnt-instance recreate-disks" uses the default iallocator when "." is
specified as the iallocator. For uniformity, the same behavior applies to
these commands:
gnt-node evacuate
gnt-instance migrate...

0188611b 10/03/2012 06:03 pm Michael Hanselmann

Remove constant for disk wipe block size

It is dangerous to have this block size as a global constant as that
could give the impression of it being easily changed. Doing so without
further adjustments to how “dd” is called will lead to disks not being
wiped properly....

04520998 10/02/2012 08:44 pm Iustin Pop

Remove option to select the Python version of confd

This will need some more configure.ac checks for required libraries,
which will come later with the Haskell dependencies reorganisation.

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

052783ff 09/28/2012 03:14 pm Michael Hanselmann

Stop hardcoding root user

Some parts of the code still use a hardcoded user name: root. This patch
replaces all with a constant specified at build time. The end goal is to
make it possible to run a Ganeti cluster without any special privileges
(of course this will prevent some functionality from working)....

3a6a89d7 09/27/2012 01:46 pm Michael Hanselmann

Revert unintentional change of daemon log file names

Commit 3329f4dea6 unintentionally changed the filenames of all daemon
log files. This patch reverts part of those changes.

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

9f2265bc 09/18/2012 06:11 pm Michael Hanselmann

constants: Stop using wildcard import for pathutils

It still needs to be imported for hypervisor parameter defaults, but
after this change paths are no longer exported from constants.

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

3329f4de 09/18/2012 05:58 pm Michael Hanselmann

constants: Move most paths to separate module

This is inpreparation for the implementation of virtual clusters. Many
paths will change based on an environment variable and are no longer
constant and should no longer be in “constants.py”. Since “constants.py”...

f0a26429 09/17/2012 06:51 pm Michael Hanselmann

constants: Add missing word in comment

It was missing in commit 243cdbcc on May 7, 2008.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Agata Murawska <>

0c77c331 09/12/2012 12:27 pm René Nussbaumer

Move _CalculateGroupIPolicy and _ComputeDiskSize

This makes it possible to better untangle the IAllocator code, which
would otherwise lead to a recursive import structure as we need those
helpers there as well.

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

85d96a3c 09/04/2012 12:44 pm René Nussbaumer

Adding new IAllocator mode to constants

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

a6c7e2a2 09/03/2012 04:45 pm Iustin Pop

Move parameter title definitions to constants

This fixes an old TODO for moving these; now they can be reused in the
Haskell Query2 implementation.

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

42ab9ac4 08/28/2012 06:00 pm Iustin Pop

Add configure-time switch for split queries

And expand cli.GetClient() to allow opening the query socket, instead
of the main master socket.

Finally, enable the query socket use in gnt-cluster version, since
that is already implemented fully in Queryd.hs/hconfd....

988da36e 08/28/2012 05:58 pm Iustin Pop

Add new definition for query socket

This is not used yet, but is helpful when developing the Luxi endpoint
for hconfd.

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

2ff587d4 08/28/2012 12:56 pm Agata Murawska

Move necessary constants from rpc & rpc_defs to constants

As timeout constants will now be used also on Haskell side, they have
been moved from rpc_defs and rpc to constants. The same is true for
connection timeout for connecting to nodes.

Signed-off-by: Agata Murawska <>...

5ae4945a 08/23/2012 02:41 pm Iustin Pop

Bump pep8 version to 1.2

Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's:

- bump version in the docs
- silence some new checks that are wrong due to our indent=2 instead of 4
- fix lots of errors in the code where the indentation was wrong by 1...

1df4d430 08/23/2012 11:44 am Iustin Pop

Change node parameter oob_program to VTYPE_STRING

Since this is an inheritable parameter, having it as a MABYE_STRING
creates only problems (per our derivation rules). We change it to
STRING, with the default "", meaning no program. Note that most of the...

7cb42171 07/20/2012 12:29 pm Nikita Staroverov

Add support for -cpu option in KVM

This adds supports for the (non-validated) cpu parameter to KVM.

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

7803e37c 07/19/2012 03:51 pm Iustin Pop

Merge branch 'stable-2.6'

  • stable-2.6: (21 commits)
    Release Ganeti 2.6.0 rc4
    Prepare NEWS for Ganeti 2.6.0rc4
    Add some rudimentary node group ipolicy checks
    Fix setting ipolicy on node groups
    Fix --no-headers for the new list-drbd command
    Add a simple QA test for gnt-node list-drbd...
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 <>

87f0aa48 06/28/2012 11:38 pm Jack

Add PCI passthrough for hvm xen

This hv parameter allows passing PCI devices to virtual machines.

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

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

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

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

dff5f600 04/20/2012 07:11 pm Michael Hanselmann

Convert LUClusterConfigQuery to query2

The main intention of this patch is to make it possible to retrieve
cluster tags via query2. While at it I decided to convert
LUClusterConfigQuery right away. Some of the values returned by
LUClusterQuery are also included, but the conversion of LUClusterQuery...

b31176b0 04/20/2012 05:19 pm Michael Hanselmann

Remove unused constants

These are not used anywhere in Python or Haskell.

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

0fdf247d 04/19/2012 09:04 pm Michael Hanselmann

Convert listing exports to query2

This solves one case where locks are acquired during LUXI queries.
Pretty late into the transition I noticed that OpBackupQuery had a
“use_locking” parameter for a long time, but didn't use it. Since
most of the other changes were already and this allows exports to...

9665bb3a 03/30/2012 03:03 pm Michael Hanselmann

query: Add definitions for job fields

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

0b04b188 03/30/2012 03:02 pm Michael Hanselmann

constants: Don't hardcode priorities for LOCK_ATTEMPTS_TIMEOUT

Also include unittest for LOCK_ATTEMPTS_TIMEOUT.

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

b8203e1e 03/27/2012 06:10 pm Iustin Pop

Update default instance kernel version

We switch from vmlinuz-2.6-… to vmlinuz-3-…. To do this nicely, we
also add a ./configure-time setting for the KVM instance kernel.

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

3c4afa2e 03/26/2012 11:04 am 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 <>

3c6b7403 03/19/2012 05:45 pm Iustin Pop

Fix exported constants

I "forgot" to run the unittests before commit :(

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

47334810 03/19/2012 05:34 pm Iustin Pop

Export the AF_INET/AF_INET6 constants

These are needed to ensure that htools uses the same numeric values as
Python.

By the way, I'm not sure what's the best option: importing socket into
constants (this patch), or adding custom exports to
autotools/convert-constants....

34700f5b 03/15/2012 04:25 pm René Nussbaumer

Rename spindle_usage to spindle_use on Ganeti side

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

553cb5f7 03/15/2012 03:53 pm René Nussbaumer

ipolicy: Keep track of spindle usage

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

ccbbb434 03/15/2012 12:29 pm René Nussbaumer

constants: Add new spindle_usage parameter to BE

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

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

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

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

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

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