Statistics
| Branch: | Tag: | Revision:

root / test / hs / Test @ 015f1517

# Date Author Comment
015f1517 02/06/2014 03:34 pm Jose A. Lopes

Add CLI and OpCode instance communication option

  • Add command-line interface flag to enable instance communication
  • Add instance communication parameter to the opcode that creates an instance

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Michele Tartara <>

3af1359f 02/06/2014 03:34 pm Jose A. Lopes

Add metadata daemon

... including, user, group, daemonizing code with command line
options, integration with the Snap HTTP server, and logic.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Michele Tartara <>

45907709 02/04/2014 03:14 pm Petr Pudlak

Merge branch 'stable-2.11' into master

  • stable-2.11
    Add andRestArguments to IDiskParams
    Add function providing the canonical andRestArguments
    Add genAndRestArguments :: Gen (Map String JSValue)
    Add additional constructor AndRestArguments to OptionalType...
2e09344f 02/04/2014 10:51 am Klaus Aehlig

Add andRestArguments to IDiskParams

In this way, we cann pass through the opaque parameters
required for disk creation and modification in the case of
external storage.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

db9583f2 02/04/2014 10:51 am Klaus Aehlig

Add genAndRestArguments :: Gen (Map String JSValue)

So that objects using AndRestArguments are available for testing.
As the AndRestArguments are intended for passing through additional
parameters passed on the command line, we restrict them to the
values that are allowed at this position: Strings of ASCII characters...

ea7032da 01/30/2014 04:10 pm Petr Pudlak

Update getDirJobIDs to use ResultT

Also simplify code and remove unused functions.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

87f15934 01/30/2014 04:10 pm Petr Pudlak

Generalize type signatures of functions that produce Result

This allows them to be used in any 'MonadError', in particular in monad stacks
composed using ResultT, without explicit lifting.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

8d61946f 01/30/2014 11:03 am Petr Pudlak

Merge branch 'stable-2.11' into master

  • stable-2.11
    Make safeRenameFile create dirs with defined permissions
    Add constant for subdir permissions within the job queue
    Add utility to fix permissions
    Add data type describing permissions and possibly owners...
b75430d9 01/27/2014 02:50 pm Ilias Tsitsimpis

Add 'provider' to IDiskParams

IDISK_PROVIDER was included in python's IDISK_PARAMS, so it
should also be included in the Haskell code.

Now that luxid creates and enqueues jobs, without this patch the
ExtStorage interface is broken as the user can not pass the disk...

06455b13 01/16/2014 07:25 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    Add 'design-2.11.rst' which kvmd and instance shutdown
    Clarify spacing in record syntax
    Update NEWS entry about job scheduling
    Clean up luxidMaxRunningJobs
    Make the scheduler use the max_running_jobs config parameter...
ad756c77 01/16/2014 05:11 pm Klaus Aehlig

Add opcode parameter for the maximal number of running jobs

This parameter of OpClusterSetParams will allow to set the
maximal number of jobs to be run simultaneously.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

74b3f734 01/16/2014 05:11 pm Petr Pudlak

Use ClockTime instead of Double in fields in Objects.hs

This affects "mtime" and "ctime" fields in all data types.

This also forces explicit declaration of how the fields are serialized
in Query.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

6879dfd2 01/16/2014 05:11 pm Petr Pudlak

Also fix MaybeForJSON parsing and add unit tests

Its readJSON was mistakenly implemented as an infinite loop.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

dde8b625 01/16/2014 05:11 pm Petr Pudlak

Add (de)serialization unit tests for TimeAsDoubleJSON

This includes adding an Arbitrary instance for TimeAsDouble, and also an
orphan instance for Arbitrary ClockTime so that the current tests work
unmodified.

Signed-off-by: Petr Pudlak <>...

588d0ee4 01/13/2014 07:43 pm Jose A. Lopes

Unit tests for KVM daemon

Add unit tests for KVM daemon.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Michele Tartara <>

4084d18f 01/13/2014 07:43 pm Jose A. Lopes

KVM daemon datatype, user and group

  • add user and group to 'configure.ac', 'Makefile.am' and
    'AutoConf.hs.in'
  • extend 'Daemon' datatype with 'GanetiKvmd' and implement all related
    functions, such as, 'daemonName', etc.
  • export KVM daemon name as constant...
