Statistics
| Branch: | Tag: | Revision:

root / src @ b9202225

# Date Author Comment
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 <>

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

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

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

5ea9f6cb 01/16/2014 05:11 pm Petr Pudlak

Add a newtype wrapper that saves ClockTime as JSON double

This allows to convert ClockTime to JSON and back.

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

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

Document Field data type used in TH code generation

Describe what types of fields are currently possible and allowed and
what what are the types of their "Q Exp" expressions.

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

596d7b4f 01/16/2014 05:10 pm Petr Pudlak

Prohibit fields that are optional with a default value

For fields marked optional we need to keep the information that a value
isn't available. Therefore having a default value for an optional field
would not work.

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

ee7caf27 01/16/2014 05:10 pm Petr Pudlak

A workaround for GHC linking problem "unknown symbol ..."

GHC 7.4 on Debian Wheezy fails to compile after some TH related changes,
reporting

ghc: src/Ganeti/JSON.o: unknown symbol
`attoparseczm0zi11zi1zi0_DataziAttoparsecziText_zdwf_info`

This doesn't happen on Squeeze. Explicitly importing attoparsec in THH...

eb577716 01/16/2014 05:10 pm Petr Pudlak

Fix saveObjectField to work properly with custom fieldShow

Before it only worked for non-optional fields. For optional fields
with custom fieldShow functions, the generated code didn't use it.

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

0b7bf465 01/16/2014 05:10 pm Petr Pudlak

Fix typing problems in TH that generates field code

See #677: The code generated by TH had different types depending on if
a field had a default value and/or custom reader. Simple cases worked by
accident, but more complex ones failed.

This patch distinguishes properly between optional fields and mandatory...

36cb6837 01/15/2014 02:34 pm Klaus Aehlig

Implement job cancellation in luxid

As luxid handles the job queue, this daemon is the natural
place to handle job cancellation. Answering to CancelJob requests
is also necessary for luxid to be feature compliant with masterd,
even for command-line requests only....

363dc9d6 01/15/2014 02:34 pm Klaus Aehlig

Provide a function to compute the canceled version of a job

When a job gets canceled while still queued, dequeuing requires
luxid to mark it as cancelled. So provide the necessary pure
function to do so.

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

47c3c7b1 01/15/2014 02:34 pm Klaus Aehlig

Support canceling dequeued jobs

Even after jobs have been handed over for execution, it might
still be possible to cancel them. On such case would be the
job still waiting for a lock. Eventually, we will have to
communicate to the job directly, but as long as execution is...

bb62d52e 01/15/2014 02:33 pm Klaus Aehlig

Add dequeuing to the job scheduler

This only removes queued jobs from the queue
and indicates whether the job was found in the queue.
For jobs that are already started from the queue's
point of view, it might still be possible to cancel
them, e.g., if they are still waiting for locks....

62a7853e 01/14/2014 12:38 pm Jose A. Lopes

Fix Kvmd imports for Ubuntu 13.04 64

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

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

User shutdown hypervisor parameter

Add user shutdown parameter for KVM. Based on this parameter, decide
what information to report for a KVM instance, for example,
distinguish between 'ADMIN_down' and 'USER_down'.

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

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

Add KVM daemon daemonize

Add KVM daemon entry point, command-line options, backgrounding, etc

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

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

Add KVM daemon logic

Add KVM daemon logic, which contains monitors for Qmp sockets and
directory/file watching.

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

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

Generalize and reuse Unix domain sockets

Refactor module 'Ganeti.UDSServer' so the KVM daemon can reuse code
declared in this module to handle Unix domain sockets.

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...
9131274c 01/13/2014 07:43 pm Jose A. Lopes

Fix whitespace

Fix whitespace in several modules.

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

91ef0821 01/13/2014 07:43 pm Jose A. Lopes

Fix according to the Ganeti style guide

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

a8551d9c 01/08/2014 12:26 pm Klaus Aehlig

Also consider filter fields for deciding if using live data

If the query fields don't require live data, we use the shortcut
and don't request live data. However, we cannot take this shortcut
if the fields the filter depends on requires live data.

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

