Statistics
| Branch: | Tag: | Revision:

root / src / Ganeti @ e181c8cd

# Date Author Comment
e181c8cd 05/13/2014 07:31 pm Klaus Aehlig

Add function to get master IP parameters from configuration

Add a function to extract the MasterNetworkParameters from
the ConfigData. That will be needed to set up the master IP.

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

ee483117 05/13/2014 07:30 pm Klaus Aehlig

Add an object describing the master network parameters

This will be used in the RPC call to the node daemon asking
it to set up the master IP address.

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

ba94617f 05/13/2014 07:30 pm Klaus Aehlig

Use getMasterOrCandidates

...instead of replicating the functionality on the fly.

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

fe71113e 05/13/2014 11:36 am Hrvoje Ribicic

Add the compression tools parameter

This patch makes the myriad of changes necessary for the compression
tool parameter to be added. The filtering of compression tools for
suspicious entries has been added for this exact purpose.

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

293e1c1d 05/13/2014 11:36 am Hrvoje Ribicic

Make arbitrary compression tools work

We assume that the compression tools the user supplies use stdin and
stdout for handling data, and that a switch is used to distinguish
compression from decompression. This patch introduces these constraints
by adding the invocation of these tools to the import-export daemon....

86012ec2 05/13/2014 11:36 am Hrvoje Ribicic

Disable protections against unknown compression types

Ganeti took care to restrict all possible compression invocations to
the few options that were available. This patch strips away all of
those, but does not allow any interesting and dangerous commands...

8677c3a9 05/13/2014 11:36 am Hrvoje Ribicic

Extend offered compression types

This patch adds a few new types of compression supported by Ganeti:
gzip-fast (gzip -1), gzip-slow (ordinary gzip), and lzop. gzip now
becomes a shorthand for gzip-fast kept for compatibility.

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

dddcb604 05/12/2014 04:06 pm Petr Pudlak

Export RPC functions for temp. DRBD reservations in WConfd

These functions will replace the methods in config.py.

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

1d82406d 05/12/2014 04:06 pm Petr Pudlak

Add the state of temporary DRBD reservations to WConfd

.. and the corresponding functions for reading/modifying them.

The modification functions are somewhat more complex, because they need
to support that the modification function uses ConfigData and can...

40d4538b 05/12/2014 04:06 pm Petr Pudlak

Utility function for modifying an IORef using a lens

.. and a supplied function that works inside the lens.

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

c5daf4e6 05/12/2014 04:06 pm Petr Pudlak

New module for temporary reservation of config. resources

This patch adds the first step, the reservation of DRBD minors.

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

4116c9e0 05/12/2014 04:06 pm Petr Pudlak

A utility function for finding the first unused element

.. in a given set. This is similar to FindFirst function in our Python
code-base, but this one automatically picks the element after the end of
the set, if the set has no holes.

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

a90c41e2 05/12/2014 04:06 pm Petr Pudlak

A function for listing the DRBD minors of an instance

This includes nested disk children.

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

46049766 05/12/2014 12:42 pm Ilias Tsitsimpis

Add DiskParams to Disk object

The 'DiskParams' slot was missing from Haskell's Disk objects.
Since Wconfd is now responsible for writting the config file this was
causing the 'params' slot to not be written in the config file.

Signed-off-by: Ilias Tsitsimpis <>...

d4c58d99 05/12/2014 12:42 pm Ilias Tsitsimpis

Rename DiskParams to GroupDiskParams

DiskParams was used for the cluster/group disk parameters type. This
patch renames it to GroupDiskParams and uses the DiskParams type for
the parameters of one single Disk object.

Signed-off-by: Ilias Tsitsimpis <>...

3648dad3 05/09/2014 03:05 pm Klaus Aehlig

Merge branch 'stable-2.11' into stable-2.12

  • stable-2.11
    Add hsqueeze to NEWS
    kvm: use a dedicated QMP socket for kvmd
    Add design-node-security.rst to docinput
  • stable-2.10
    Test parallel instance ops and plain instances
    Test parallel creation of DRBD instances...
866e1f76 05/09/2014 02:01 pm Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Test parallel instance ops and plain instances
    Test parallel creation of DRBD instances
    Test parallel job submission performance
    Test parallel instance query operations
    Test parallel instance operations...
