Statistics
| Branch: | Tag: | Revision:

root / src / Ganeti @ d6a7518a

# Date Author Comment
d6a7518a 02/13/2014 02:33 pm Jose A. Lopes

'LUClusterSetParams' creates the instance communication net

Extend 'LUClusterSetParams' to create the user-supplied instance
communication network in case this network does not exist. Note that
if the user-supplied network already exists, nothing needs to be done...

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

8a5d326f 02/13/2014 02:33 pm Jose A. Lopes

Add 'instance_communication_parameter' to 'Cluster'

  • Add parameter 'instance_communication_parameter' to the Python
    'ganeti.objects.Cluster' and the Haskell 'Ganeti.Objects.Cluster'.
  • Update Haskell 'QueryClusterInfo' to return also the
    'instance_communication_network' parameter....
a987c040 02/13/2014 02:33 pm Jose A. Lopes

Fix indentation

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

bcb1ab78 02/12/2014 05:54 pm Petr Pudlak

Merge branch 'stable-2.11' into master

  • stable-2.11
    Update the list dependencies in INSTALL
    Make luxid's Haskell dependencies mandatory
    Fix start/stop scripts to run luxid unconditionally
    Remove the HTOOLS configuration variable
    Add a config. conditional for running Haskell coverage...
0cd5ab45 02/12/2014 05:27 pm Petr Pudlak

Remove the HTOOLS configuration variable

.. and update the code that uses it.

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

f65784ac 02/11/2014 06:43 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    Gracefully handle queries for non-existing nodes
    Consider job-IDs queried for twice only once

Conflicts:
lib/client/gnt_node.py: trivial
src/Ganeti/Query/Query.hs: import ALL the functions

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

fb8d8645 02/11/2014 05:29 pm Klaus Aehlig

Consider job-IDs queried for twice only once

As reading jobs from disk is an expensive operation, when querying
for jobs, we optimize by considering which values the job-id is asked
for in the filter. As any reasonable person would not add the same
clause twice in an Or-clause, the implicit assumption was that the...

d759a02b 02/10/2014 06:38 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    (no changes)
  • stable-2.10
    Fix 'JobIdListOnly' type from 'List' to 'Map'
    Remove NEWS entry for 2.9.4
    Workaround for monitor bug related to greeting msg
    hotplug: Verify if a command succeeded or not...
adcccd43 02/10/2014 06:24 pm Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Fix 'JobIdListOnly' type from 'List' to 'Map'
    Remove NEWS entry for 2.9.4
    Workaround for monitor bug related to greeting msg
    hotplug: Verify if a command succeeded or not
    hotplug: Call each qemu commmand with an own socat...
673425b8 02/10/2014 04:42 pm Klaus Aehlig

Merge branch 'stable-2.9' into stable-2.10

  • stable-2.9
    Revision bump for 2.9.4
    Set release date for 2.9.4
    Note UUID identification change in NEWS file
    Allow classic queries to use either names or UUIDs
    Document the change of noded's group in NEWS...
b6e31235 02/10/2014 12:44 pm Jose A. Lopes

Fix 'JobIdListOnly' type from 'List' to 'Map'

  • This patch fixes a type discrepancy between the Haskell type
    'Ganeti.OpCodes.JobIdListOnly' and the Python type predicate
    'ganeti.ht.TJobIdListOnly', the former being a list and the latter a
    dictionary....
13ef1fa5 02/07/2014 03:42 pm Hrvoje Ribicic

Allow classic queries to use either names or UUIDs

When UUIDs are used in CLI commands, such addressing of objects fails
or succeeds inconsistently across object types. Worse yet, some calls
do not fail, but simply return no result. This is due to the way the...

3062d395 02/07/2014 11:15 am Santi Raffa

luxid: give stern warnings about debug mode

Luxid as it is can leak private and secret parameters by logging
all requests as they arrive, before any preprocessing is done.

Warn the user stern warnings about this.

Signed-off-by: Santi Raffa <>...

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

