Statistics
| Branch: | Tag: | Revision:

root / test / hs @ 9a8f9634

# Date Author Comment
9a8f9634 05/05/2014 02:22 pm Ilias Tsitsimpis

Fix the broken unittests

Fix the unittest that have been broken when we lifted the Disk objects
from the Instances.

Signed-off-by: Ilias Tsitsimpis <>
Reviewed-by: Jose A. Lopes <>

31b430c5 05/05/2014 02:22 pm Ilias Tsitsimpis

Implement getDisks in Confd

Add 'ReqInstanceDisks' request type and allow Confd to query for the
disks of an instance. The helper function 'getInstanceDisks' returns the
list of instances on the given node along with their disks and is used
by the function 'addInstNameToLv'....

09104704 05/05/2014 02:22 pm Ilias Tsitsimpis

Add timestamp/serial_no slot to disk objects

Now that disks are top level citizens in config,
they need a timestamp and a serial_no slot.

Signed-off-by: Ilias Tsitsimpis <>
Reviewed-by: Jose A. Lopes <>

d7135309 05/05/2014 02:22 pm Ilias Tsitsimpis

Add disks entry to config.data

Add disks entry to config.data.

Signed-off-by: Ilias Tsitsimpis <>
Reviewed-by: Jose A. Lopes <>

bb47621f 04/24/2014 02:11 pm Klaus Aehlig

Add basic test for CPU speed

In this example, the cluster has two nodes and four instances, two with
primary on each of the nodes. The most scarce resource on this cluster
are (virtual) CPUs and the second node has 3 times the CPU speed of the
first one. So distributing the instances 1 and 3 gives a more balanced...

94c42103 04/24/2014 02:11 pm Klaus Aehlig

Add VTypeFloat

...in order not to have to declare floating point
values as VTypeInt and rely on the sloppiness of
the JSON specification to not distinguish between
integers and floating point numbers.

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

76b4ac58 04/17/2014 06:59 pm Petr Pudlak

Add optional fields for job livelocks and process IDs

This will allow to check if a particular job is alive, and send signals
to it when it's running.

The fields aren't serialized, if missing, for backwards compatibility.

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

d890439b 04/11/2014 05:02 pm Klaus Aehlig

Clean up from LockAllocation what is no longer used

With the change from LockAllocations to LockWaitings, several
manipulation operations had to be implemented for LockWaitings
and became unused in LockAllocation. Remove these functions that
are no longer used....

58e173a5 04/11/2014 05:02 pm Klaus Aehlig

Verify the answer of opportunistic lock union

Verify that the result set of the opportunistic lock
union is correct.
- If a lock is mentioned in the result set, the request
must have been granted.
- If it is not mentioned, the owner state must be unchanged....

11a498d5 04/11/2014 05:02 pm Klaus Aehlig

Verify that opportunistic lock union is monotone

Verify that a request to opportunistically allocate locks never
reduces the amount of locks held.

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

016a5501 04/11/2014 05:02 pm Klaus Aehlig

Use intersection and union for arbitrary waitings

Allow intersection and opportunistic lock union in the construction
of the arbitrary element of a lock waiting. While definable from
updateLocks, they are typical interface functions and can help
get a more natural distribution in arbitrary....

3cb014b3 04/10/2014 03:18 pm Klaus Aehlig

Verify: liftM extRepr . readJSON . showJSON = Ok . extRepr

In other words, verify that for LockWaiting, the JSON encoding
can be decoded correctly up to observable indistinguishability.

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

2fb7557f 04/10/2014 03:18 pm Klaus Aehlig

Verify readJSON . showJSON = Ok for LockRequest

Verify that the JSON encoding of a LockRequest can correctly
be decoded.

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

f8d6da22 04/10/2014 03:18 pm Klaus Aehlig

Verify extRepr-equal states are equal on updateLocksWaiting

Add a test that verifies that extRepr-equal states cannot be
distinguished by updateLocksWaiting-transitions. To obtain
extRepr-equal states, we compare each state to the one computed
from its extensional representation....