33bb2d08 05/08/2014 05:05 pm Klaus Aehlig

Support restricted migration

Make hbal support an option to disallow ReplacePrimary moves
and restrict ReplaceAndFailover to instances where the primary
node is drained. If used in evacuation mode, the only migration
moves will be off the drained nodes.
...

23dc58d5 05/08/2014 05:05 pm Klaus Aehlig

Add an option for restricted migration

This option will allow node evacuation with migrations only
off the nodes to be evacuated.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Hrvoje Ribicic <>

45827af8 05/05/2014 05:01 pm Klaus Aehlig

For RPCs, never log arguments

...to keep the log to a manageable size.

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

f55ed516 05/05/2014 05:01 pm Klaus Aehlig

Limit size of request locking

...as we currently move the whole configuration over the
network.

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

43b1f49f 05/05/2014 02:22 pm Ilias Tsitsimpis

Lift the Disk objects from the Instances

This patch replaces 'instance.disks' with 'GetInstanceDisks' everywhere
in the codebase. From now on, the function 'GetInstanceDisks' from the
config file has to be used in order to get the disks of an instance.
Also the functions 'AddInstanceDisk'/'RemoveInstanceDisk' have to be...

6e7c1645 05/05/2014 02:22 pm Ilias Tsitsimpis

Use 'getInstDisks' function to retrieve the disks

Change Haskell's Query code to use Config's 'getInstDisks' function in
order to retrieve the instance's disks.

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

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

Add methods to config to get disks

'GetInstanceDisks' returns a list of disk objects for the given
instance. 'GetDiskInfo' returns information about a disk given its UUID.
These functions should be used instead of the Instance's disk method.

Also add the 'getDisk' and 'getInstDisks' functions in Haskell but leave...

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

425ebca4 04/29/2014 05:04 pm Apollon Oikonomopoulos

kvm: use a dedicated QMP socket for kvmd

The KVM daemon keeps a persistent connection to the instances' QMP
sockets, listening for asynchronous events. As each monitor socket
(either human, or QMP) can handle only one client at a time, this has
the side-effect that QMP cannot be used for regular instance operations....

882e7d72 04/29/2014 02:13 pm Petr Pudlak

Retry forking a new process several times

Apparently due to some library bug, forking sometimes fails: The new
process is running, but it doesn't start executing. Therefore we retry
the attempt several times.

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

5514a707 04/29/2014 02:13 pm Petr Pudlak

Add a module with utility functions for MonadPlus operations

In particular, functions for retrying a MonadPlus action:
It is repeated until it returns a valid result.

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

d6f38e24 04/25/2014 06:38 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    Make GlusterFS tests dual-stack-aware
    Moving release date of 2.11.0 to 25th of April
    Revision bump for 2.11.0
    Prepare NEWS file for release of 2.11.0
    Fix Xen instance state
  • stable-2.10
    Fix failed DRBD disk creation cleanup...
a37ab322 04/25/2014 04:42 pm Klaus Aehlig

Pass the debug level to forked jobs

When forking off jobs, make them inherit the debug level
of the parent process (i.e., of luxid). In this way, we
can debug jobs in test clusters without cluttering production
logs. We pass the debug level through the environment instead...

5423b15f 04/24/2014 04:43 pm Marco Casavecchia (aka MCM)

Added support for disk native AIO mode for KVM

This patch adds support for the native aio on KVM
hypervisor.

Basically, It adds a new HV-KVM optional parameter
"disk_aio" that can be set with the followings values:
threads (the default for KVM) or native. If not set, it...

a15a030f 04/24/2014 03:13 pm Petr Pudlak

Fix a typo in a debug message

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

445c5ec4 04/24/2014 03:13 pm Petr Pudlak

Check for own locks when checking job death in Luxi

Otherwise a job that is being started is falsely reported as dead.

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

1c409f58 04/24/2014 03:12 pm Petr Pudlak

Mark a job as failed, if it fails to start

.. and add a reason trail message. Otherwise failed jobs hang, never
finishing.

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

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

htools metric: use weighted vcpu/pcpu ratio

