Statistics
| Branch: | Tag: | Revision:

root / lib @ ef40c537

# Date Author Comment
ef40c537 05/22/2012 02:01 pm René Nussbaumer

_MaybeParseUnit: The elements are dicts not arrays

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

cd415612 05/22/2012 11:25 am René Nussbaumer

Make it possible to reset vcpu/spindle ratio to default

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

ff39194f 05/22/2012 11:17 am Iustin Pop

Add man page documentation for cpu_mask hv parameter

This is adapted from the design doc.

Also fixes a typo in cmdlib.py.

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

eb70f6cf 05/22/2012 10:56 am René Nussbaumer

gnt-group: Adding vcpu/spindle ratio to ipolicy flags

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

31d827d1 05/22/2012 10:56 am René Nussbaumer

gnt-cluster modify: Add ipolicy for spindle ratio opt

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

ad5cc6bd 05/22/2012 10:56 am René Nussbaumer

cli: Add ipolicy_spindle_ratio to CreateIPolicyFromOpts

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

83d4ba5e 05/21/2012 12:21 pm René Nussbaumer

gnt-instance info: Rework beparams listings

This patch reworks the beparams listing to the new style. However, due
to this process the naming of the fields with mixed casing changed to
lowercase and is therefore not 100% compatible with the previous versions....

38ef0c2c 05/15/2012 06:48 pm Michael Hanselmann

constants: Add FIXME regarding CPU pinning bitfield

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

d67e0a94 05/15/2012 02:38 pm Iustin Pop

Allow units in ipolicy disk/mem CLI changes

This makes "gnt-cluster modify --specs-mem-size max=16g" work. The
downside (due to how we iterate) is that error messages are not very
clear:

$ gnt-cluster modify --specs-mem-size max=16a
Failure: prerequisites not met for this operation:...
703fa9ab 05/15/2012 02:38 pm Iustin Pop

Move some ipolicy functions from objects to cli