88772d17 02/06/2014 05:14 pm Klaus Aehlig

Remove wildcard luxi operation matching in luxid

In that way, we explicitly name the operations that are not
handled by luxid and explain the reason. In particular, we
can be sure that newly added luxid operations won't be forgotten
in luxid.

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

0349f9c6 02/06/2014 05:14 pm Klaus Aehlig

Implement QueryExports in luxid

...by handling as a classical query, using that queries for
export are already implemented. Note that QueryExport is slightly
different from other Query* Luxi requests, in that the fields are
not passed with the request, but have a fixed value....

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

81c717cd 02/06/2014 03:34 pm Jose A. Lopes

Generate TAP names ('gnt.com.%d') for instance comm NICs

  • Add helper function that generates names of the form 'gnt.com.%d'
    which are the names for the TAP interfaces meant to be used by
    instance communication. These names are unique within the node....
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 <>

a2dbdd82 02/06/2014 02:16 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    Implement ChangeJobPriority in luxid
    Provide a function to change the priority of a queued job
    When enqueuing new jobs, respect job ID
    Change return type of internal rmJob
    Add a function to change the priority of a job...
155df343 02/06/2014 12:43 pm Klaus Aehlig

Change return type of internal rmJob

...to also provide the job itself. In this way, the function can
also be used for tasks that require temporarily removing a job
from the queue.

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

f7743189 02/06/2014 12:43 pm Klaus Aehlig

When enqueuing new jobs, respect job ID

When adding new jobs, don't add them at the end, but at a
position that fits with their job id. In this way, we can
build operations that require fully dequeing a job an adding
it later after some modifications.

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

96d55b50 02/06/2014 12:43 pm Klaus Aehlig

Provide a function to change the priority of a queued job

There is a separation of responsibilities here. For jobs still
in the queue, it is the responsibility of the queue (scheduler),
for started jobs, the job itself has to take care of it. To avoid
the job transitioning inbetween, it is temporarily dequeued during...

7711f32b 02/06/2014 12:43 pm Klaus Aehlig

Implement ChangeJobPriority in luxid

For jobs still queued, we ask the queue to change the priority,
and replicate the changed job. For jobs that have already been
started, we have to contact the job directly, which, at the moment,
means forwarding the request to masterd....

a7ab381a 02/06/2014 12:43 pm Klaus Aehlig

Add a function changing the priority of an opcode

This pure function follows the semantic that an opcode, including
its priority, may only be changed if the opcode is not finalized.

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

a6b33b72 02/06/2014 12:43 pm Klaus Aehlig

Add a function to change the priority of a job

...by changing the priority of the non-finished opcodes.

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

27a5367a 02/06/2014 12:43 pm Petr Pudlak

Add functions for manipulating errors in Result(T)

There is often need to manipulate these errors, for example to convert a String
from Result into an exception. These functions make this easier.

Function 'toErrorStr' lifts 'Result' to any 'MonadError'. This is useful...

e061eb16 02/06/2014 12:43 pm Petr Pudlak

Remove FromString in favor of Error from standard libraries

They have the very same functionality, and using our own FromString only
causes unnecessary code duplication.

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

f2e06f0f 02/06/2014 12:42 pm Petr Pudlak

Add Alternative instances for GenericResult and ResultT

This allows to use Alternative specific combinators, namely `optional`.

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

Cherry-pick of 78209a84b0f6be27fd381ac2...

66e40fd6 02/04/2014 04:30 pm Petr Pudlak

Catch exceptions in 'readConfig' in Ganeti.Config

.. and convert them into a "Result".
This is accomplished by using "liftIO" from ResultT.

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

69bf84e1 02/04/2014 04:30 pm Petr Pudlak

Catch errors in 'lockFile' in Ganeti.Utils

Opening a file can fail as well, so catch errors there too.

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

b775af80 02/04/2014 04:12 pm Klaus Aehlig

Assert correct usage of AndRestArguments fields