...as described in doc/design-cpu-speed.rst

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

1e82a030 04/24/2014 02:11 pm Klaus Aehlig

Add effective CPU overcommitment as derived node parameter

Add a derived parameter for nodes, providing the ratio of
virtual CPUs per CPU-speed weighted physical CPU.

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

6fbf6b4d 04/24/2014 02:11 pm Klaus Aehlig

htools: support cpu_speed at luxi backend

Make the htools luxi backend also query for cpu_speed
and take the result into account.

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

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

htools: add CPU speed to the text backend

Extend the text format by an optional column for each node
containing the relative CPU speed, if provided.

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

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

htools: add function to set CPU speed

Add a function on nodes modifying the CPU speed
parameter.

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

353b012e 04/24/2014 02:11 pm Klaus Aehlig

htools: extend Node by CPU speed

Add an additional parameter to the representation of a node
for the relative CPU speed, initially set to 1.

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

8fd6c773 04/24/2014 02:11 pm Klaus Aehlig

Add a new node parameter cpu_speed

This parameter will describe the speed of the CPU relative
to the speed of a "normal" node in this node group.

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

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

c666e6aa 04/24/2014 09:46 am Petr Pudlak

When checking job death, check if its lock is the Luxi lock

In this case, the call trying to acquire a shared lock always succeeds,
because the daemon already has an exclusive lock, which falsely reports
that the job has died.

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

cab9400a 04/24/2014 09:46 am Petr Pudlak

Provide a more detailed messages when cancelling jobs

In particular, distinguish the cases when a job could not have been
cancelled and when a job has already finished.

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

234f9032 04/24/2014 09:46 am Petr Pudlak

Fix a typo in a debug message

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

58d29849 04/22/2014 07:33 pm Klaus Aehlig

Add reason-trail entry on failing jobs

When failing a job, add an entry to the reason trail, indicating
what made the job fail (e.g., failed to fork or detected job death).

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

4c67ea74 04/22/2014 07:33 pm Klaus Aehlig

Add lenses for OpCodes

...to simplify manipulation of them.

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

41b63f8f 04/22/2014 07:33 pm Klaus Aehlig

Add a prism for ValidOpCode

...to be able to operate on the MetaOpCode that
is behind an InputOpCode (if we're in the right
component of the sum).

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

c3bea705 04/22/2014 07:33 pm Klaus Aehlig

Add lenses for the job queue objects

...so that manipulations deep within such an object
get more simple.

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

a35a4f52 04/22/2014 07:33 pm Klaus Aehlig

Move the definition of JQueue objects to a separate file

Move all the definition of objects to a spearate file. In
this way, the lense module for JQueue can use these objects,
while JQueue can use the lenses. For use outside, we reexport
the objects.

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

17aa37ff 04/22/2014 07:33 pm Klaus Aehlig

Export reasonTrailTimestamp

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

44f7f902 04/17/2014 06:59 pm Petr Pudlak

Use toErrorBase to slightly improve code in WConfd server

.. and get rid of unnecessary variable binding.

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

4b3e9fa7 04/17/2014 06:59 pm Klaus Aehlig

Clean up dead jobs from the job queue

Make the onTimeWatcher of the job queue scheduler also verify
that all notionally running jobs are indeed alive. If a job is
found dead, remove it from the list of running jobs and update
the job file to reflect the unexpected death....

ec98ea2b 04/17/2014 06:59 pm Petr Pudlak

Cancel jobs by sending SIGTERM

We can only send the signal if the job is alive and if there is a
process ID in the job file (which means that the signal handler has been
installed). If it's missing, we need to wait and retry.

In addition, after we send the signal, we wait for the job to actually...

cd202891 04/17/2014 06:59 pm Petr Pudlak

Add debugging statements to Ganeti.Utils.Livelocks

.. so that it can be viewed what lock file and with what result was
tested.

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

f2717b21 04/17/2014 06:59 pm Petr Pudlak

Enhance watchFile in Ganeti.Utils

The functionality is kept the same, but instead of comparing for
equality, a more general version based on a predicate is added.
This allows to base the condition on only a part of the output.

In addition, 'bracket' is added so that inotify data structure is...

633d59ae 04/17/2014 06:59 pm Petr Pudlak

