Statistics
| Branch: | Tag: | Revision:

root @ 5e12acfe

# Date Author Comment
5e12acfe 11/16/2012 03:57 pm Michael Hanselmann

rapi: Add new user option for querying

This was requested in issue 301. Before this patch, requests to
“/2/query/*” and “/2/instances/*/console” would require authentication
with a user with write access. Since that is not strictly necessary, a
new user option named “read” is added....

7b0476cf 11/16/2012 02:32 pm Michele Tartara

Add Utility functions for loading data from test files

They mimic their python counterparts.

Added functions:
  • getSourceDir
  • testDataFilename
  • readTestData
  • readPythonTestData

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

ff247692 11/16/2012 12:00 pm Michele Tartara

Improved TestHelper module docstring

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

f92ed8ab 11/15/2012 02:30 pm Michael Hanselmann

Move gnt_cluster.SHOW_MACHINE_OPT to cli

This allows the option to be re-used in other places.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

17071597 11/15/2012 02:21 pm Guido Trotter

Add ganeti-node-role ocf example file

This allows offlining nodes that don't respond if they are part of a
linux-HA cluster.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

aa75500a 11/15/2012 02:21 pm Guido Trotter

Add ganeti-master-role.ocf example file

This allows controlling the cluster master role if the nodes are part of
a linux-HA cluster.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

32a569fe 11/15/2012 12:20 pm Iustin Pop

Cleanup THH function use from built module namespace

Currently, THH.hs "injects" into the built code names of library
functions like Text.JSON.makeObj, Ganeti.JSON.fromObj, etc. built
directly from strings, via (e.g.)

varE (mkName "makeObj")

This means that the "makeObj" name must exist in the target module,...

61899e64 11/14/2012 06:05 pm Iustin Pop

Switch Attoparsec/unicode test from QC to HUnit

This is not a quickcheck property, since it doesn't have any
variable/arbitrary inputs. So let's make it a test case, and shorten a
bit the name.

Also, sorry for not catching this in the review.

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

bfbd12f7 11/14/2012 12:07 pm Michael Hanselmann

Warn on invalid lines in HTTP user files

Without this change, invalid lines or values would be silently ignored.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

3e0b97b5 11/14/2012 10:44 am Michael Hanselmann

Don't check for remote command directory as file storage

This test does not work properly if localstatedir is not “/etc”.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

fe8f80bd 11/14/2012 10:21 am Michael Hanselmann

Document master daemon's shutdown behaviour

This wasn't clearly documented until now.

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

df99f3a9 11/14/2012 10:16 am Michael Hanselmann

pathutils: Add directory for remote commands

Also add tests to ensure it's never allowed as a file storage path. A
constant for the lock file is also added.

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

2f18052f 11/14/2012 10:16 am Michael Hanselmann

utils.process.RunResult: Always set "fail_reason" attribute

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

23b9930c 11/14/2012 10:15 am Michael Hanselmann

Add previously missing node daemon GID to getent mock

The UID is there, the GID wasn't.

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

ebfb2f46 11/14/2012 10:15 am Michael Hanselmann

Add test utility to count calls to function

In some cases it's nice to verify a function has been called exactly N
times. This is going to be used in tests for remote commands.

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

ecd11bb0 11/14/2012 02:38 am Michael Hanselmann

Sort content of generated RPC code

This is similar to commit f5ce761. A stable sort order makes changes
between versions easier to find.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

105f0d47 11/13/2012 10:21 pm Michael Hanselmann

Add new test for RAPI

Unlike existing tests, this actually tests RAPI at the interface with
the HTTP server. This way authentification can also be tested. A test
for “/2/query/…” is included as it's a bit special.

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

e9e07c9c 11/13/2012 09:28 pm Michael Hanselmann

Add “gnt-job change-priority” sub-command

This can be used to change the priority of a pending or running job (the
latter only if there are unprocessed opcodes).

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

f63ffb37 11/13/2012 09:28 pm Michael Hanselmann

Expose changing job priority via LUXI

A new LUXI request is added, in both Python and Haskell.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>
Reviewed-by: Iustin Pop <>

4679547e 11/13/2012 09:20 pm Michael Hanselmann

jqueue: Allow changing of job priority