b3cc1646 12/20/2013 03:15 pm Helga Velroyen

Verify incoming RPCs against candidate map

From this patch on, incoming RPC calls are checked against
the map of valid master candidate certificates. If no map
is present, the cluster is assumed to be in
bootstrap/upgrade mode and compares the incoming call...

f3ac6f36 12/19/2013 01:59 pm Klaus Aehlig

Merge branch 'stable-2.10' into master

  • stable-2.10
    Version bump for 2.10.0~rc1
    Update NEWS for 2.10.0 rc1 release
    Fix pylint 0.26.0/Python 2.7 warning
    Update INSTALL and devnotes for 2.10 release
  • stable-2.9
    Bump revision for 2.9.2
    Update NEWS for 2.9.2 release...
d3e6fd0e 12/17/2013 06:12 pm Santi Raffa

ssconf: Add Gluster mount directory

This commit adds the gluster storage directory to ssconf (without
actually using its value just yet).

Signed-off-by: Santi Raffa <>
Signed-off-by: Thomas Thrainer <>
Reviewed-by: Thomas Thrainer <>

d79a6502 12/11/2013 01:32 pm Petr Pudlak

Generalize the IO client handling in Luxi

... to be usable for WConfd as well. A daemon handler is encapsulated
into `Handler` data type, which is then passed to a generic `listener`.

The changes are done in Luxi.hs so that the differences are visible and...

5e671e0e 12/11/2013 12:07 pm Petr Pudlak

Add the Unix domain socket path to the Server data type

This simplifies code for closing such a socket.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

d605e261 12/11/2013 12:07 pm Petr Pudlak

Rename getClient/Server to getLuxiClient/Server

Later they will be split into LUXI-specific and general parts.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

0359e5d0 11/29/2013 12:10 pm Spyros Trigazis

Add default_iallocator_params cluster parameter

Add a cluster parameter to hold the iallocator parameters used
by the default instance allocator. Implement the option to
modify config.data, query config.data and upgrade man pages,
tests and cfgupgrade tool. The new default_iallocator_params is...

38d18416 11/26/2013 11:14 am Helga Velroyen

Remove opcodes from haskell tests

Clears the haskell tests from the query opcodes that are no
longer needed.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Hrvoje Ribicic <>

96ed3a3e 11/21/2013 04:06 pm Dimitris Aragiorgis

Introduce --hotplug-if-possible option

This will be useful for an external entity using RAPI that
wants to modify devices of instances.

The common use case for that is:
"I want to add a NIC/disk to an instance. If it is running
then try to hotplug the device. If not, then just add it to config."...

2ca1b52d 11/21/2013 03:45 pm Klaus Aehlig

Add missing spindles paramter to idisk

When spindles where added to Ganeti, apparently it was forgotten
to add the parameter to the Haskell data type as well. Do this now.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

7295a6dc 11/19/2013 02:13 pm Hrvoje Ribicic

Allow the NIC VLAN to be set to an empty string

The NIC VLAN has previously not been modified via Haskell, causing the
INicParams class not to be used. With the recent job queue
refactorings, a modification definition is recorded, and for an empty
string (which is a legal default value) a crash happens. This patch...

0808e9d5 11/14/2013 05:40 pm Petr Pudlak

Add NodeGroup to InstanceConsoleInfoParams

Before, calls to `gnt-instance list -o console` with an instance on a
node with a custom SSH port failed because of missing group
configuration. This patch fixes the problem.

Signed-off-by: Petr Pudlak <>...

1de58759 11/14/2013 05:27 pm Helga Velroyen

group queries: test niceSort and remove FIXME

In an effort to get rid of the python queries soon, this
patch fixes a FIXME of the group queries regarding the
missing testing of niceSort in this context. Due to the
lack of actually weirdly named hostnames, this patch...

14933c17 11/14/2013 03:08 pm Jose A. Lopes

Add Haskell hypervisor instance state

Add 'InstanceState' datatype which is the Haskell counterpart of the
Python type 'HvInstanceState'.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

d9d1e541 11/08/2013 07:00 pm Klaus Aehlig

Add Luxi Request to pick up a job in the queue