Add MonadLog instance for MaybeT

.. so that it's possible to use logging operations there.

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

794c3863 04/17/2014 06:59 pm Petr Pudlak

When forking a job, close all unnecessary file descriptors

This is a bit problematic as there is no portable way how to list all
open file descriptors, and we can't track them all, because they're also
opened by third party libraries such as inotify. Therefore we use...

f40023d4 04/17/2014 06:59 pm Petr Pudlak

Add a utility function for retrying within MonadError

`orElse` works just as `mplus` of ResultT, but it only requires
`MonadError` and doesn't accumulate the errors, it just returns the
second one, if both actions fail.

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

4cfa01f4 04/17/2014 06:59 pm Petr Pudlak

When starting the Luxi daemon, check if it's able to fork

If a Haskell program is compiled with -threaded, then inheriting open
file descriptors doesn't work, which breaks our job death detection
mechanism. (And on older GHC versions even forking doesn't work.)...

d182955c 04/17/2014 06:59 pm Klaus Aehlig

Make luxid aware of SIGCHLD

As luxid forks off processes now, it may receive SIGCHLD
signals. Hence add a handler for this. Since we obtain the
success of the child from the job file, ignoring is good
enough.

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

efb4c025 04/17/2014 06:59 pm Petr Pudlak

Execute jobs as processes from Luxi

.. instead of just letting the master daemon to handle them.

We try to start all given jobs independently and requeue those that
failed.

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

4b887066 04/17/2014 06:59 pm Petr Pudlak

Add a function for failing a queued job

.. which will be used if the Luxi daemon attempts to start a job, but
fails.

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

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

3b8150c3 04/17/2014 06:59 pm Petr Pudlak

Add utility function for creating fields with process IDs

.. using the POSIX type ProcessID.

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

7b4bde57 04/17/2014 06:59 pm Petr Pudlak

Add Haskell and Python modules for running jobs as processes

They will be used by Luxi daemon to spawn jobs as separate processes.

The communication protocol between the Luxi daemon and a spawned process
is described in the documentation of module Ganeti.Query.Exec....

7b0a9096 04/17/2014 06:56 pm Petr Pudlak

Add an utility function for writing and replicating a job

Use the function where appropriate.

Also handling of CancelJob is slightly refactored to use ResultT, which
is used by the new function.

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

64f3a6ea 04/17/2014 06:56 pm Petr Pudlak

Add a livelock file for the Luxi daemon

The file is initialized and kept within JQStatus.
It is temporarily assigned to jobs spawned by Luxi until they create
their own livelock files.

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

35e3ce28 04/17/2014 06:56 pm Petr Pudlak

Move `isDead` from DeathDetection to Utils/Livelock

.. as it has nothing special to do with WConfd and fits the new module
better.

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

2dcba67f 04/17/2014 06:56 pm Petr Pudlak

Add a module for livelock related functions

Currently it exports a function for creating livelock files.

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

2745aa81 04/17/2014 06:56 pm Petr Pudlak

Add functions for computing the full path of livelock files

.. so that Haskell code can create them at the proper place.

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

45ff650d 04/17/2014 06:56 pm Petr Pudlak

Allow closing a RPC client, keeping its file descriptors

The purpose is to keep the communication channel open, while replacing a
'Client' with something else.

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

0191874e 04/17/2014 06:56 pm Petr Pudlak

Separate client and server config for Luxi communication

The daemon identity is only required for server connections to set the
access mode to its socket appropriately. For client connections it's
not needed and requiring it prevents creating standalone clients, for...

8275c414 04/17/2014 06:56 pm Petr Pudlak

Extend 'lockFile' to return the file descriptor

.. of the locked file so that it can be closed later, if needed.

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

f63f7419 04/17/2014 06:56 pm Petr Pudlak

Allow creation if bi-directional pair of Luxi-like clients

This allows a process and its forked child to communicate with each
other using our standard infrastructure.

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

e5b675dc 04/17/2014 06:56 pm Petr Pudlak

Separate read and write handle in the Luxi Client data type

This is required for inter-process pipes, which are fully supported only
as uni-directional.

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

ff60a62f 04/16/2014 12:38 pm Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Fix 'gnt-cluster' and 'gnt-node list-storage' outputs
    Postpone 2.10.3 release to Wednesday, 16th
  • stable-2.9
    Set exclusion tags correctly in requested instance
    Export extractExTags and updateExclTags...
7384c96a 04/15/2014 07:20 pm Klaus Aehlig

Merge branch 'stable-2.9' into stable-2.10

  • stable-2.9
    Set exclusion tags correctly in requested instance
    Export extractExTags and updateExclTags
    Document spindles in the hbal man page
    Sample logrotate conf breaks permissions with split users

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

93c6a885 04/15/2014 06:36 pm Klaus Aehlig

Set exclusion tags correctly in requested instance

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

2a6f6ef7 04/15/2014 06:36 pm Klaus Aehlig

Export extractExTags and updateExclTags

...from the htools Loader. These functions are needed when
parsing the requested instance of an allocator request.

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

3f11a477 04/15/2014 02:39 pm Klaus Aehlig

Report non-existent jobs as such

When queried to WaitForJobChange of an non-existent job,
report this as an error.

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

3ea0d511 04/11/2014 05:02 pm Klaus Aehlig

fix typo

Signed-off-by: Klaus Aehlig <>
Reviewed-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....

39c1e700 04/11/2014 05:02 pm Klaus Aehlig

Use a LockWaiting structure instead of a LockAllocation

In this way, we will be able to support in WConfD waiting for locks
to become available instead of having to poll for them.

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

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

Support opportunistically allocating locks

Again, this just wraps around updateLocks, sequentially trying
to obtain all the locks mentioned.

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

6dec5ace 04/11/2014 05:02 pm Klaus Aehlig

Support intersecting locks

...in waiting structures. This is just a convenience wrapper
around freeLocksPredicate.

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

639997b9 04/11/2014 05:02 pm Klaus Aehlig

Support downgrade and freeing locks

Add convenience functions for downgrading and freeing
locks in a waiting structure. As these functions are
guaranteed to always succeed, they will also drop any
pending request of the owner.

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

32935f7a 04/11/2014 05:02 pm Klaus Aehlig

Do not notify the current requester

The current implementation of lock waiting yields as notification
set the list of all owners whose requests could be fulfilled. This
includes the initiating request. While technically correct, the
original requester gets the answer of the request and hence does not...

50d756af 04/10/2014 04:30 pm Klaus Aehlig

Fix a race in rescheduling jobs

When handling the queue, in particular at analyzing job dependencies,
we assume that all non-finalized jobs are present in the Queue data
structure. When rescheduling jobs we move them from the running part
of the queue to the scheduled part again. In order to comply with the...

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

Instance JSON LockWaiting

...so that it can be used by WConfD who needs to be
able to persist all its data.

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

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

Instance JSON LockRequest

...as pending requests need to be serialized when serializing
lock waiting structures.

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

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

Add a function to get a LockWaiting from an extRepr

Add a function to obtain some lock waiting structure from a
given extensional representation.

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

7fe8baad 04/10/2014 03:18 pm Klaus Aehlig

Provide an extensional representation of LockWaiting

The internal representation of the lock waiting structure contains
some arbitrariness---pending requests are arbitrarily keyed by one
of the lock owners that blocks them. Therefore, LockWaiting is not
an instance of Eq. To allow some meaningful form of comparison...

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

Export the set of pending requests

...from a lock waiting structure. In this way, all the data
describing the behavior can be inspected.

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

38b3e03d 04/10/2014 01:41 pm Klaus Aehlig

Schedule on jobs where all job dependencies are finished

Jobs may depend on other jobs in the sense that they may only be started
once a given job is finalized. For a job process, however, it is hard to
determine if the status of a different job without a significant overhead....

6a2e71d9 04/10/2014 01:41 pm Klaus Aehlig

Add function to obtain job dependencies

Add a function that computes the list of job ids a job depends
on. This will allow to schedule only those jobs for execution,
where all jobs it depends on have been finalized.

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

55433d5b 04/10/2014 01:41 pm Klaus Aehlig

Add function to obtain job id from a dependency

Add a function that extracts the job id, if given in absolute
form, from a job dependency.

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

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