The special field andRestArguments is intended to be only used
as the last field of an object, catching all remaining keys.
Add a compile-time check to verify that it is used correctly.

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

582bfaf6 02/04/2014 04:09 pm Jose A. Lopes

Fix whitespace

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

4e4821bd 02/04/2014 10:51 am Klaus Aehlig

Add function providing the canonical andRestArguments

The field catching the remaining fields will always be of the same
shape, so add a function for this to make usage simple.

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

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

Add additional constructor AndRestArguments to OptionalType

A field of this type will capture all the remaining fields
of an object as JSValues. Obviously, the intended use is
to have precisely one such field. This mechanism will allow
to pass opaque values trough, as it is, e.g., required for...

f9666f00 01/30/2014 04:11 pm Petr Pudlak

User new error handling functions in SubmitJobToDrainedQueue

This somewhat shortens and simplifies the code.

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

8383b3b6 01/30/2014 04:10 pm Petr Pudlak

Use new error functions when querying locks

This helps to handle errors coming from the Luxi client.

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

38e4d732 01/30/2014 04:10 pm Petr Pudlak

Use new error handling functions for querying jobs

Since we already touched getJobIDs, and this function is already based
on ResultT, use new error functions here as well.

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

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

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

Improve liftIO of ResultT to catch IOErrors

Any IOErrors are now captured in ResultT's liftIO using try and converted into
'Bad'. This prevents IO exceptions from leaking into ResultT code and allows
them to be handled in a pure way inside ResultT's sum type....

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

Rename 'resultT' to 'toError'

.. to better correspond to its generalized type.

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

426f0900 01/30/2014 04:10 pm Petr Pudlak

Add withErrorLogAt which annotates and logs errors

.. and rethrows them within a MonadError. This allows to just log errors
and let them be handled elsewhere.

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

565821d1 01/30/2014 04:10 pm Petr Pudlak

Add functions for manipulating errors in Result(T)

There is often need to manipulate these errors, for example to convert a String
from Result into an exception. These functions make this easier.

Function 'toErrorStr' lifts 'Result' to any 'MonadError'. This is useful...

861ddf80 01/30/2014 04:10 pm Petr Pudlak

Refactor instance MonadLog (ReaderT r m) to unify style

.. with MonadLog (ResultT e m) to be more point-free.

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

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

Add instance MonadLog for ResultT

This allows to log in monad stacks containing ResultT.

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

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

Remove FromString in favor of Error from standard libraries

They have the very same functionality, and using our own FromString only
causes unnecessary code duplication.

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...
b9202225 01/29/2014 03:59 pm Petr Pudlak

Replace duplicated code with readJSONWithDesc

JSON errors were annotated at other places, so use the function there as
well.

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

a3dabca9 01/29/2014 03:59 pm Petr Pudlak

When parsing fields, annotate JSON errors with names

This allows better debugging of failed JSON conversions.

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

885dafbc 01/29/2014 03:59 pm Petr Pudlak

Add a function that enhances readJSON error messages

If an error occurs, the error message is annotated with a given textual
description of the parsed type and optionally also with the input data.

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

0c09ecc2 01/29/2014 03:12 pm Klaus Aehlig

Make safeRenameFile create dirs with defined permissions

If, and only if, safeRenameFile creates a new directory, make sure
it has well defined permissions. While there, also optimize for the
common case. The main use of safeRenameFile is archiving jobs. As...

f23daea8 01/29/2014 03:12 pm Klaus Aehlig

Add constant for subdir permissions within the job queue

When archiving jobs, new directories have to be created, as
jobs are archived in groups of 10000. Add a constant describing
the permissions of these newly created directories.

Note that, due to the type, the constant cannot be part...

96a4ebb8 01/29/2014 03:12 pm Klaus Aehlig

Add utility to fix permissions

Especially when creating new directories, we need to make sure
ownership and permissions are set correctly. Provide a function
to do so.

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