During the transition to the new daemon layout, from step 2
onwards, luxid will write to the queue but masterd will trigger
the execution. Therefore, add a new luxi request to tell masterd
to pick up a job that has already been written to the queue....

bb133242 10/31/2013 12:46 pm Klaus Aehlig

Merge branch 'stable-2.10' into master

  • stable-2.10
    Remove FIXME + update man pages wrt iallocator
    Don't check for master netdev when using OVS
    Fix TypeError in backend/ConfigureOVS
    Create Open vSwitch on Master during Cluster init
    SimpleRetry on BlockDev.Remove()...
51d7ac96 10/29/2013 03:56 pm Thomas Thrainer

Support import with compressed instance moves

Support compressing instance data while sending it to the target node on
instance imports.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Klaus Aehlig <>

896cc964 10/29/2013 03:56 pm Thomas Thrainer

Add local compression to OpBackupExport

OpBackupExport is extended by a compress parameter. This parameter
(either 'none' or 'gzip') controls if instance disks are compressed
before being sent over the network to the destination node.

Signed-off-by: Thomas Thrainer <>...

f198cf91 10/29/2013 03:56 pm Thomas Thrainer

Add possibility to compress to OpInstanceMove

OpInstanceMove now supports the 'compress' option. It allows to enable
compression for intra-cluster instance moves.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Klaus Aehlig <>

80ae381e 10/29/2013 03:56 pm Klaus Aehlig

Fix expectation of the htools wrapping

With the addition of hsqueeze, htools obtained a new personality.
Additionally, the longer htool name also changes the line wrapping of
the descriptions. Adapt the expectation accordingly.

Signed-off-by: Klaus Aehlig <>...

df58ca1c 10/24/2013 12:27 pm Dimitris Aragiorgis

Hotplug: client support

Add --hotplug option. Only used in OpInstanceSetParams.
If this is omitted, modifications become effective after reboot.

Ask user confirmation in case NIC modify + hotplug because it will
be done via removing old NIC (and the corresponding tap) and adding...

efa0d4fd 10/17/2013 11:09 am Hrvoje Ribicic

Tests for InstanceInfo retrieval added

As the retrieval of instance information is a tricky operation which
affects the way the instance status is calculated, a few tests have
been added to ensure its behaviour remains constant.

Signed-off-by: Hrvoje Ribicic <>...

b9e12624 10/17/2013 11:09 am Hrvoje Ribicic

Add a console information RPC call

As the instance queries need console information, and the information
is retrieved through python classes that should not be ported yet, an
RPC call supplying the information has been added. Some tests as well.

Signed-off-by: Hrvoje Ribicic <>...

3fd38382 10/17/2013 11:09 am Hrvoje Ribicic

Add aliases of existing instance fields

For legacy reasons, some instance fields are aliased. The aliases have
the same definition but appear under different names. Support for such
fields has been added to Query/Common.hs
As aliases can cause somewhat harder to find bugs, a new test was...

c14ba680 10/16/2013 08:56 pm Hrvoje Ribicic

Enable 'AllInstancesInfo' RPC call in Haskell

The AllInstancesInfo call appears to have been implemented but never
used. The commit makes it usable by modifying the parameter type and
serialization.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Jose A. Lopes <>

e4dac3e1 10/15/2013 12:29 pm Jose A. Lopes

Add test suite for some names in 'AutoConf'

Add test suite for some names in 'AutoConf' to test whether the values
generated from 'configure' and the 'Makefile' are valid filepaths,
user names, group names, among others. Fixes issue 601.

Signed-off-by: Jose A. Lopes <>...

5ce621ab 10/11/2013 02:13 pm Helga Velroyen

Correct properties of the cluster's file storage dir

This patch does:
- Rename the haskell opcode parameter
'pGlobalFileStorageDir' and 'pGlobalSharedfileStorageDir'
to 'pClusterFileStorageDir' and
'pClusterSharedfileStorageDir', respectively, because...

346c3037 10/04/2013 05:11 pm Klaus Aehlig

Provide means of submitting jobs to a drained queue

During an upgrade, the job queue needs to be drained in order to avoid
new jobs coming to the cluster. Nevertheless, the upgrade process
needs to carry out some maintenance, like redistributing the new...

d067f40b 10/02/2013 03:50 pm Jose A. Lopes

Merge 'EvacNode' and 'NodeEvacMode'