54a2661e 01/07/2014 12:03 pm Klaus Aehlig

Increase job queue polling interval

Now that all jobs are monitored with inotify, increase the polling interval.

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

ea174b21 01/07/2014 12:03 pm Klaus Aehlig

After detecting a finished job, schedule again

In order to obtain a higher throughput of jobs, schedule new jobs
as soon as a job was detected to have finished.

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

b81650b0 01/07/2014 12:03 pm Klaus Aehlig

Attach a watcher for jobs

Add a function that can serve as an event handler for inotify
updating a job in the job queue if the corresponding job file
changes. Also attach it to all jobs selected to be run.

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

a2977f53 01/07/2014 12:03 pm Klaus Aehlig

JQScheduler: always pass JobWithStat

When attaching inotifies to jobs, we need to preserve
it through potential requeuing actions. Also, this information
is needed for cleaning up.

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

cc5ab470 01/07/2014 12:03 pm Klaus Aehlig

Cleanup inotifies

When cleaning up finished jobs, remove the inotify
attached to them, if any.

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

ed6cf449 01/07/2014 12:03 pm Klaus Aehlig

Add an optional inotify to jobs in the scheduler

This provides the infrastructure to monitor running jobs
by inotify, and hence update the queue promptly upon
job changes.

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

d5665e10 01/07/2014 10:14 am Klaus Aehlig

Make luxid handle SetDrainFlag

Make luxid also handle queries to drain the job queue.

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

83a451f5 01/07/2014 10:14 am Klaus Aehlig

Add RPC for setting the queue drain flag

As luxid is also responsible for handling requests to drain the job queue,
we need the corresponding RPC in Haskell as well.

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

1264bd58 01/07/2014 10:14 am Klaus Aehlig

Fix sign in drain_flag request

The drain flag is set, if the queue is not open.

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

e97cce9f 12/20/2013 03:49 pm Klaus Aehlig

Reinstantiate inotify after a lost file

When watching a file, reinstantiate the inotify if notified
of an event that removes the watch. Such events are likely
to happen, as our usual way to "modify" a file is to atomically
replace it by another one.

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

2f575937 12/20/2013 03:49 pm Klaus Aehlig

Improve debug-logging for watch file

Also log, at debug level only, when a change of a watched
file was observed, but the change did not result in any
change of derived value.

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

13b05c27 12/20/2013 03:49 pm Klaus Aehlig

Improve debugging by logging inotify events

At debug level, not only log that an inotify triggered,
but also log the actual event.

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

a6c43c02 12/20/2013 03:15 pm Helga Velroyen

Verify client certificates

This patch adds a step to 'gnt-cluster verify' to verify
the existence and validity of the nodes' client
certificates. Since this is a crucial point of the
security concept, the verification is very detailed with
expressive error messages and well tested by unit tests....

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

d722af8b 12/20/2013 03:15 pm Helga Velroyen

Extend RPC call to create SSL certificates

So far the RPC call 'node_crypto_tokens' did only retrieve
the certificate digest of an existing certificate. This
call is now enhanced to also create a new certificate and
return the respective digest. This will be used in various...

1059337d 12/20/2013 03:15 pm Helga Velroyen

Store candidate certificates in ssconf

This patch enables Ganeti to store the candidate
certificate map in ssconf. A utility function to
read it is provided as well.

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

3bcf2140 12/20/2013 03:15 pm Helga Velroyen

Add candiate certificate map to configuration

At the end of this patch series, incoming RPC calls are
legitimized against a map of master candidate nodes'
SSL certificate digests. This patch adds the map itself
to the cluster's configuration.

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

b544a3c2 12/20/2013 03:15 pm Helga Velroyen

Retrieve a node's certificate digest

In various cluster operations, the master node needs to
retrieve the digest of a node's SSL certificate. For this
purpose, we add an RPC call to retrieve the digest. The
function is designed in a general way to make it possible...

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...
edd09726 12/18/2013 04:47 pm Klaus Aehlig

break line longer than 80 chars

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

dcd54d32 12/18/2013 03:49 pm Klaus Aehlig

hsqueeze: tag nodes before offlining them