This is due to a feature request. Sometimes one wants to change the
priority of a job after it has been submitted, e.g. after submitting an
important job only to later notice many other pending jobs which will be
processed first. Priority changes only take effect at the next lock...

99fb250b 11/13/2012 09:20 pm Michael Hanselmann

jqueue: Set task ID for jobs added to workerpool

The job ID is re-used as the task ID, as job IDs are unique.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

bba69414 11/13/2012 09:20 pm Michael Hanselmann

workerpool: Preserve task number when deferring

When a task is deferred it should receive the same task ID upon being
returned to the pool.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

9a2564e7 11/13/2012 09:20 pm Michael Hanselmann

workerpool: Add method to change task's priority

Using the task ID a pending task's priority can be changed. This will be
used to change the priority of jobs in the workerpool.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

125b74b2 11/13/2012 09:20 pm Michael Hanselmann

workerpool: Change data structure for priority change

To prepare for the addition of a new function allowing changing a
pending task's priority, the internal data structure is slightly
changed. The (optional) task ID is stored as part of the task entry. A...

39f0eea5 11/13/2012 03:42 pm Iustin Pop

Automatically enable version-dependent GHC flags

Some GHC flags are very useful, but only appear in more recent GHC
versions. To support the use of such flags while still supporting
older compilers, let's add conditional checks and enabling based on
the results....

43b3b5c1 11/13/2012 01:38 pm Michele Tartara

Added attoparsec unit test for Unicode parsing

Attoparsec is known to have had issues with parsing non-ASCII strings.
This test makes sure that parsing of Unicode characters works fine.

Signed-off-by: Michele Tartara <>
[iustin: small doc string fixes]...

35c6e63d 11/13/2012 11:42 am Michele Tartara

Add "Attoparsec" to the optional haskell packages

This will be needed for the data collectors of the monitoring agent.

  • Detection of the library
  • Creation of the appropriate variables
  • Update to the installation documentation

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

e02ee261 11/13/2012 11:33 am Helga Velroyen

Documentation for the NODE_RES level

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

6376dcc0 11/13/2012 10:29 am Iustin Pop

Improve make regen-vcs-version

"make regen-vcs-version" is run at every ./devel/upload time, in order
to have reasonably up-to-date information in the uploaded
scripts/binaries. However, this means it currently triggers
recompilation of (at least) Ganeti/Version.hs, and sometimes more than...

67e4fcf4 11/13/2012 10:28 am Iustin Pop

Fix two hlint warnings

Sorry, I broke lint again :), by introducing two sub-standard changes.

Additionally, this silences an older existing warning that only
triggers with some versions of hlint (e.g. 1.8.28 which is present in
Wheezy).

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

09b72783 11/12/2012 06:51 pm Michael Hanselmann

RunCmd: Expose "postfork" callback

The “_postfork_fn” parameter was only used for tests until now. To
implement a good locking scheme, remote commands must also make use of
this callback to release a lock when the command was successfully
started (but did not yet finish)....

551a29df 11/12/2012 06:17 pm Iustin Pop

Merge branch 'devel-2.6' into master

  • devel-2.6:
    Improve error message when migration status fail
    Fix type error in kvm/GetMigrationStatus
    Fix PID file writing in Haskell daemons

Conflicts (both trivial):
htools/Ganeti/Daemon.hs (_writePidFile rename)...

112b6e89 11/12/2012 06:05 pm Iustin Pop

Merge branch 'stable-2.6' into devel-2.6

  • stable-2.6:
    Improve error message when migration status fail
    Fix type error in kvm/GetMigrationStatus
    Fix PID file writing in Haskell daemons

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

4041a4e3 11/12/2012 03:14 pm Iustin Pop

Improve error message when migration status fail

Commit 6a1434d7 (“Make migration RPC non-blocking”) changed the API
for reporting migration status, but has a small cosmetic bug: if the
migration status if failure, but the RPC itself to get the status
didn't fail, it shows the following error message:...

62457f51 11/12/2012 03:13 pm Iustin Pop

Fix type error in kvm/GetMigrationStatus

Commit 6a1434d7 (“Make migration RPC non-blocking”) changed from
raising HypervisorErrors to returning MigrationStatus
objects. However, these objects don't have an "info" attribute, so
they can't pass a reason back (which is in itself a bug); but the KVM...