Merge 'EvacMode' and 'NodeEvacMode' which are associated with the
duplicated constants 'IALLOCATOR_NEVAC_*' and 'NODE_EVAC_*'. This
merge moves the type 'EvacMode' to 'Ganeti.Types' in order to avoid a
circular dependency between 'Ganeti.HsConstants' and...

5c40076b 09/30/2013 07:12 pm Klaus Aehlig

Disable hlint camelcase on test module

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Jose Lopes <>

33ce4d2d 09/30/2013 03:20 pm Spyros Trigazis

Add test for mond-data mock file

Test if the input file imported with the --mond-data option is
parsed properly.

Signed-off-by: Spyros Trigazis <>
Signed-off-by: Michele Tartara <>
Reviewed-by: Michele Tartara <>

f89ec0e0 09/25/2013 03:24 pm Jose A. Lopes

Disable hlint camelcase on test module

Haskell test modules contain functions which have names containing
underscore. Add hlint annotation to disable this check.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Klaus Aehlig <>

285d04a1 09/25/2013 01:50 pm Jose A. Lopes

HUnit test for 'buildVersion'

Add 'HUnit' test for 'buildVersion'.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Thomas Thrainer <>

85c48fbb 09/19/2013 11:52 am Jose A. Lopes

Hs2Py constants: add constants from 'Ganeti.Types'

Add to Hs2Py constant generation all constants that are defined by the
Haskell defined declared in 'Ganeti.Types'. This patch also fixes a
type inconsistency between Haskell and Python, namely, the constant...

f361a6ee 09/12/2013 01:51 pm Jose A. Lopes

Haskell to Python constants: more constants

  • move several groups of constants, from Python to Haskell, which are
    currently being used in Haskell, including SSH and daemon related
    constants, policy allocation, blockdev driver manual (this is a
    single constant), auto repair related constants, and data collector...
4651c69f 09/10/2013 11:58 am Jose A. Lopes

Wrap 'Set' in 'ListSet' for the opcodes

In what Haskell to Python opcodes are concerned, a Haskell 'Set' is
translated into a Python 'list'. In other words, currently, opcodes
that handle sets of parameters are actually handling lists because
this is how sets are currently encoded. This patch introduces a new...

5cbf7832 08/08/2013 10:31 am Jose A. Lopes

Fix opcodes and parameters

  • fix some return types in opcodes and some types and documentation in
    parameters.
  • fix serialization of the default value of the 'name' parameter in
    the opcodes related to tags when tag kind is 'cluster'
  • revert changes to 'pShutdownTimeout'' and its references because the...
1ca326c8 08/07/2013 06:46 pm Thomas Thrainer

Merge branch 'stable-2.9'

  • stable-2.9
    Fix batch creation of instances
    Fix documentation of gnt-instance batch-create
    Support multi instance allocs without iallocator
    Support DSA SSH keys in bootstrap
    Include VCS version in `gnt-cluster version`...
804d72eb 08/07/2013 05:41 pm Thomas Thrainer

Merge branch 'stable-2.8' into stable-2.9

  • stable-2.8
    Fix batch creation of instances
    Fix documentation of gnt-instance batch-create
    Support multi instance allocs without iallocator
    Support DSA SSH keys in bootstrap
    Include VCS version in `gnt-cluster version`...
de36f091 08/07/2013 10:41 am Jose A. Lopes

Remove TagObject

The 'TagObject' datatype became useless because it was replaced by
'TagKind'. This patch removes 'TagObject', its 'Arbitrary' instance,
and related functions.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Guido Trotter <>

6e94b75c 08/07/2013 10:41 am Jose A. Lopes

Update Harep, Query server, and tests

Update Harep, Haskell query server, and tests concerning Luxi and
opcodes to reflect the changes to Haskell to Python opcode
generation. This change is necessary because TagObject is replaced by
TagKind and some types in opcodes and parameters changed to be...

34af39e8 08/07/2013 10:41 am Jose A. Lopes

Add Python opcode generation

  • add Python opcode generation to Template Haskell
  • fix all the opcodes and parameters, including their types and
    documentation
  • update Luxi to reflect the other changes.

Signed-off-by: Jose A. Lopes <>...

d31193c3 08/07/2013 10:41 am Jose A. Lopes