hsqueeze is supposed to tag nodes before powering them down, so that
it later can recognize which nodes can be activated later. When showing
the commands to execute, also add the tagging commands.

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

2a58a7b1 12/18/2013 03:49 pm Klaus Aehlig

hsqueeze: only consider nodes that are not secondaries

If an instance has a secondary node, it cannot be easily
moved to every node (in the same node group), as otherwise
no node would be distinguished as secondary. As hsqueeze
should only consider nodes were moving the instances away...

5a904197 12/17/2013 06:12 pm Santi Raffa

Gluster: add the Shared File storage type

The shared file and gluster disk templates should not report their disk
space information like file does, because they do not behave the same.

If a cluster pulls from the same, shared source of storage then it is...

6488e5bc 12/17/2013 06:12 pm Santi Raffa

Gluster: add userspace access support

Add support for the QEMU gluster: protocol. Also change the access
mode routines so they check the access parameter for all templates.

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

845b7ed1 12/17/2013 06:12 pm Santi Raffa

Gluster: mount automatically

Add parameters to the Gluster disk template so Gluster can manage the
mount point point autonomously.

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

ac156ecd 12/17/2013 06:12 pm Santi Raffa

Gluster: use ssconf value for mountpoint directory

Gluster still does not mount anything autonomously, but this commit
changes where Gluster expects its mountpoint to be.

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

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

8106dd64 12/17/2013 06:12 pm Santi Raffa

Gluster: minimal implementation

Add Gluster to Ganeti by essentially cloning the shared file behaviour
everywhere in the code base.

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

1138d32f 12/17/2013 10:34 am Klaus Aehlig

Implement fields query for instance

Support the query for the fields available for instances.

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

5c47a2a6 12/17/2013 10:34 am Klaus Aehlig

Remove the hvsGlobals from instance query fields

...to be consistent with the python implementation.

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

af67c5b1 12/17/2013 10:34 am Klaus Aehlig

When interpreting [] as "all fields", sort nicely

When asked for all fields, we promise to return the list of fields
sorted according to niceSort. Keep this promise.

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

f18aaff4 12/16/2013 05:45 pm Klaus Aehlig

Fix race in watchFile

As the calling of watchFile and the evaluation of the initial
getFStatSafe takes non-zero time, the file could have changed
before inotify was set up properly. Solve this problem by an
additional check for the watched value to have changed immediately...

c486fb6c 12/16/2013 12:37 pm Thomas Thrainer

Merge branch 'stable-2.9' into stable-2.10

  • stable-2.9
    Bump revision for 2.9.2
    Update NEWS for 2.9.2 release
    Pass hvparams to GetInstanceInfo
    Adapt parameters that moved to instance variables
    Avoid lines longer than 80 chars
    SingleNotifyPipeCondition: don't share pollers...
6897a51e 12/13/2013 02:58 pm Petr Pudlak

Use a data type when generating Python types of OpCodes

Currently they are generated only as Strings.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Jose A. Lopes <>

0d78accc 12/13/2013 02:58 pm Petr Pudlak

Refactor OpCodeDescriptor from a tuple to a data type

This greatly enhances code readability.

Also fix monadic types "Q ExpQ" [which is "Q (Q Exp)"] to "Q Exp".

Signed-off-by: Petr Pudlak <>
Reviewed-by: Jose A. Lopes <>

6c1a9fae 12/13/2013 02:58 pm Petr Pudlak

Add showValueList to PyValue for proper String instances

It's the same trick ShowS uses. We add a type class function for
showing a list to PyValue and then just use it in the instance for
`[a]`. This way we have the proper String instance without any
overlapping/incoherent instances....

b711450c 12/13/2013 02:58 pm Petr Pudlak

Rename PyValueInstances.hs to PyValue.hs

Now the file contains the type class declaration as well.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Jose A. Lopes <>

2886c58d 12/13/2013 02:58 pm Petr Pudlak

Move PyValue into PyValueInstances.hs, import it in THH.hs

This puts all PyValue code into one module, getting rid of orphan
instances.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Jose A. Lopes <>

d819aba6 12/13/2013 02:28 pm Klaus Aehlig