ac81a213 01/29/2014 03:12 pm Klaus Aehlig

Add data type describing permissions and possibly owners

When creating new files, and, more importantly, new directories
it is relevant to set permissions, and possibly owners, correctly.
Provide a type specifying the target configuration.

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

baaa2ece 01/28/2014 03:17 pm Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Enable network tags in Haskell code
    Haskell style: explicit errors, visible in the type
    Clarify spacing in record syntax
    Improve the point-free section of the style guide
    Add code style document to documentation...
e10c4a69 01/28/2014 12:24 pm Hrvoje Ribicic

Enable network tags in Haskell code

Prior to the creation of the 2.10 branch, network tags were broken, and
the Haskell code introduced there mistakenly accepted this as the
desired functionality. This patch fixes this in a very simple way.

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

410945f1 01/27/2014 05:36 pm Klaus Aehlig

Merge branch 'stable-2.9' into stable-2.10

  • stable-2.9
    Revision bump for 2.9.3
    Schedule 2.9.3 release
    Document fix of issue 691 in NEWS
    NEWS: fix typo in 2.8.4 release
    Fix 'hvparams' of '_InstanceStartupMemory' on hypervisors
    Add missing option to gnt-instance documentation...
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...

45f75526 01/24/2014 05:06 pm Helga Velroyen

Disabling client certificate usage

This patch temporarily disables the usage of the client
SSL certificates. The handling of RPC connections had a
conceptional flaw, because the certificates lack a proper
signature. For this, Ganeti needs to implement a CA,...

658eb2dc 01/24/2014 02:38 pm Klaus Aehlig

Implement auto-archiving of jobs

As luxid is taking over the handling of the job queue, it
also needs to handle the automated archiving of jobs. Here
we replicate the semantics of the current python implementation
of archiving as many jobs older than the given time as possible,...

c867cfe1 01/24/2014 02:38 pm Klaus Aehlig

Add a utility function to try archiving jobs

Provide a function that walks through a list of job ids and
archives them if appropriate. Abort that process if a given
timeout is reached.

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

8b5a4b9a 01/24/2014 02:38 pm Klaus Aehlig

Support computation on Timestamp

As timestamps are also used to determine if an event is sufficiently
long in the past (e.g., on archiving jobs), support adding a time
interval to a Timestamp.

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

ae66f3a9 01/24/2014 02:38 pm Klaus Aehlig

Add constructor function for Timestamp

Provide means to get Ganeti's internal timestamps
from standard clock time.

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

370f63be 01/24/2014 02:38 pm Klaus Aehlig

Add a predicate on Jobs on whether it can be archived

Jobs usually are archived a given time after they have finished.
For finalized jobs without end-time, the start-time is taken en
lieu. This function provides the pure predicate for this decision.

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

857cbfb1 01/24/2014 02:38 pm Klaus Aehlig

Make ArchiveJob in luxid create the archive, if necessary

As jobs are archived in groups of 10000, creating new subdirectories
of the archive might be necessary when archiving a job. Use a
function that takes care of this.

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

b3f95121 01/24/2014 02:38 pm Klaus Aehlig

Provide a safe version of rename

...that also creates the target directory, if needed.

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

f4d0c84a 01/24/2014 02:38 pm Klaus Aehlig

Fix expectation for the return value of jobqueue_rename

On sucess, jobqueue_rename returns a list containing one
null per change request.

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

6fadcbab 01/23/2014 12:25 pm Klaus Aehlig

fix off-by-one error in indentation

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

6fdc84ab 01/23/2014 12:03 pm Klaus Aehlig

Implement ArchiveJob queries in luxid

With luxid taking over the tasks of masterd, archiving
jobs also belongs to its responsibilities. As archiving
a job affects the global state of the job queue, synchronise
over the queue lock.

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

40ad3e85 01/23/2014 12:03 pm Klaus Aehlig

Add RPC call jobqueue_rename

Archiving jobs is also replicated to all master candidates.
Therefore luxid needs to be aware of this RPC call.

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