Eliminate Haskell constant for opcode names

Modify 'autotools/convert-constants' not to generate the Haskell
constant that holds all opcode names. By having Haskell generate the
Python opcopdes, it becomes impossible to generate this constant due
to a cyclic dependency. However, this constant is used only in tests,...

44c15fa3 08/07/2013 10:41 am Jose A. Lopes

Add Haskell types for opcodes and parameters

Add Haskell types for IP addresses (version 4 and 6), IP network
addresses, tag kind, and query result code.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Guido Trotter <>

aa7a5c90 07/30/2013 04:12 pm Michele Tartara

Add cleanup parameter to instance failover

Most of the code is shared with instance migrate, so we actually only need
to add the parameter and pass its value along the the common code.

Also, tests and harep are updated to support the right set of options to...

4e6cfd11 07/29/2013 03:27 pm Helga Velroyen

gnt-cluster modify --shared-file-storage-dir

This patch introduces to 'gnt-cluster modify' the option
'--shared-file-storage-dir' to change the default directory
for instances using shared file storage at cluster runtime.

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

2fe1e043 07/29/2013 03:27 pm Helga Velroyen

Remove obsolete autoconf variable from remaining files

This removes the obsolete autoconf variable
'ENABLE_SHARED_FILE_STORAGE' from all remaining files.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Thomas Thrainer <>

21c2612d 07/25/2013 05:28 pm Guido Trotter

Merge branch 'stable-2.9'

  • stable-2.9:
    Update NEWS and version for Ganeti 2.7.1
    Add hvparam to disable VNET_HDR on tap devices
    daemon-util: pass --oknodo at rotate_logs
    Fix another missing renaming
    Add logrotate example
    daemon-util: provide rotate_logs and rotate_all_logs actions...
d676dbea 07/24/2013 12:55 pm Sebastian Gebhard

Extend gnt-instance show to show vlan parameter

Extensions for "gnt-instance show" to output the vlan parameter which
was introduced by my recent patch series.
This is done by extending the nic object that is used to output the
info. Every other occurrence of this object is adopted as well....

3039e2dc 07/23/2013 03:29 pm Helga Velroyen

gnt-cluster {init, modify} --file-storage-dir

This patch implements consistent usage and behavior of
the --file-storage-dir option in 'gnt-cluster init'
and 'gnt-cluster modify'. It includes a bunch of unit
tests as well.

Additionally, it enables the previously written unit...

858ecf2b 07/18/2013 06:32 pm Klaus Aehlig

Merge branch 'stable-2.8' into stable-2.9

  • stable-2.8
    Fix permission problem related to Issue 477
    Add hs function to easily change file ownership

Conflicts:
src/Ganeti/Utils.hs (trivial)
trivial

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Michele Tartara <>

e455a3e8 07/18/2013 11:35 am Michele Tartara

Fix permission problem related to Issue 477

Commit 91525dee856951ace940c78b6254a1c7344b4803 fixed Issue 477 but broke
"gnt-cluster info".

This commit offers a solution to both problems, by changing the permission
of the socket instead of changing the permission the confd process is run...

489c9037 07/17/2013 07:55 pm Klaus Aehlig

Merge branch 'stable-2.8' into stable-2.9

  • stable-2.8
    Rename queryd to luxid
    Document the rapi client not to have a QueryNetworks method
    Enable unit tests again
    Document ganeti-queryd
    Add ganeti-queryd to QA env test
    Add queryd daemon (split from confd)...
3695a4e0 07/17/2013 06:04 pm Thomas Thrainer

Rename queryd to luxid

As queryd will, in the future, handle all LUXI request, queue jobs and
most likely perform various other tasks, it is renamed to luxid already.
This will safe some headache when upgrading Ganeti installations, as we
don't have to deal with a daemon rename....

670e954a 07/17/2013 12:33 pm Thomas Thrainer

Add queryd daemon (split from confd)

queryd is added as a new daemon which handles configuration queries over
LUXI. This functionality was removed from confd, which now only queries
over the network.

The queryd user is added to the master group such that it can access...

c832f7e9 07/16/2013 10:29 am Klaus Aehlig