0d3308c2 04/10/2014 03:18 pm Klaus Aehlig

Verify that extRepr-equal states behave equal on updateLocks

Add a test that verifies that extRepr-equal states cannot be
distinguished by updateLocks-transitions. To obtain extRepr-equal
states, we compare each state to the one computed from its
extensional representation....

1c362c1a 04/10/2014 03:18 pm Klaus Aehlig

Verify decoding from extensional representation is sound

Verify that, on the image of extRepr, it holds extRepr . fromExtrRepr = id.
In other words, verify that when obtain a lock waiting from an extensional
representation, it has the same extensional representation....

cb39314f 04/10/2014 03:18 pm Klaus Aehlig

Verify that all pending requests are justified

If a request is pending in a lock waiting structure, it has to fulfill
two properties:
- It must be a valid request, not violating any lock order requirements, and
- it must not be possible to fulfill it immediately....

e247c590 04/10/2014 03:18 pm Klaus Aehlig

Verify soundness of notifications

Verify that, if a lock owner gets notified, he
- had a pending request, and
- the request is fulfilled now.

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

f21ff016 04/10/2014 03:18 pm Klaus Aehlig

Strengthen progress property in lock waiting

Not only verify that after the blockers for one pending request
have gone, some request was honored, but also verify that it was
not a request by one of the blockers.

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

60c4dbb9 04/09/2014 01:55 pm Klaus Aehlig

Add process id to lock-owner description

...so that we can notify owners when their pending request got granted.

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

2dcbfddb 04/09/2014 11:58 am Klaus Aehlig

Verify that some progress is made after lock releases

Add a basic sanity check for progress on pending requests. If a
request is pending and all owners it is blocked on release their
locks, there is at least one pending request that can be granted
(the said one). So verify that at least one owner gets notified...

bdb272a6 04/09/2014 11:58 am Klaus Aehlig

Verify that an owner gets notified

Add a basic sanity check on notification: if a request is blocked,
and all old pending owners and blockers give up their resources,
the owner gets notified of his lock being granted.

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

3b907f06 04/09/2014 11:58 am Klaus Aehlig

Verify that pending requests get fulfilled eventually

Add a basic sanity check for the lock waiting mechanism. If a request
get added to pending, and all blockers and pending owners give up their
resources it is automatically handled.

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

8eb56bdf 04/09/2014 11:58 am Klaus Aehlig

Export requestSucceeded

...so that this predicate can be used for testing the LockWaiting
structure as well.

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

62b2c6f3 04/09/2014 11:58 am Klaus Aehlig

Verify that unfulfilled requests lead to pending requests

Verify that an owner has a pending request after a waiting request
not fullfilled immediately.

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

3a79c389 04/09/2014 11:58 am Klaus Aehlig

Verify locks can't be updated while having a pending request

Add a verify first sanity check for lock waiting: a user that has a pending
request cannot modify his locks. This patch also brings in the necessary
infra structure for having arbitrary waiting structures....

644a050a 04/09/2014 11:58 am Klaus Aehlig

Export the test locks for testing

As lock waiting is also based on locking, export the
test lock/owner structure, so that the tests for lock
waiting can use them.

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

d5d86e20 04/09/2014 11:58 am Klaus Aehlig

Fix typos in comments

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

22096c14 04/08/2014 03:34 pm Hrvoje Ribicic

Add zeroing timeout params to opcode

This patch adds two parameters controlling the zeroing timeout - one
that is fixed and another that depends on the amount of data (size of
disks) to zero.

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

0894ac48 04/08/2014 03:34 pm Hrvoje Ribicic

Add the zeroing-image option

This patch adds the zeroing-image option to gnt-cluster and the
OpBackupExport params. The many changes are all minor, yet necessary.

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

363f43eb 04/08/2014 03:34 pm Hrvoje Ribicic

Add the zero-free-space option

Although unused for now, add the zero-free-space option to the backup
export opcode, and add a rudimentary check for whether it should be
used.

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

