Statistics
| Branch: | Tag: | Revision:

root / src / Ganeti / JQueue.hs @ c6013594

History | View | Annotate | Download (16.1 kB)

# Date Author Comment
2af22d70 11/28/2013 04:59 pm Klaus Aehlig

Provide a function to set the received times tamp of a job

This is the pure function for changing the received time stamp;
obtaining the actual time stamp has to be done in IO.

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

c3a70209 11/28/2013 04:59 pm Klaus Aehlig

Document the jobqueue timestamp format

...and also provide a method to get the current time in
that format.

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

493d6920 11/26/2013 03:31 pm Klaus Aehlig

Add function to enqueue jobs

Add a function that ensures that a given set of jobs gets executed at
the appropriate time. At the moment, this is still the simple
mechanism of handing over everything to masterd; but even at this
stage, it has the benefit of allowing to remove code duplication in...

9fd653a4 11/26/2013 03:31 pm Klaus Aehlig

Add wrapper to replicate many jobs

Add a convenience wrapper around replicateJob to replicate
many jobs to the master candidates.

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

b5a96995 11/26/2013 03:31 pm Klaus Aehlig

Add function to replicate a job to the master candidates

As luxid will be handling the job queue soon, add a utility to
replicate jobs to all master candidates. Also log errors.

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

f7819050 11/26/2013 03:31 pm Klaus Aehlig

Release internal lock for serial file later

When allocating new jobs, the new serial is replicated among
all master candidates. To avoid races with a later job id
allocation, keep the internal lock till after the replication
attempt.

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

1b94c0db 11/08/2013 07:00 pm Klaus Aehlig

Add the predicate of the queue being open

Adding jobs to the queue is only allowed if the queue
is not drained.

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

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

Provide a function to write jobs to disk

This function writes a (non-archived) job to disk. The file
name can be computed from the job id, which is part of the job.

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

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

Provide means to allocate new job ids

Add utility functions to allocate new job ids by increasing
the value stored in the serial file. As this function is
used in a multi-threaded program, synchronize access over
an internal lock.

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

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

Provide method to read job serial number

This methods allows reading the maximal job serial number from
disk.

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

1c1132f4 11/08/2013 07:00 pm Klaus Aehlig

Provide convenience function to create Job from op-codes

This function handles the pure part of generating a job,
i.e., assuming the job id already assigned and not setting
time stamps.

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

4b49a72b 11/08/2013 06:59 pm Klaus Aehlig

Provide a convenience method to optain a QueuedOpCode

When generating jobs from sequences of op-codes, it is necessary
to wrap op-codes into queued form.

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

3cecd73c 04/08/2013 12:25 pm Michele Tartara

Backwards compatibility fix for Lucid

The code introduced by the previous commit triggered a possible library
conflict in Ubuntu Lucid.

This patch introduces an equivalent but more widely acceptable version of
the same code.

Signed-off-by: Michele Tartara <>...

be0cb2d7 04/08/2013 10:50 am Michele Tartara

Properly export errors while reading job list

In case of problems while reading the job list from disk (such as permission
errors) confd would silently fail, writing a warning on the log file but
sending an empty list and no error message to the client.
...

3add7574 12/24/2012 11:38 pm Iustin Pop

Rename htools/ to src/

Per offline discussions, this is the first patch of the
renames. Tested with "make distcheck", seems to work fine.

The only change outside of the renaming is a bit of simplification in
the .gitignore rules; otherwise, simply s/htools/src/....