Merge branch 'stable-2.8' into master

  • stable-2.8
    Change method dispatch in ClientOps to enforce luxi.REQ_ALL
    Allow modify_etc_hosts to be changed
    Add --modify-etc-hosts option for CLI tools
    Add luxiReqQueryNetworks to LuxiOp
    Log received message at debug level...
4eb06290 07/15/2013 05:24 pm Klaus Aehlig

Merge branch 'stable-2.7' into stable-2.8

  • stable-2.7
    Fix RAPI to include missing network fields
    Add support for querying network timestamps
    In the crontab example, look for the correct binary
    Fix wrong numbering in UPGRADE documentation

Conflicts:...

2dcb5a26 07/15/2013 12:34 pm Helga Velroyen

Remove file storage path from autoconf

This patch removes the option to configure the file
storage path at configure time, because it is now
replaced by a runtime option for gnt-cluster init.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Klaus Aehlig <>

75f2ff7d 07/15/2013 12:10 pm Michele Tartara

Allow modify_etc_hosts to be changed

The modify_etc_hosts options, enabling the cluster to modify the /etc/hosts
files of nodes, and to keep them in sync, could only be set at cluster init
time.

With this commit it can now be changed through modify_etc_hosts as well....

795d035d 07/12/2013 04:42 pm Klaus Aehlig

Add luxiReqQueryNetworks to LuxiOp

When the QueryNetwork was introduced as a method, apparently
it was forgotten in the Haskell world. Add it here as well.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Helga Velroyen <>

22ff02a7 07/10/2013 03:45 pm Christos Stavrakakis

Add support for querying network timestamps

Add creation and modified timestamps when creating a new network, and
extend the available query fields for networks with these fields,
namely 'ctime' and 'mtime'.

Signed-off-by: Christos Stavrakakis <>...

f9649b3d 07/10/2013 12:41 pm Klaus Aehlig

Only generate node lists with nodes having different names

genNodeList is used in testing to generate list of nodes
that could come up in cluster configurations. Since names
are used to assign indices to nodes, they have to be unique;
this is also the case in all real clusters....

76825515 07/05/2013 03:12 pm Klaus Aehlig

Merge branch 'stable-2.8' into master

  • stable-2.8:
    Also remove prop_IterateAlloc_sane from test list
    Fix documentation for prop_Alloc_sane
    Remove IterateAllocSane test
    Clean up work around for host name filtering
    Do not handle host queries special...
76968973 07/04/2013 08:04 pm Michele Tartara

Add "includeLogicalId" function for Disks

This function checks whether a disk contains a given Lvm logical ID,
directly or through its children.

Unit tests are added as well.

Signed-off-by: Michele Tartara <>
Reviewed-by: Klaus Aehlig <>

58458012 07/04/2013 08:03 pm Michele Tartara

Add "instance" field to LVInfo

Extend the LVInfo data structure with the field for storing the name of
the instance it is paired with.

Update the tests accordingly.

Signed-off-by: Michele Tartara <>
Reviewed-by: Klaus Aehlig <>

51b12695 07/04/2013 08:01 pm Klaus Aehlig

Also remove prop_IterateAlloc_sane from test list

In f4d1bb7 that test was removed, but forgotten to remove it
from the list of tests to be executed. Fix that.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Michele Tartara <>

09d8b0fc 07/04/2013 06:46 pm Klaus Aehlig

Fix documentation for prop_Alloc_sane

As discussed in the last commit, placing a new instance on the cluster
can lead to a cluster that can be improved by moving previously added
instances. For an empty cluster, however, there are no previous
instances. So add this to the test description to make obvious why...

f4d1bb75 07/04/2013 06:46 pm Klaus Aehlig

Remove IterateAllocSane test

The test is testing for a property that just isn't true. Iterated
allocation greedily place one instance at a time taking the locally
most balanced solution. Then it is tested whether the resulting global
allocation can be improved....

212b66c3 07/02/2013 01:53 pm Helga Velroyen

Turn 'exclusive_storage' into storage parameter (hs)

This is the haskell implementation of my patch "Extend RPC call
'node_info' by storage parameters". It turns the 'exclusive
storage' flag into a storage parameter of the LVM storage types.
Besides that, this patch moves some types into the Types.hs....

c8c071cb 07/01/2013 02:40 pm Bernardo Dal Seno

Load CPUs used by the node OS in htools

A new field is added to the Node type, and it's used to initialize the used
CPUs field.