d32fe318 04/07/2014 10:53 am Klaus Aehlig

Verify readJSON . showJSON = Ok for ClientType

Verify that the JSON encoding of the ClientType can correctly
be decoded.

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

b8ba35c4 04/04/2014 06:20 pm Klaus Aehlig

Verify soundness of listAllLocksOwners

Verify that every owner mentioned in the output of listAllLocksOwners
actually owns the locks claimed.

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

6e304dba 04/04/2014 06:20 pm Klaus Aehlig

Verify that all locks are mentioned in listAllLocksOwners

Add a test verifying that whenever an owner owns a lock, it
is also mentioned in the output of listAllLocksOwners.

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

50c674fc 04/04/2014 06:19 pm Klaus Aehlig

Verify consistency between listAllLocks{,Owners}

As listAllLocks is supposed to list all locks currently in use, this should
be a superset listAllLocksOwners, i.e., of all locks actively owned by some
user.

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

447d582c 04/04/2014 06:13 pm Klaus Aehlig

Verify that the list of all locks is complete

Verify that all locks owned by someone are included in the
list of all (active) locks.

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

aa4a4b76 04/03/2014 02:38 pm Petr Pudlak

Fix lint errors after moving Luxi code to UDSServer

Remove unused imports and update the 'buildCall' call in tests.

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

9c45196b 03/28/2014 03:00 pm Klaus Aehlig

Identify lock owners by either string or job id

Most requests asking for resources are jobs. However, in exceptional
cases, other requests (like currently requests to masterd requiring the
configuration) need to ask for resources. They identify themselves by...

c211dcc4 03/18/2014 01:52 pm Petr Pudlak

Add tests for (de)serialization of ClientId

.. to test if `readJSON . showJSON = Ok`.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Helga Velroyen <>

0108d385 03/11/2014 03:28 pm Klaus Aehlig

Verify serialisation of LockLevel

For the new JSON instance Ganeti.Locking.Locks.LockLevel, verify that
readJSON . showJSON = Ok.

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

1835fd75 03/11/2014 03:28 pm Klaus Aehlig

Add network locks to Haskell

Ganeti also has a lock level for networks, however this level was forgotten
when the Ganeti lock hierarchy was implemented in Haskell.

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

1f87d93d 03/07/2014 05:22 pm Petr Pudlak

Add a test for (de)serialization of Ssconf

.. to verify that readJSON . showJSON = Ok.

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

d6f05205 03/07/2014 05:22 pm Petr Pudlak

Create a data type for representing RPC compressed data

It is serialized as a JSON pair. The first element is a number
describing the compression type, the second element the actual data
(in this case Base64+Zlib encoded).

On the Python side it is decompressed by backend._Decompress....

885759da 03/07/2014 09:35 am Petr Pudlak

Refactor warnings issued by the latest 'hlint'

.. as the newest version of hlint adds additional checks

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

01a9a382 03/06/2014 05:35 pm Klaus Aehlig

Verify that all lock owners indeed own a lock

Add a test verifying that the list of lock owners is not
too big in the sense that every subject contained in that
list owns at least one lock.

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

27f28739 03/06/2014 05:35 pm Klaus Aehlig

Verify the list of lock owners is complete

In other words, verify that if all the lock owners release their
locks, the empty lock allocation is reached.

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

2868f3f7 03/05/2014 11:21 am Hrvoje Ribicic

Add the interruptible option to the delay opcode

To prepare for the use of sockets to interrupt a running delay opcode,
this patch adds an option to the opcode for doing so.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

0b3a266d 03/04/2014 05:19 pm Petr Pudlak

Test the instance 'ArrayObject Disk'

.. which is one of the few ones that use extra fields.

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

91f0dc1e 03/04/2014 05:19 pm Petr Pudlak

Add a helper function for testing 'ArrayObject' instances

It checks if 'fromJSArray . toJSArray' is equivalent to 'Ok'.

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

69809ae3 03/04/2014 02:27 pm Klaus Aehlig

Verify the intervall property of GanetiLocks