Make the duration field optional null-serialized

The time in SetWatcherPause is optional (with Nothing meaning
that the pause should be canceled), but the serialization is
not that of a Maybe Double; instead Just values serialize as
they are and Nothing serializes to null. Fortunately, we already...

be7531a9 12/13/2013 11:58 am Klaus Aehlig

Handle QueryConfigValues

Make luxid handle the QueryConfigValues call providing certain
simple status information about the cluster.

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

7f58ff5d 12/13/2013 11:58 am Klaus Aehlig

Add a predicate for watcher pause

Add a predicate, in IO, to test whether the watcher is
paused.

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

4b7863cb 12/13/2013 11:58 am Klaus Aehlig

Provide path to watcher pause file

Extend Path.hs to also provide the path to the file indicating
whether watcher is paused.

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

946f1fb3 12/13/2013 11:58 am Klaus Aehlig

Implement SetWatcherPause in luxid

Make luxid handle SetWatcherPause correctly.

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

5ce9cc30 12/13/2013 11:57 am Klaus Aehlig

Add the RPC-call set_watcher_pause

With luxid taking over responsibility for handling watcher-pause requests,
it needs to know about this RPC. So have it available in Haskell as well.

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

906df9f1 12/13/2013 11:57 am Klaus Aehlig

The time field for SetWatcherPause is optional

A JSON null value is used to indicate that the pause should be canceled.

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

557f5dad 12/13/2013 11:57 am Klaus Aehlig

Generate a separate return type for the job queue update RPC

The instantiation of RPC requires a bidirectional functional dependency
between call type and return type. Hence we cannot use Unit everywhere.

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

791e87b8 12/12/2013 11:17 am Klaus Aehlig

Avoid lines longer than 80 chars

...as they're a lint error.

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

affe1792 12/11/2013 07:43 pm Klaus Aehlig

Merge branch 'stable-2.8' into stable-2.9

  • stable-2.8
    Version bump for 2.8.3
    Update NEWS for 2.8.3 release
    Support reseting arbitrary params of ext disks
    Allow modification of arbitrary params for ext
    Do not clear disk.params in UpgradeConfig()...
c7003a76 12/11/2013 01:32 pm Petr Pudlak

Move the generalized IO client from Luxi to UDSServer

No code is changed in this patch (except imports and qualifiers), only
moved.

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

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

43c329e7 12/11/2013 01:32 pm Petr Pudlak

Add MonadLog instance for `ReaderT r m`

This allows to use logging with the ReaderT monad transformer.

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

27f904f7 12/11/2013 01:32 pm Petr Pudlak

Add a MonadLog typeclass for monads that allow logging

This separates logging from IO, allowing to create unit tests in future
for functions that use it.

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

964a728f 12/11/2013 01:32 pm Petr Pudlak

Add fromJResultE and fromJVal that uses MonadError

Using MonadError is more correct than just "fail" on an arbitrary
monad, and more scalable when using monad type classes or monad stacks.

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

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

Add an Error instance for GanetiException

This allows it to be used with MonadError.

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

95e683c6 12/11/2013 01:31 pm Petr Pudlak

Add MonadPlus and MonadError instances for GenericResult

.. and ResultT.

While at it, generalize also the MonadPlus instance of GenericResult and
add some Functor/Applicative instances.

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

6e47412f 12/11/2013 12:07 pm Petr Pudlak

Generalize "validateCall" to be usable outside LUXI

Return the method (as any instance of JSON) and the arguments of a call.

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

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

0fbc8447 12/11/2013 12:07 pm Petr Pudlak

Encapsulate a server socket and its parameters

Instead of passing a bare server socket around, we pass it encapsulated
in a data type together with parameters such as read/write timeouts.

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

71a4c605 12/11/2013 12:07 pm Petr Pudlak

Split Luxi.hs into LUXI-specific functions and general ones

This will allow WConfD to use the general functions without importing
Luxi.hs.

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

6222b3a3 12/10/2013 01:32 pm Klaus Aehlig

Make luxid support WaitForJobChange

Make support the WaitForJobChange, waiting for a job to
change on certain monitored fields.

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