Statistics
| Branch: | Tag: | Revision:

root / src / Ganeti @ bfa99f7a

# Date Author Comment
0e42ef67 03/04/2013 12:35 pm Michele Tartara

Fix improperly formatted docstring

Change the docstring of chompPrefix to prevent the error
"doc comment parse failed" that was raised by some version of
haddock while generating the documentation for this function.

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

bfa99f7a 03/04/2013 12:35 pm Iustin Pop

Fix low verbosity levels in htools

In a few cases, we tested the verbosity level for (== 0), instead of
higher/lower than a certain value. If the user passes multiple
"--quiet" options, this can result in negative verbosity levels, which
behave like "extra verbosity"....

64b0309a 03/04/2013 12:35 pm Dimitris Aragiorgis

Fix confd issue regarding --no-lvm-storage

If cluster is initialized with --no-lvm-storage then volume_group_name
does not exist in config.data. Thus we must define it as optional in
confd.

Signed-off-by: Dimitris Aragiorgis <>
[: fixed Haskell RPC definition]...

2412bdea 02/22/2013 02:07 pm Iustin Pop

Fix another docstring typo

… no comment :)

Signed-off-by: Iustin Pop <>
Reviewed-by: Helga Velroyen <>
Reviewed-by: Michael Hanselmann <>

551b44e2 02/12/2013 03:47 pm Iustin Pop

Add a function to change an OpCode's priority

This simply updates the metaopcode submit priority.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

37fe56e0 02/12/2013 03:47 pm Iustin Pop

Add functions to parse CLI-level format of priorities

The current serialisation format for submit priorities is
integer-based, same as the opcode json serialisation. But for CLI
level, we need to support a string-based format, so we add functions
to parse and format this representation....

e247747c 02/12/2013 03:47 pm Iustin Pop

Add CLI-level option to override the priority

This just defined the new priority, with the same name as the Python one.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

a81ca843 02/12/2013 03:47 pm Iustin Pop

Enable use of the priority option in hbal

This patch adds the option to hbal, and uses it to tweak the submitted
jobs. There are also two small shelltests for testing the parsing.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

d41f6558 02/12/2013 03:47 pm Iustin Pop

Make hbal opcode annotation more generic

Currently, hbal code always uses annotateOpCode function, which means
we would have to pass the options data to all function in the call
chain if we wanted to make this more flexible.

By abstracting the type of the annotator and passing it as an argument...

bb63ccb0 02/12/2013 03:39 pm Helga Velroyen

Removes check for conflicts from NetworkDisconnect

This removes the check for conflicts from the Haskell
version of the OpCode NetworkDisconnect. This alignes
the Haskell code with the patch
"Force conflicts check in LUNetworkDisconnect" (which
is currently under review). I will submit these patches...

5cfa6c37 02/11/2013 05:31 pm Dimitris Aragiorgis

Remove network_type slot (Issue 363)

This slot was not used by Ganeti so the same info can be
provided via tags. In order not to break configuration data
we add a FromDict() method in Network config object that
removes the deprecated network_type (if found) and then invoke...

48616625 02/11/2013 05:31 pm Dimitris Aragiorgis

Remove family and size from network objects

This info is not used by Ganeti and therefore is removed.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Guido Trotter <>

5ba35653 02/08/2013 01:40 pm Guido Trotter

Make ParticalNic's network field of type String

This was applied to "master" along with extra changes affecting the
master branch only. Cherry-picking just the Objects.hs change.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

72747d91 02/07/2013 06:14 pm Iustin Pop

Remove use of 'head' and add hlint warning for it