According to the specification in our design, if A is a group
lock and B belogs to this group, then all locks between A and B
in the lock order also must belong to A. Verify this.

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

cf7f8e51 03/04/2014 02:27 pm Klaus Aehlig

Verify implication restriction on locks

As specified in our design, if A is a group lock and B
belongs to A, then A must be earlier in the lock order
than B. Verify this property.

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

2e1399da 03/04/2014 02:27 pm Klaus Aehlig

Update Arbitrary GanetiLocks

With the extension of Ganeti.Locking.Locks.GanetiLocks to the
full lock hierarchy, also extend the instantiation of Arbitrary.

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

0cffcdb1 02/28/2014 02:08 pm Dimitris Bliablias

Allow cluster mac prefix modification

Extend LUClusterSetParams to allow the modification of the cluster
mac-prefix setting in 'gnt-cluster modify' command.

This fixes part of issue 239.

Signed-off-by: Dimitris Bliablias <>
Reviewed-by: Jose A. Lopes <>

e3b02e1f 02/26/2014 06:23 pm Klaus Aehlig

Verify serialization/deserialization consistency for Locks

As we made Ganeti.Locking.Locks an instance of JSON, we better verify
that we can readJSON what we showJSON.

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

89d140d1 02/26/2014 06:23 pm Klaus Aehlig

Add test for serialization of LockAllocation

Verify readJSON . showJSON = Ok for LockAllocations.

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

13caa61d 02/21/2014 02:14 pm Klaus Aehlig

Verify the result of opportunistic union

Verify that the result returned by the opportunistic union correctly
reflects the state change: locks not in the result are not changed,
locks in the result are as requested.

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

fb68bc0c 02/21/2014 02:14 pm Klaus Aehlig

Verify that opportunistic union only adds to the locks held

Add a test verifying that by opportunistic union the set of locks
held, and the level at which the locks are held, only increases.

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

9f9c4543 02/21/2014 02:14 pm Klaus Aehlig

Use opportunisticUnion in Arbitrary LockAllocation

Also allow the newly exported function opportunisticLockUnion in the
construction of arbitrary lock allocations.

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

07eec0fc 02/21/2014 02:14 pm Klaus Aehlig

Generate arbitrary :: LockAllocation according to interface

While we know that freeLocks and intersectLocks are defined in terms
of updateLocks, it is still cleaner to test against the interface: the
module Ganeti.Locking.Allocation exports several functions, and all...

277c969f 02/19/2014 03:45 pm Klaus Aehlig

Add a test verifying that lock-implication is honored

Locks can be included in one another. This inclusion can be violated
in two ways, viz.,
- A holds a lock L and B holds an exclusive lock L belongs to, and
- A holds an exclusive lock and B holds a lock L belongs to....

64df329d 02/19/2014 03:45 pm Klaus Aehlig

Verify that every owner mentioned as blocking actually is

If a request is blocked by multiple lock owners, verify that each
single one of them actually blocks the request. In other words,
verify that, whenever all but one release their lock, the request
still does not succeed....

9bf17b50 02/19/2014 03:45 pm Klaus Aehlig

Verify that the set of blocking owners is big enough

When a request is blocked, the list of blocking owners
should exhaust all blocking reasons, i.e., if those
owners release all their locks, the update must succeed.

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

619b12df 02/19/2014 03:45 pm Klaus Aehlig

Make TestLock an instance of Lock

Equip the type of test locks with a simple group structure
consisting of two lock groups and a big lock.

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

a9c3ba29 02/19/2014 03:45 pm Klaus Aehlig

Verify that releasing a lock always succeeds

There are no restrictions on releasing a lock; so this operation
has to succeed unconditionally. Verify this.

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

93f1e606 02/19/2014 10:39 am Jose A. Lopes

Add '-c | --instance-communication' flag to instance modify

  • Add the instance communication flag to the 'OpInstanceSetParams'
    opcode. This flag allows the user to enable/disable instance
    communication in a running instance. This patch adds this flag but...