These are only used in CLI programs to parse command line options and
such they do not belong in object.py (I will change them more and I
don't want to add more code in objects.py).

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

ea0f78c8 05/15/2012 02:38 pm Iustin Pop

Beautify a couple of error messages

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

0fd5547a 05/15/2012 02:38 pm Iustin Pop

Fix _ComputeNewInstanceViolations logic

This function did the opposite: was computing which old instance
violated the specs but no longer do it now. new - old is the expected
behaviour.

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

0c2e59ac 05/15/2012 02:38 pm Iustin Pop

Beautify disk ipolicy violations in cluster-verify

Currently, we only get:

instance3: ['disk-size value 512 is not in range [1024, 1048576]'

which doesn't explain which disk we are talking about. This patch
extends the verification functions to take an additional parameter...

e78a6817 05/14/2012 06:34 pm Michael Hanselmann

LUInstanceCreate: Run rename script on instance import

If an instance is imported with a different name, network settings may have to
be changed. Since import scripts may not already to the right thing, we decided
to run the rename script. The same technique is already used for inter-cluster...

7228ca91 05/14/2012 02:51 pm René Nussbaumer

gnt-group add: Fix diskparam fill

This was a pretty non-obvious bug. A cluster looks sane after
gnt-cluster init, however on a daemon restart the diskparameters had the
default filled in. The same applies to gnt-group add. This is due to the
nature that UpgradeConfig() from NodeGroups did just populate them with...

b3230b32 05/14/2012 02:51 pm René Nussbaumer

gnt-group modify: Fix an update issue with diskparams

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

216d23c0 05/11/2012 05:20 pm René Nussbaumer

gnt-group: Add info command

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

64da5a53 05/11/2012 05:20 pm René Nussbaumer

cli: Make FormatParameterDict recursive

This is useful if you have nested parameter dicts like in diskparams.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

2c758845 05/11/2012 05:20 pm René Nussbaumer

query: Expose diskparamters through query

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

f9bbf32b 05/11/2012 05:20 pm René Nussbaumer

gnt-cluster info: Print and format disk parameters

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

615b7a0f 05/11/2012 05:01 pm Iustin Pop

Merge branch 'devel-2.5'

  • devel-2.5:
    Update NEWS and bump version for 2.5.1 release
    Fix gnt-group --help display
    Fix hardcoded Xen kernel path
    Fix grow-disk handling of invalid units
    Accept both PUT and POST in noded
    Preserve bridge MTU in KVM ifup script...
5fa90892 05/11/2012 04:40 pm Iustin Pop

Merge commit 'v2.5.1' into devel-2.5

  • commit 'v2.5.1':
    Update NEWS and bump version for 2.5.1 release
    Fix gnt-group --help display
    Fix hardcoded Xen kernel path
    Fix grow-disk handling of invalid units
    Accept both PUT and POST in noded
    Preserve bridge MTU in KVM ifup script...
1a63f285 05/11/2012 03:38 pm Iustin Pop

Remove some duplicate code in the Xen config writing

Should be straightforward; the only difference from before is that we
will remove the 'auto' file even during migration finalise.

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

3ad56046 05/11/2012 12:03 pm Iustin Pop

Fix gnt-group --help display

Copy-paste mismatch :)

Signed-off-by: Iustin Pop <>
Reviewed-by: Bernardo Dal Seno <>
(cherry picked from commit 36c70d4ddc508dd1ffdcc806d617d5100f4cb265)

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

3ac3de7a 05/11/2012 12:03 pm Iustin Pop

Fix hardcoded Xen kernel path

We already have a ./configure-time variable for this, but it seems to
be actually unused.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>
(cherry picked from commit 3c4afa2e93d9499ce39c1aed575dacb549d35083)...

b53874cb 05/11/2012 12:03 pm Iustin Pop

Fix grow-disk handling of invalid units

The reason why grow-disk was doing:

$ gnt-instance grow-disk instance3 0 -64
Unhandled Ganeti error: Invalid format

Is because it does it's own ParseUnit call, and doesn't transform that
into a nicer message.

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

37c4d509 05/11/2012 12:03 pm Iustin Pop

Accept both PUT and POST in noded

This is a partial cherry-pick from
7530364ddbe949bc34fc26f25ba3f5d921beb021 on master:

Currently, noded requires PUT, even though the semantics of the RPC
calls do not match a PUT. We change the code accept both PUT and POST,...

0fc1764f 05/11/2012 12:02 pm Michael Hanselmann

Update synopsis for “gnt-cluster repair-disk-sizes”

Mention that instances can be passed on the CLI when “--help” is used.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Andrea Spadaccini <>
(cherry picked from commit eb5ac108d146644200df98b9f90dae003dcea426)...

4c5dd3ff 05/11/2012 12:02 pm Iustin Pop

Workaround changed LVM behaviour

The vgreduce command has changed behaviour from when we initially
wrote the code (2.02.02 versus 2.02.66, 4 years delta):

- if there are LVs which will be impacted, it requires --force
- otherwise refuses to proceed, but it still returns exit code 0...

af9fb4cc 05/10/2012 02:56 pm René Nussbaumer

apidoc: Fix some typos and errors introduced by my previous patches

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

5ff82cc9 05/10/2012 02:30 pm René Nussbaumer

bdev: Add a guard to verify disk parameters are set

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

b3f0d718 05/10/2012 02:30 pm René Nussbaumer

LUGroup*: Fix inheritance of disk parameters

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

c7c6606d 05/10/2012 02:30 pm René Nussbaumer

bdev: Take the params directly from disk without refill

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

769b0bde 05/10/2012 02:30 pm René Nussbaumer

Special case blockdev_find

Similiar to blockdev_create we sometimes do find on children. This fixes
those cases. However, this is not very nice.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

fc5bb0fe 05/10/2012 02:30 pm René Nussbaumer

Special case blockdev_create

This is due to the nature of bdev. We spread some logic into cmdlib and
deal for example with it's children recursively. This makes it hard to
annotate the disk parameters in a generic way as we don't always deal
with the top most disk. But the disk parameters are depending on the top...

887b52e8 05/10/2012 02:30 pm René Nussbaumer

cmdlib: Adding annotation helper for special cases

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

99ccf8b9 05/10/2012 02:30 pm René Nussbaumer

cmdlib: Remove all diskparams calculations not required anymore

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

62bfbc7d 05/10/2012 02:30 pm René Nussbaumer

cmdlib: Adapt the rpc calls

The following (blockdev) RPC calls are not converted yet (as they are
not straight forward or need more research):

  • bdev_sizes
  • blockdev_remove
  • blockdev_shutdown
  • blockdev_removechildren
  • blockdev_close
  • blockdev_getsize...
c7ea9827 05/10/2012 02:30 pm René Nussbaumer

rpc: Adapt the callbacks to the new encoder type

We change the cmdlib side on the next patch.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

aedf5fd7 05/10/2012 02:30 pm René Nussbaumer

rpc: Adding new encoders for annotating disk parameters

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

cd46491f 05/10/2012 02:30 pm René Nussbaumer

rpc: Adding helper to annotate disk params

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

8a147bba 05/10/2012 02:30 pm René Nussbaumer

config: Adding convenience method for disk parameters

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

57987785 05/10/2012 02:30 pm René Nussbaumer

objects: Add helper function to fill disk parameters

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

9a6ade06 05/09/2012 12:31 pm Iustin Pop

Add a default PATH variable to OS scripts env

In commit 896a03f6 I cleaned up the environment for OS scripts,
however I think that was a bit too extreme - it breaks our own
instance-debootstrap hooks, because for example dpkg (called from the
grub script) requires PATH to be set....

aa7b59ac 05/09/2012 12:31 pm Andrea Spadaccini

Move hooks PATH environment variable to constants

Move the contents of the PATH environment variable for hooks to
constants, and use its value in the code and in the hooks documentation.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Guido Trotter <>...

98dfcaff 05/09/2012 12:17 pm Iustin Pop

Fix exception re-raising in Python Luxi clients

Commit e687ec01 (present in 2.5 since the 2.5 beta 3) did consistency
fixes across the code-base. Unfortunately this was done without enough
checks on the actual meaning of one of the fixes, which means error...

f97a7ada 05/09/2012 12:12 pm Iustin Pop

Allow clock skews in certificate verification

Currently we allow for up to NODE_MAX_CLOCK_SKEW time difference
between nodes in some operations, but not everywhere: SSL certificate
verification (import/export, both intra and inter-cluster) has a zero
limit (downwards), and a week upwards. This can cause even...

83c046a2 05/08/2012 01:37 pm Iustin Pop

Correct capitalisation of two Luxi calls

Two Luxi calls have inconsistent an name/value mapping (in the Python
code):

- REQ_AUTOARCHIVE_JOBS versus AutoArchiveJobs (versus AutoarchiveJobs)
- REQ_QUEUE_SET_DRAIN_FLAG versus SetDrainFlag (no Queue)

While these are only a consistency issue, let's fix them so that the...

a1f38213 05/07/2012 11:33 am Iustin Pop

Fix LVM volume listing with newer LVM

Per commit 0304f0e, newer LVM has extended the lv_attr field. However,
that commit was incomplete as we examine this attribute in another
place in the code.

Thanks to user alperhome, the _LVSLINE_REGEX in lib/backend.py also...

c8bde61e 04/27/2012 05:41 pm Iustin Pop

Fix grow-disk handling of invalid units

The reason why grow-disk was doing:

$ gnt-instance grow-disk instance3 0 -64
Unhandled Ganeti error: Invalid format

Is because it does it's own ParseUnit call, and doesn't transform that
into a nicer message.

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

f1bebf4c 04/27/2012 11:00 am Iustin Pop

Make setup-ssh behave more friendly

So while testing my previous patch I run setup-ssh manually without
any arguments, and it did nothing (no complains, no messages,
anything). That was very surprising, so let's make it behave better if
no nodes are passed....

1afa108c 04/26/2012 10:42 pm Michael Hanselmann

Add more RAPI test utilities

This patch adds a mock RAPI client to test input values to methods. All
methods either raise an exception if there was a problem or return None.
Third-party code can use this to test their input values to the RAPI
client.

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

d9492490 04/26/2012 10:33 pm Michael Hanselmann

rapi.testutils.FakeCurl: Add header support

With this patch headers are constructed from the PycURL options
and passed to the mock implementation.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

f90a1ab5 04/26/2012 10:33 pm René Nussbaumer

Move _FakeCurl from tests/ganeti.rapi.client to ganeti.rapi.testutils

This is preparation for the mock system, where we need the same cURL
mock.

Signed-off-by: René Nussbaumer <>
Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

352e1a26 04/26/2012 10:33 pm Michael Hanselmann

errors: Add exception for RAPI testing utilities

This exception is raised to abort before actually sending a LUXI call
(there is no LUXI server involved in the test). The testing utilities
catch the exception to report a success (i.e. the code didn't throw...

e3a25810 04/26/2012 09:11 pm Michael Hanselmann

luxi: Add list of all requests

This will be used in a unittest for RAPI testing utilities.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

abe318b3 04/26/2012 09:11 pm Michael Hanselmann

server.rapi: Factorize RAPI user loading

By moving the code loading RAPI users from a file into a standalone
function it becomes easier to use the RAPI request handler in
tests.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

da04c447 04/26/2012 09:11 pm Michael Hanselmann

RemoteApiHandler: Add support for mocked LUXI client

This will be used for providing a type-checking RAPI client for tests.

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

ef8270dc 04/26/2012 06:41 pm Iustin Pop

Add absolute grow-disk mode at CLI level

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

e7f99087 04/26/2012 06:41 pm Iustin Pop

Add 'absolute' grow-disk mode at OpCode/LU level

This also improves the log messages for the (default) relative mode
("by %s to %s").

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

fa47242b 04/26/2012 06:40 pm Iustin Pop

Ensure that the grow disk amount is positive

The CLI currently doesn't permit this, but a direct job submission
would allow it.

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

21864565 04/26/2012 05:17 pm Iustin Pop

Log all external commands execution

This logs all external commands in normal (non-debug) mode. This will
leak the DRBD secrets, but in any case we do log failed commands, so
it's not a significant change.

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

4b129313 04/20/2012 09:01 pm Chris Schrier

Change CertificateError to subclass GanetiApiError

Signed-off-by: Chris Schrier <>
Reviewed-by: Michael Hanselmann <>

971b3a98 04/20/2012 08:58 pm Michael Hanselmann

Add opcode parameter descriptions

Fixes QA after commit cfdf561dade7.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Chris Schrier <>

dc4bdf73 04/20/2012 07:11 pm Michael Hanselmann

Stop acquiring BGL for LUXI queries

Short description: This fixes an issue whereby masterd would become
unresponsive on the LUXI socket, leading to client timeouts. While made
worse in 2.5, the underlying issue was already present in 2.4.

Longer description: Until now all LUXI queries would acquire the BGL...

dff5f600 04/20/2012 07:11 pm Michael Hanselmann

Convert LUClusterConfigQuery to query2

The main intention of this patch is to make it possible to retrieve
cluster tags via query2. While at it I decided to convert
LUClusterConfigQuery right away. Some of the values returned by
LUClusterQuery are also included, but the conversion of LUClusterQuery...

cfdf561d 04/20/2012 07:11 pm Michael Hanselmann

Stop using locks in LUXI "QueryTags"

Also mark it as deprecated in NEWS as normal queries can be used
instead.

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

b31176b0 04/20/2012 05:19 pm Michael Hanselmann

Remove unused constants

These are not used anywhere in Python or Haskell.

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

0fdf247d 04/19/2012 09:04 pm Michael Hanselmann

Convert listing exports to query2

This solves one case where locks are acquired during LUXI queries.
Pretty late into the transition I noticed that OpBackupQuery had a
“use_locking” parameter for a long time, but didn't use it. Since
most of the other changes were already and this allows exports to...

dd27bc21 04/19/2012 09:04 pm Michael Hanselmann

utils.algo: Use str.isdigit instead of regular expression

str.isdigit is about 4x faster than using a regular expression ("\d+").
This is in the inner sorting code so speed matters.

$ python -m timeit -s 'import re; s = re.compile("^\d+$")' \
's.match(""); s.match("Hello World"); s.match("1234")'...

b5800ee9 04/19/2012 11:44 am Chris Schrier

Include PycURL error code in GanetiApiError.

Signed-off-by: Chris Schrier <>
Reviewed-by: Iustin Pop <>

b4b3266b 04/18/2012 07:13 pm Michael Hanselmann

Drop objects.QueryRequest

It was only used in one place and wasn't really necessary.

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

ed4d8889 04/18/2012 07:07 pm Michael Hanselmann

gnt-os modify: Add "--submit" option

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

c5a66db3 04/18/2012 07:07 pm Michael Hanselmann

gnt-node: Add "--submit" and "--priority" to commands

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

f70bb622 04/18/2012 07:07 pm Michael Hanselmann

gnt-instance: Add "--submit" and "--priority" to commands

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

dcbeccd9 04/18/2012 07:07 pm Michael Hanselmann

gnt-group: Add "--submit" and "--priority" to commands

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

745dae57 04/18/2012 07:07 pm Michael Hanselmann

gnt-cluster modify: Add "--submit" option

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

f5c0c206 04/18/2012 07:07 pm Michael Hanselmann

gnt-backup: Add "--submit" to two commands

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

abe362d3 04/18/2012 01:20 pm Michael Hanselmann

Fix error in opcode result processing

LUXI queries are processed without callbacks (see
server.masterd.ClientOps._Query). With commit 07923a3c the logic for
checking an opcode's result for jobs to submit was changed and
subsequently raised an exception (“'NoneType' object has no attribute...

96897af7 04/17/2012 09:20 pm Alexander Schreiber

Add "show" as alias for "info" to gnt commands

This patch adds support for "show" as an alias for "info" to
gnt-(cluster|instance|node|os). It already exists in gnt-job.

Signed-off-by: Alexander Schreiber <>
Reviewed-by: Michael Hanselmann <>

07923a3c 04/16/2012 07:30 pm Michael Hanselmann

Copy debug level, priority and set comment for LU-generated opcodes

Before this patch, a node evacuation submitted with high priority would
only compute the solution at that priority, but the actual evacuation
ran at normal priority.

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

f037e9d7 04/13/2012 04:20 pm Michael Hanselmann

gnt-job list: Add options for commonly used filters

While “gnt-job list” would also accept filters on the command line (e.g.
“'status == "error"'”, having shortcuts in the form of options comes in
handy.

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

5ad68a23 04/13/2012 04:19 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5: (29 commits)
    gnt-* {add,list,remove}-tags: Unify options
    Bump version for 2.5.0 final release
    configure.ac: Fix “too many arguments” error
    Fix extra whitespace
    Further fixes concerning drbd port release
    Fix a bug concerning TCP port release...
6bc3ed14 04/12/2012 08:53 pm Michael Hanselmann

gnt-* {add,list,remove}-tags: Unify options

- Listing tags is a query, so neither “--priority” nor “--submit” make
sense
- Support both options for adding/removing tags
- Also remove “--submit” from “gnt-node health”; it doesn't work and
doesn't make sense for listing node health...

ce445897 04/12/2012 08:52 pm Michael Hanselmann

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    Bump version for 2.5.0 final release
    configure.ac: Fix “too many arguments” error
    Fix extra whitespace
    Further fixes concerning drbd port release
    Fix a bug concerning TCP port release
    Fix extra whitespace...
6cd4e775 04/11/2012 09:26 pm Michael Hanselmann

Merge branch 'devel-2.4' into stable-2.5

  • devel-2.4:
    Fix extra whitespace
    Further fixes concerning drbd port release
    Fix a bug concerning TCP port release

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

612f7fd4 04/11/2012 09:25 pm Iustin Pop

Fix extra whitespace

Sorry, didn't catch this before…

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>
(cherry picked from commit 54b010cad1ea0a536ed037bf315a04dd1c079964)...

42f25b0b 04/11/2012 07:34 pm Dimitris Aragiorgis

Further fixes concerning drbd port release

Commit 3b3b1bc does not entirely fix the bug introduced in commit
f396ad8. It fixes consistency of config data in permanent storage, but
does not ensure consistency in data held in runtime memory of masterd.

The bug of duplicate ports is still triggered when LUInstanceRemove()...

2522b7c4 04/11/2012 07:14 pm Dimitris Aragiorgis

Fix a bug concerning TCP port release

Commit f396ad8 returns the TCP port used by DRBD disk back to the
TCP/UDP port pool using AddTcpUdpPort().

However, AddTcpUdpPort() writes the config on every invocation,
using _WriteConfig(). This causes two problems:...

3086220e 03/30/2012 03:03 pm Michael Hanselmann

gnt-job list: Switch to query2

This brings “gnt-job list” up to the same level as “gnt-instance list”
with filters. Further updates will add more parameters for the most
common filters (e.g. only running jobs).

Also update the man page.

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

eba1aaad 03/30/2012 03:03 pm Michael Hanselmann

gnt-job info: Convert to query2

Otherwise detecting unavailable jobs is hard (“status” is None, is this
an error or just an unavailable job?).

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

e07f7f7a 03/30/2012 03:03 pm Michael Hanselmann

Add job support to query2 via LUXI

This enables the use of filters through query2 when listing jobs.

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

dc2879ea 03/30/2012 03:03 pm Michael Hanselmann

jqueue: Cache prepared field list in _JobChangesChecker

… instead of re-calculating it on every file change.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

12e0ee0d 03/30/2012 03:03 pm Michael Hanselmann

NEWS: Deprecate LUXI calls replaced with query2

Adding the “luxi” namespace is necessary in “sphinx_ext”.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

a06c6ae8 03/30/2012 03:03 pm Michael Hanselmann

jqueue: Convert GetInfo to query2

This rather inefficient implementation (fields are evaluated on every
call to GetInfo) is not good for WaitForJobChanges and doesn't support
filters, but that will be rectified in later patches.

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

9665bb3a 03/30/2012 03:03 pm Michael Hanselmann

query: Add definitions for job fields

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

03ec545a 03/30/2012 03:02 pm Michael Hanselmann

qlang.MakeFilter: Enable use of different name field

Jobs don't have a “name” field, so we must be able to control
the field used for simple filters.

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

26a72a48 03/30/2012 03:02 pm Michael Hanselmann

Merge cli.FormatTimestamp and utils.FormatTime

… to some degree at least. Unittests are included.

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

0b04b188 03/30/2012 03:02 pm Michael Hanselmann

constants: Don't hardcode priorities for LOCK_ATTEMPTS_TIMEOUT

Also include unittest for LOCK_ATTEMPTS_TIMEOUT.

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

66abb9ff 03/30/2012 03:02 pm Michael Hanselmann

jqueue._QueuedOpCode: Change a docstring

There was a typo and it's not necessary to repeat the class name.

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