Since 'head' is unsafe to use in most cases, this patch removes its
use from most of the code, adds a lint warning for it (and for tail as
well), and adds override annotations in the few cases where it's
actually OK to use it (mainly when using head over the result of...

6d3d13ab 02/05/2013 03:14 pm Iustin Pop

Fix typo in a comment

Signed-off-by: Iustin Pop <>
Reviewed-by: Michele Tartara <>

9411474b 02/05/2013 10:36 am Iustin Pop

Fix Haskell log file naming after virtual cluster changes

Commit 3329f4de changed the Haskell log file from constants to
functions, but introduced a bug: it uses now the daemon name instead
of the correct log file, which means "ganeti-confd.log" instead of...

516c52f2 01/29/2013 05:08 pm Dato Simó

CLI.hs: fix double spaces in option help strings

Some help strings with continuation backslashes ('\') were providing a
space both before and after the backslash, resulting in double spaces in
help output. Provide it only after the backslash, which fixes the issue and...

d316b880 01/21/2013 01:58 pm Iustin Pop

Renames and cleanup of variable names in confd

The current names are quite confusing; this patch cleans up the
confusion by making sure we use different terms for the two threads,
etc.

No actual code changes besides the renames.

Signed-off-by: Iustin Pop <>...

a6e054a8 01/21/2013 01:57 pm Iustin Pop

Add a function to get the current time in microseconds

In some cases we need higher resolution that seconds; I've settled on
microseconds as that is what 'threadDelay' wants, for exactly, so it's
easier if we keep the same units.

Signed-off-by: Iustin Pop <>...

ce817701 01/21/2013 01:57 pm Iustin Pop

Increase Haskell log file resolution

Currently the Haskell logging goes with the default time formatting,
which lacks sub-second resolution. This is not good, as it's too
coarse.

The patch adds picoseconds to the log; they will contain usually too
many zeroes, but the other option is to use a log format that (for...

7e7fa841 01/21/2013 01:57 pm Iustin Pop

First part of confd timer changes

This patch changes the resolution of the timers: the watcher timer
goes from 60s to 17s, and the polling-mode timer goes from 2 seconds
to 250ms. The code changes a bit more due to the changes in the units
of the various constants....

01eea342 01/21/2013 01:57 pm Iustin Pop

Change the polling thread sleep behaviour

Currently, the polling thread sleeps at the end of its body; the
original reason was that when the thread initially starts, we want to
load the config immediately (in the old-style config load model).

However, now we explicitly load the config, so we can make this thread...

c62df702 01/21/2013 01:57 pm Iustin Pop

Start confd in notify mode if we can

This patch changes the default model—where confd is always started in
polling mode—to a model where if possible we enable inotify mode
before starting any of the background threads.

There are some tricky details here: if we enable inotify, we should...

3190ad64 01/21/2013 01:24 pm Iustin Pop

Explicitly load the config at confd startup

Currently, confd main function doesn't load the config, but simply
forks the individual timer threads, which will—as a side effect-also
load the configuration as soon as they start.

However, this makes codes to the startup more complex, so let's...

9fb621af 01/18/2013 12:41 pm Yiannis Tsiouris

Text wrap in Haskell code

This adds two functions in Utils.hs: 'wrap' and 'trim' along with some
simple tests. 'wrap' is used in Common.hs for wrapping command
descriptions to a fixed line length, e.g. useful for the "--help"
option.

Signed-off-by: Yiannis Tsiouris <>...

e71c47d3 01/16/2013 03:56 pm Michele Tartara

Integrate DRBD with the report generation infrastructure

With this commit, the DRBD data collector does not only print the data
it extracts, but includes them in the proper JSON structure common to
all the data collectors, as prescribed by the design document....

13d3acab 01/16/2013 03:56 pm Michele Tartara

Add reporting infrastructure for data collectors

This commit adds the part of the JSON report generation code that will be
common to all the data collectors, according to the format specified in the
design document.

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

ace37e24 01/16/2013 03:56 pm Michele Tartara

Move getCurrentTime from Confd.Utils to Utils

The getCurrentTime function is of wide interest, so its moved to a more
appropriate position.

Signed-off-by: Michele Tartara <>
Reviewed-by: Iustin Pop <>

a7f0953a 01/15/2013 04:27 pm Iustin Pop

Make niceSort a wrapper over niceSortKey id

Currently, niceSort behaves differently than niceSortKey in cases
where the parsed groups are equal but the original not, as it uses
both members of the tuple as opposed to just the first one. Both
niceSortKey and the Python code use only the first one, so in corner...

2f3a3365 01/15/2013 11:42 am Helga Velroyen

Replace nodegroups' PartialNic by PartialNicParams

This fixes a bug that corrups the config when one adds a
network to a node group. I wil soon extend QA by some commands
that would have detected this.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Guido Trotter <>

ef947a42 01/14/2013 05:54 pm Dato Simó

Loader.hs: ignore expired ArSuspended policies

At the moment, because 'mergeData' is pure, it may set instance auto-repair
policies that are of the form `ArSuspended $ Until timestamp_in_the_past`.
If later on the auto-repair tool notices this, it has lost access to what...

e79f576c 01/14/2013 05:54 pm Dato Simó

Loader.hs: rewrite extractExTags to use chompPrefix

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

55416810 01/14/2013 05:54 pm Dato Simó

Loader.hs: set instance auto-repair policy in mergeData

'getArPolicy' and 'setArPolicy' follow the precedence rules introduced in
b1eb71c: within an object, the most restrictive tag wins; across object,
the nearest tag wins.

Signed-off-by: Dato Simó <>...

23594127 01/14/2013 05:54 pm Dato Simó

Instance.hs: add an 'arPolicy' field for auto-repair policy

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

b6aeda4a 01/14/2013 05:54 pm Dato Simó

Utils.hs: add a clockTimeToString function

This function allows to easily convert a ClockTime object to a string
representation of its timestamp (seconds-only).

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

b009f682 01/14/2013 05:54 pm Dato Simó

Utils.hs: function to chomp prefix + separator from a string

Some auto-repair tags are composed of a prefix and then an optional
argument; the new "chompPrefix" function in Utils.hs allows to strip a
prefix, allowing the last character (the separator) to be absent if there...

3e77a36c 01/14/2013 05:52 pm Dato Simó

Add initial constants and Haskell ADTs for auto repair

In this commit, the AutoRepairType and AutoRepairResult types are defined,
with the possible values specified in doc/design-autorepair.rst.

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

7ec2f76b 01/14/2013 05:52 pm Dato Simó

HTools/Types.hs: more auto-repair types

AutoRepairPolicy, AutoRepairStatus, and other auxiliary types are added.
These are used only internally by the auto-repair tool, and parsed from the
various object tags as defined in the design doc.

Signed-off-by: Dato Simó <>...

c816a371 01/10/2013 02:44 pm Michele Tartara

Fix typo in the DRBD parser types file

A missing letter has been added to a docstring.

Signed-off-by: Michele Tartara <>
Reviewed-by: Michael Hanselmann <>

d78970ba 01/08/2013 06:16 pm Michele Tartara

Support instance-minor pairing in the DRBD collector

This commits enables the DRBD data collector to use the Confd client to
gather information about the pairing between DRBD minors and instances.

For testing purposes, the DRBD data collector now requires either zero...

eb62691c 01/08/2013 06:16 pm Michele Tartara

Support integrating instance information in the DRBD parser

This commit modifies the DRBD parser and its data structures to include
information about the instance a DRBD minor belongs to.

Test files have been updated as well, to support the new field in the data...

7ce2f8ee 01/08/2013 11:26 am Michele Tartara

Fix a bug in the generation of completion information

Completion information for multi-command binaries were not generated in
the correct way, so the build-bash-complation script failed when such a
binary was actually found.

This commit fixes this issue, and a related docstring typo as well....

8d459129 01/07/2013 07:00 pm Michael Hanselmann

Add "use_locking" parameter to network query opcode

This was extracted from a patch by Dimitris Aragiorgis with the subject
“Add locking to _NetworkQuery”. The rest of the patch did no longer
apply and will require more work.

Signed-off-by: Michael Hanselmann <>...

2663321c 01/04/2013 10:47 am Michele Tartara

Improve the reception of replies in the confd client

If a received reply is valid and there is still no valid reply,
keep it, no matter how new it is.

Signed-off-by: Michele Tartara <>
Reviewed-by: Guido Trotter <>

f6b9c6e5 12/28/2012 05:50 pm Iustin Pop

Fix a bad data type in Hcheck.hs

While trying to understand why some code was not being tested, I
realised that we have a bad data type in Hcheck.hs.

We have "data Level = GroupLvl | ClusterLvl", but then we need to pass
the group name/index as well, so we have functions that look like the...

2fd5a116 12/28/2012 05:50 pm Iustin Pop

Move src/Ganeti/HTools/Program.hs to Program/Main.hs

This removes one more tab conflict; this is the last module in our
code where we have both x.hs and x/.

Furthermore, we collapse all actual code into the new Main.hs module,
leaving the htools.hs basically empty (will allow better testing in...

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