a4c0fe1e 11/12/2012 01:29 pm Iustin Pop

Fix PID file writing in Haskell daemons

Currently, the code uses createFile, which has the effect of always
truncating the file. This is bad, as the content of the PID file is
wiped even when we wouldn't be able to lock it!

We switch to openFd (createFile is just a wrapper over that), and we...

29a30533 11/12/2012 01:21 pm Iustin Pop

Remove unsafePerformIO usage

We need to change a few things, most importantly CLI options defaults,
but otherwise we already used the path to files from functions which
were already in the I/O monad, so we don't have to change much of the
code flow.

Additionally, Path.hs now has an explicit export list, to stop...

37904802 11/12/2012 01:21 pm Iustin Pop

Change keyToFilename/readSSconfFile interaction

Currently, keyToFilename uses itself the default config path. In the
light of making that an function in the IO monad, let's remove the
"default" path functionality from this function and make it always
require the config path; its caller, readSSConfFile, can then do the...

d66aa238 11/12/2012 01:19 pm Iustin Pop

Change type of program options to 'IO [Options]'

Some options have defaults that depend on the environment, and we
could handle these in two ways:

- use a place-holder value (e.g. data X a = Default | Custom a) that
is later read from the environment
- move the options list to IO monad, where it can read the...

48483a2e 11/12/2012 12:02 pm Iustin Pop

Two small logging improvements

The "starting" message is changed to match the Python one, and in case
the preparation fails, we also log the error (beside printing it on
stderr or writing it to the error reporting pipe), as at this time
logging is usually set up....

73b16ca1 11/12/2012 12:02 pm Iustin Pop

Annotate confd startup/luxi binding error

The luxi binding is now annotated for better readability.

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

e14b84e9 11/12/2012 12:02 pm Iustin Pop

Switch writing of PID file to new reporting style

Currently, the writing of the PID file uses a "standard" error
reporting: catch exception, transform it into a 'Result' type, leave
handling of that to the caller. However, for daemon startup, we
actually want exceptions to be propagated up until the handler which...

7413b229 11/12/2012 12:02 pm Iustin Pop

Move and rename BasicTypes.annotateIOError

It turns out that annotateIOError already exists in the standard
library, with a different purpose (this made me waste 10 minutes
trying to understand why the types were wrong…). Let's move this out
of BasicTypes, since it's used only in Daemon.hs, and also rename it....

b9097468 11/12/2012 12:02 pm Iustin Pop

Switch daemon startup to pipe-based error reporting

This changes the daemon reporting error to the same mechanism as in
Python: use a pipe which is written to from the forked children.

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

ef3de7b0 11/12/2012 12:02 pm Iustin Pop

Move preparation steps of confd in prepMain

This does the address parsing earlier, before we fork, for
better/faster error reporting.

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

4c3f55b8 11/12/2012 12:02 pm Iustin Pop

Split queryd run into prepare and exec

This will help with the general daemon split of prepare/run, and flag
errors earlier in the startup.

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

d8e7c45e 11/12/2012 12:00 pm Iustin Pop

Convert tag objects to a safer type

Currently, we keep information about the "target" of a tag operation
in a data type similar to (TagKind, Maybe String). This is unsafe, as
nothing (at the type level) prevents us from accidentally having
(TagCluster, Just "instance1.example.com"), or (TagInstance, Nothing)....

88609f00 11/12/2012 11:44 am Iustin Pop

Switch Luxi TH code from simple to custom fields

This is needed so that we have more flexibility in generating Luxi
serialisation code (deserialisation is still custom). Also, only
exceptions are now using the 'simple' field types, so we might be able
later to convert and remove that TH code as well....

a309a3b4 11/12/2012 11:44 am Iustin Pop

Fix display of results in ==? operator

Doh, this is exactly the opposite of what we wanted… good thing no
test failed so far :)

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

92ad1f44 11/12/2012 11:44 am Iustin Pop

Make THH:genSaveOpCode a bit more general

This can be improved, by taking all hardcoded names as parameters, to
serve as a more-general "build save clause for a multi-constructor
data type". I'm not renaming the function as well, since I don't know
exactly how much we can abstract later....

a12f0ef8 11/09/2012 03:35 pm Michael Hanselmann

sphinx_ext: Allow use of “rapi” module in pyeval