a317d77a 02/17/2014 03:40 pm Klaus Aehlig

Make the lock allocation part of WConfD's state

As WConfD is supposed to be the authoritative source for
configuration and locks, it needs to have access to the lock
state as well.

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

1d49428b 02/17/2014 03:40 pm Klaus Aehlig

Verify atomicity of lock updates

Add a test verifying the atomicity of an update, i.e., if an update
succeeds, then all requests must be satisfied in the final state, and
if it fails, the state must be unchanged.

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

987fcfb7 02/17/2014 03:40 pm Klaus Aehlig

Verify lock stability over updates

Add a test that verifies that updates by one user do not
affect the locks held by a different user.

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

3469663d 02/17/2014 03:40 pm Klaus Aehlig

Verify Basic property for lock allocation

Verify the minimal consistency property for any form
of lock handling: if a user holds an exclusive lock,
then no other user can hold the same lock (neither
exclusively, nor shared).

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

e465608f 02/14/2014 11:47 am Petr Pudlak

Add mtime/ctime to ConfigData

It's used on the Python side, it's been missing on the Haskell side.

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

fb0fa957 02/14/2014 11:47 am Petr Pudlak

Add the WConfD daemon to build configuration files

Also list it in the Haskell datatype, constants, Python constants and
test configuration.

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

63571096 02/14/2014 11:46 am Petr Pudlak

Add tests for Ganeti.THH.Types

In particular, test (de)serialization of "OneTuple".

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

1263a102 02/14/2014 11:46 am Petr Pudlak

Add a helper test method for checking deserialization

It tests if a deserialization method fails properly when an invalid
input is given.

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

42fda604 02/13/2014 02:33 pm Jose A. Lopes

Add 'instance_communication_network' to 'OpClusterSetParams'

... and update the unit tests.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Helga Velroyen <>

da0aa302 02/07/2014 11:15 am Santi Raffa

OpCodes: modify InstanceReinstall for private, secret params

Modify InstanceReinstall to accept and process private and secret
parameters.

Signed-off-by: Santi Raffa <>
Reviewed-by: Jose A. Lopes <>

6bce7ba2 02/07/2014 11:14 am Santi Raffa

OpCodes: modify InstanceCreate for private, secret params

Modify InstanceCreate to accept process private and secret parameters.

Signed-off-by: Santi Raffa <>
Reviewed-by: Jose A. Lopes <>

07e3c124 02/07/2014 11:14 am Santi Raffa

OpCodes: modify ClusterSetParams for private parameters

Modify ClusterSetParams to accept and process private parameters.

Signed-off-by: Santi Raffa <>
Reviewed-by: Jose A. Lopes <>

1a182390 02/07/2014 11:14 am Santi Raffa

OpCodes: modify InstanceSetParams for private parameters

Modify InstanceSetParams to accept and process private parameters.

Signed-off-by: Santi Raffa <>
Reviewed-by: Jose A. Lopes <>

a5efec93 02/07/2014 11:14 am Santi Raffa

Add private OS parameters to cluster and instance conf

This updates objects, constructors and mocks for Instance and Cluster
objects in Python and Haskell.

Signed-off-by: Santi Raffa <>
Reviewed-by: Jose A. Lopes <>

4884f187 02/07/2014 11:13 am Santi Raffa

Add Private types to Python, Haskell

This commit adds the private containers to Python and Haskell.

Signed-off-by: Santi Raffa <>
Reviewed-by: Jose A. Lopes <>

560ef132 02/07/2014 11:13 am Santi Raffa

serializer: emit and encode Private values

For inbound data the simplest, safest thing to do is to traverse all
JSON right after encoding and search for private parameters by key.

This ensures that all consumers of this data get Private values
transparently and consistently; the serializing methods don't have to...

9d929656 02/07/2014 11:13 am Santi Raffa

OpCodes test: fix argument order (expected/but got)

Fix expected/but got value in some unit tests.

Signed-off-by: Santi Raffa <>
Reviewed-by: Jose A. Lopes <>

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