The signature of Node.create has been split among lines to match the
parameter list.

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

0cf8edad 07/01/2013 02:34 pm Michele Tartara

Add tests for LVs parser

Add unit tests and Quickcheck tests for the LV parser.

Also, fix the alphabetic order of some imports in htest.hs.

Signed-off-by: Michele Tartara <>
Reviewed-by: Helga Velroyen <>

b5334d80 07/01/2013 02:34 pm Michele Tartara

Add function testing parsers with QuickCheck

Parsing a string automatically generated by QuickCheck can be useful in many
cases. A function for doing this is added to the common test functions.

Signed-off-by: Michele Tartara <>
Reviewed-by: Helga Velroyen <>

688f35e6 07/01/2013 02:34 pm Michele Tartara

Add function for generating arbitrary UUID

Add a function for generating arbitrary UUIDs to be used for QuickCheck tests.

Signed-off-by: Michele Tartara <>
Reviewed-by: Helga Velroyen <>

da4a52a3 06/20/2013 05:04 pm Thomas Thrainer

Index instances by their UUID

No longer index instances by their name but by their UUID in the cluster
config. This change changes large parts of the code, as the following
adjustments were necessary: * Change the index key to UUID in the configuration and the...

f5c4553b 06/18/2013 06:24 pm Michele Tartara

Merge branch 'stable-2.8' into 'master'

  • stable-2.8
    Version bump to 2.8.0~alpha1
    Make cfgupgrade idempotent
    Update config version number when downgrading
    Add test for shrink heuristics over different resources
    Improve hspace shrinking strategy...
c5f6cba2 06/17/2013 08:32 pm Helga Velroyen

Rename directory 'Block' to 'Storage'

This patch renames the 'Block' directory to 'Storage' in
the Haskell code base. The same rename was done in the
python code base earlier this quarter. We generalize the
name, because we needed a place for general storage...

d6cc980d 06/14/2013 12:16 pm Klaus Aehlig

Merge branch 'stable-2.7' into stable-2.8

  • stable-2.7
    Make shrinkByType aware of individual disks
    Add a test for hspace to respect instance policy

Conflicts: (trival, take union of added files/tests)
Makefile.am
test/hs/shelltests/htools-hspace.test...

bfa9a5d1 06/14/2013 11:15 am Klaus Aehlig

Make shrinkByType aware of individual disks

When shrinking an instances, you can't just get smaller disk footprint
while leaving the individual disks as they are. Make the shrink
heuristic aware of that fact, and decrease all individual disks as
well. Fixes issue 484....

1c3231aa 06/13/2013 12:32 pm Thomas Thrainer

Index nodes by their UUID

No longer index nodes by their name but by their UUID in the cluster
config. This change changes large parts of the code, as the following
adjustments were necessary: * Change the index key to UUID in the configuration and the
ConfigWriter, including all methods....

030ab01a 06/12/2013 10:18 am Helga Velroyen

Add hvparams to RPC call 'node_info'

This patch adds the hvparams parameter to the RPC call
'node_info'. It also adjusts the related code in noded.py
and Query/Node.hs

Signed-off-by: Helga Velroyen <>
Reviewed-by: Thomas Thrainer <>

914c6df4 06/07/2013 04:11 pm Bernardo Dal Seno

Spindles become part of htools resource spec

Spindles are now part of resource spec. Instances get created with spindles
specified (which are just ignored when exclusive storage is disabled).

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Klaus Aehlig <>

825f8cee 06/07/2013 04:11 pm Bernardo Dal Seno

htools cluster score takes spindles into account

When exclusive storage is enabled, spindles are used instead of disk space
to compute the cluster score.

Comments and variable names in computePDsk has been changed to match the
actual code.

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

74ff6aed 06/07/2013 04:11 pm Bernardo Dal Seno

Update spindles when moving instances in htools

Spindles get updated, and errors raised when not enough free spindles
exist. No new error is raised when exclusive storage is disabled.

Unit tests included.

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

fcfc0c2d 06/07/2013 04:11 pm Bernardo Dal Seno

Unit tests for htools and exclusive storage

The existing tests are run also on nodes with exclusive storage enabled. The
values for spindles and exclusive storage are set in a consistent way, for
both nodes and instances.

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