This way constants like “rapi.RAPI_ACCESS_WRITE” can be used in
documentation.

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

2a38e913 11/08/2012 08:37 pm Michael Hanselmann

rlib2: Document two previously undocumented functions

Commit 208a6cff just included empty docstrings.

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

e4e59de8 11/08/2012 04:40 pm Michael Hanselmann

jqueue/mcpu: Determine priority using callback

Instead of being given the priority for acquiring locks by means of a
parameter, mcpu will now call back. This is in preparation for
implementing a command to change a job's priority on the fly and allows
to change it while locks are being acquired (taking effect on the next...

8af734f8 11/08/2012 04:15 pm Michael Hanselmann

Merge branch 'devel-2.6'

  • devel-2.6:
    http/__init__.py: Remove extraneous argument
    rapi.testutils: Add utility to format HTTP headers
    rapi.testutils: Return headers from mock utility
    http: Add wrapper for mimetools.Message
    Add missing tests for commit f0d2286...
22105827 11/08/2012 04:08 pm Michael Hanselmann

Merge branch 'stable-2.6' into devel-2.6

  • stable-2.6:
    http/__init__.py: Remove extraneous argument
    rapi.testutils: Add utility to format HTTP headers
    rapi.testutils: Return headers from mock utility
    http: Add wrapper for mimetools.Message
    Add missing tests for commit f0d2286...
e080072c 11/08/2012 03:53 pm Michael Hanselmann

http/__init__.py: Remove extraneous argument

pylint complained, I fixed it, and unfortunately pushed too early.

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

1b8e72f3 11/08/2012 03:20 pm Michael Hanselmann

rapi.testutils: Add utility to format HTTP headers

Once again this will be used by forthcoming RAPI test.

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

0351944b 11/08/2012 03:20 pm Michael Hanselmann

rapi.testutils: Return headers from mock utility

A newly added test for RAPI will also verify the returned headers. A
test in ganeti.rapi.client_unittest.py is split into smaller stand-alone
tests.

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

0e632cbd 11/08/2012 03:19 pm Michael Hanselmann

http: Add wrapper for mimetools.Message

A newly added piece of code will also have to parse headers, so having
this wrapper saves us from copying this part of code.

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

cdc2392b 11/08/2012 02:58 pm Iustin Pop

Rename Confd.hs to Confd/Types.hs

This should be the last module rename, promise!

We rename this to conform to the other hierarchies (e.g. Query), and
to not have both Confd.hs and Confd/*.hs.

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

3bebda52 11/08/2012 12:31 pm Dato Simó

OpCodes.hs: add OpTagsSet and OpTagsDel

Also, adjust comment to $(genOpCode) block to avoid repetition of
"only".

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

367c4241 11/08/2012 12:31 pm Dato Simó

htools: move TagObject from Luxi.hs to OpCodes.hs

In addition to ReqQueryTags in Luxi.hs, the TagObject ADT is also
required for the "kind" attribute of OpTagsSet and OpTagsDel, which
are coming to OpCodes.hs next. Hence, we move TagObject there, and
adjust imports accordingly....

7a70541e 11/07/2012 06:57 pm Michael Hanselmann

Add missing tests for commit f0d2286

Commit f0d2286 changed the logic of
gnt_instance._ConvertNicDiskModifications to also allow a parameter
named “modify”. Unfortunately the corresponding unittest was not
updated. An “if”/“else” condition is also merged....

2ac2e420 11/07/2012 05:58 pm Iustin Pop

Implement base checkFn/prepFn/execFn model for daemons

This mirrors the code in the Python code base, and is required for
clean error reporting during startup.

This patch implements the basic infrastructure; the confd daemon is
not yet modified to take advantage of this, just the types are...

7ae5d703 11/07/2012 03:39 pm Iustin Pop

One more ghc 7.6 fix

This is only in master, so needed to be fixed separately.

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

c258f110 11/07/2012 03:35 pm Michael Hanselmann

workerpool: Use itertools.count instead of manual counting

Instead of having to explicitely increment the value (“… += 1”), a call
to next() is enough. These numbers should in no case be re-used (they
are used for ordering tasks). Using “itertools.count” is useful here as...

b9612abb 11/07/2012 03:06 pm Iustin Pop

Merge branch 'devel-2.6' into submit

  • devel-2.6:
    Fix compatibility with newer Haskell libraries
    Fix gnt-instance console with xl

Conflicts:
Makefile.am (reordering, fixed)
htools/Ganeti/Confd/Server.hs (hlint fixes on master)
htools/Ganeti/Daemon.hs (hlint)...

27639c4e 11/07/2012 02:08 pm Iustin Pop

Merge branch 'stable-2.6' into devel-2.6

  • stable-2.6:
    Fix compatibility with newer Haskell libraries
    Fix gnt-instance console with xl

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

f9435bdc 11/07/2012 02:07 pm Iustin Pop

Switch devel/upload to a static file

We had twice in the past days questions about devel/upload being
"broken", since bash re-reads shell scripts during their run and this
file can get regenerated due to Makefile changes.

Since we only need this to be dynamically built for 3 variables, let's...

1251817b 11/07/2012 10:46 am Iustin Pop

Fix compatibility with newer Haskell libraries

This small patch fixes compatibility with a few newer Haskell libraries:

- base 4.6, included with ghc 7.6, removed the deprecated 'catch'
function from Prelude, so our "import Prelude hiding (catch)" is now...

f215debf 11/06/2012 08:01 pm Guido Trotter

Use SSH_LOGIN_USER rather than root for xl ssh

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

1f5557ca 11/06/2012 08:01 pm Guido Trotter

Fix gnt-instance console with xl

- Rename xm-console-wrapper to xen-console-wrapper
- Pass the xen command to use as a parameter

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

10b86782 11/06/2012 07:59 pm Michael Hanselmann

Add utility to check if file is executable

This replaces direct calls to “os.access” and
“os.path.exists”/“os.path.isfile”.

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

55d1ebfa 11/06/2012 07:27 pm Michael Hanselmann

Fix NameError in constants.py introduced in merge 46c1f82

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

471b6c46 11/06/2012 06:48 pm Iustin Pop

Add test for Luxi calls consistency hs/py

This tests that the same Luxi calls are defined in Python and
Haskell. It doesn't test yet that their serialisation is correct
though.

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

46c1f828 11/06/2012 06:26 pm Guido Trotter

Merge branch 'devel-2.6'

  • devel-2.6:
    Disable E1101 on ganeti/http/server.py:424
    Fix live migration under xl
    Don't check for xend port when using xl

Conflicts:
lib/hypervisor/hv_xen.py: trivial

Signed-off-by: Guido Trotter <>...

16c2024a 11/06/2012 06:20 pm Guido Trotter

Merge branch 'stable-2.6' into devel-2.6

  • stable-2.6:
    Disable E1101 on ganeti/http/server.py:424
    Fix live migration under xl
    Don't check for xend port when using xl

Signed-off-by: Guido Trotter <>
Reviewed-by: Bernardo Dal Seno <>...

57a6042e 11/06/2012 05:47 pm Guido Trotter

Disable E1101 on ganeti/http/server.py:424

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

053c356a 11/06/2012 04:32 pm Guido Trotter

Fix live migration under xl

Until now the only way to make live migration work in conjunction with
"xl" was to add ssh known_hosts keys for every node's secondary ip on
every other node.

With this command we remove the target key verification: this is not...

3135de69 11/06/2012 04:32 pm Guido Trotter

Don't check for xend port when using xl

If the toolstack is set to "xl" we shouldn't ping xend for liveness
before attempting a live migration.

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

2826897c 11/06/2012 04:00 pm Michael Hanselmann

utils.io: Improve handling of double and single slashes

Up until now “IsBelowDir("/", …)” would never return True. The reason
was that an additional slash was added to the root path resulting in
“//", which is “implementation-defined” in posix and treated specially...

f94779f5 11/06/2012 03:56 pm Michael Hanselmann

workerpool: Don't mask variable in AddManyTasks

The name “priority” is already used.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

c69c45a7 11/06/2012 03:56 pm Michael Hanselmann

workerpool: Simplify _WaitForTaskUnlocked

The function in is simplified in its structure and duplicated checks
have been merged.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

bcd35e09 11/05/2012 09:50 pm Dato Simó

cli.py: use None as name for tag operations on the cluster

This change is mostly cosmetic. Previously, the literal "cluster" was
used for the 'name' field of tag operations on the cluster (as opposed
to a node or an instance). Since this field has a type of TMaybeString...

c17770c7 11/02/2012 01:25 pm Bernardo Dal Seno

Fix previous merge

A call to _CalculateGroupIPolicy wasn't refactored during the merge.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Michael Hanselmann <>

8e09e801 11/01/2012 07:44 pm Michael Hanselmann

Merge branch 'devel-2.6'

  • devel-2.6:
    Fix typo in gnt-instance man page
    jqueue: Return jobs to queue when shutting down
    gnt-debug delay: Add "--submit" option
    Make hostname checks uniform between instance rename and add
    Improve logging of new job submissions...
dc2cc657 11/01/2012 06:39 pm Michael Hanselmann

Merge branch 'stable-2.6' into devel-2.6

  • stable-2.6:
    Fix typo in gnt-instance man page
    jqueue: Return jobs to queue when shutting down
    gnt-debug delay: Add "--submit" option
    Make hostname checks uniform between instance rename and add
    Improve logging of new job submissions...
88f622e0 11/01/2012 05:48 pm Michael Hanselmann

Fix typo in gnt-instance man page

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

942e2262 11/01/2012 05:48 pm Michael Hanselmann

jqueue: Return jobs to queue when shutting down

When a job is still waiting for locks and the queue is shutting down,
they should be returned and not actually start processing. Until now
jobs which transitioned from “queued” to “waiting” were already
considered to be running as far as the shutdown code was concerned....

bb600388 11/01/2012 05:09 pm Michael Hanselmann

gnt-debug delay: Add "--submit" option

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

b1adc12e 11/01/2012 05:06 pm Michael Hanselmann

Remove duplicate workerpool test

Commit 52c47e4e (July 2010) added the exact test twice, probably due to
a copy & paste error.

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

233f4bc6 11/01/2012 03:00 pm Iustin Pop

Make hostname checks uniform between instance rename and add

Currently, we have instance rename doing extra checks on the host
name, to prevent accidental wrong renames; however, instance create
doesn't do these checks (issue 291), which (if DNS is misconfigured)...

4c91d2ad 11/01/2012 03:00 pm Iustin Pop

Improve logging of new job submissions

This addresses issue 290: when receiving new jobs, logging is
incomplete, and we don't have the job ID and/or summaries
logged. Only later, when the job is queried for or being processed, we
know more.

This is not good when troubleshooting, so let's improve the initial...

a9d40c65 11/01/2012 03:00 pm Iustin Pop

Improve handling of lock exceptions

There are two issues with lock exceptions right now:

- first, we don't log the original error; this is fine for now
(locking.py always returns the same error here), but in general is
brittle: if locking.py would start returning more information, we'd...

cfa2b7a0 10/30/2012 09:00 pm Iustin Pop

Add note about developing on a production machine

This is the bit of documentation missing for issue 170. Doing
development on a machine which already has Ganeti installed kind of
works, but only when the installed and the developed version are very
similar, and even then it can be problematic....

0d324688 10/30/2012 04:07 pm Iustin Pop

Fix runtime memory increases

Commit 2c0af7da which added the runtime memory changes functionality
had a small typo (wrong name); I've rewritten this to only compute the
delta once, for simplicity.

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

8e66b9bf 10/30/2012 02:17 pm Iustin Pop

Fix validation of vgname in OpClusterSetParams

This variable can be empty, when we want to disable LVM, so we can't
use TMaybeString.

Fixes issue 285.

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

e5dfc531 10/30/2012 02:17 pm Iustin Pop

Fix removal of storage directory on shared file storage

This patch makes _RemoveDisks symmetric to _CreateDisks with respect
to file-based storage: _CreateDisks uses "in constants.DTS_FILEBASED",
whereas _RemoveDisks was not update and only uses "==
constants.DT_FILE". This results in stale directories left on the...

15361a18 10/30/2012 02:17 pm Iustin Pop

Switch non-redundant check to disk template-based

Currently, the warning/notice about non-redundant instances in cluster
verify is based non empty secondaries list (how old is this?); the
proper way to check this nowadays is via DTS_MIRRORED.

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

efd38c3d 10/30/2012 12:59 am Bernardo Dal Seno

Fix permission for socket directory

The directory must we writable also by the confd daemon user.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Iustin Pop <>