c92b4671 01/21/2014 05:40 pm Klaus Aehlig

Make use of fieldListToFieldMap

...to avoid duplicating that code all over Ganeti.Query.

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

4fb78549 01/21/2014 05:39 pm Klaus Aehlig

Provide a utility function to map FieldList to FieldMap

As the same construction is used in several places, it is better
to have it factored out as a named function.

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

a6e406ce 01/21/2014 04:05 pm Klaus Aehlig

Add query support for locks to luxid

While requests only get forwarded, it still helps to
get luxid feature-complete with respect to master.

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

86b04819 01/21/2014 04:05 pm Klaus Aehlig

Provide fields for lock queries

For luxid to be feature-complete with respect to masterd, it
also needs to answer requests about locks. This includes knowing
the fields available for locks.

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

4f704244 01/20/2014 06:15 pm Klaus Aehlig

Remove dead Ganeti.Query.Job.loadRuntimeData

This function was exported from the module, but actually never
used anywhere in the code base. So clean it up.

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

368e95fd 01/20/2014 03:05 pm Apollon Oikonomopoulos

luxid: fix detection of master node in node query

Ganeti.Config.getNodeRole would rely on clusterMasterNode returning the
master node name, however clusterMasterNode returns the master node's
UUID. We fix this and a similar issue in Ganeti.Query.Node.nodeFields....

77676415 01/20/2014 11:50 am Klaus Aehlig

When updating job queue, support virtual paths

When replicating parts of the job queue, allow for virtual
paths in the RPC call. In this way, replication will also
work correctly in a vcluster setup. Note that makeVirtualPath
lives in IO, and hence cannot be part of the pure encoding...

4a43365c 01/20/2014 11:50 am Klaus Aehlig

Add a module to support virtual clusters

Virtual clusters are an efficient way to test how Ganeti behaves
on a large cluster without requiring a large number of machines.
Now that more tasks like job replication are done by luxid, provide
that functionality in Haskell as well....

40960882 01/20/2014 11:50 am Klaus Aehlig

Move vcluster-related constants to Constants.hs

...as, in that way, they will also be available in Haskell,
where job replication happens as well.

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

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...
ed7f7fd9 01/16/2014 05:13 pm Petr Pudlak

Update set_watcher_pause to use ClockTime instead of Double

This only affects the internal representation in the Haskell part.

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

d520ba2a 01/16/2014 05:11 pm Klaus Aehlig

Clean up luxidMaxRunningJobs

Now that the number of jobs maximally running in parallel is
a run-time option, this magic constant is not needed any more.

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

d9dd04b1 01/16/2014 05:11 pm Klaus Aehlig

Make the scheduler use the max_running_jobs config parameter

Use the run-time configuration to decide on the number of jobs
scheduled for execution instead of using a hard-coded constant.

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

6046dca9 01/16/2014 05:11 pm Klaus Aehlig

Make configuration available to the scheduler

In this way, scheduling decisions can depend on the configuration
of the cluster. At the moment, this is only the maximal number
jobs to be run in parallel, but in the future this will also include
job filters....

178ad717 01/16/2014 05:11 pm Klaus Aehlig

Make max_running_jobs queryable

As we have introduced a new cluster parameter, it should
be also visible when querying about the cluster configuration.

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

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

cf048aea 01/16/2014 05:11 pm Klaus Aehlig

Add parameter max_running_jobs to the cluster configuration

This cluster-wide parameter will determine how many non-finalized jobs maximally
should be in a not queued state at the same time.

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

78209a84 01/16/2014 05:11 pm Petr Pudlak

Add Alternative instances for GenericResult and ResultT

This allows to use Alternative specific combinators, namely `optional`.

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

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

836ccf52 01/16/2014 05:11 pm Petr Pudlak

A function for creating time fields that serialize as Double

The function creates fields with custom read/show methods based on
TimeAsDoubleJSON, with the default value of 0 seconds since the epoch.

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