Statistics
| Branch: | Tag: | Revision:

root / lib @ 64c7b383

# Date Author Comment
64c7b383 09/30/2011 07:04 pm Michael Hanselmann

LUClusterVerifyGroup: Spread SSH checks over more nodes

When verifying a group the code would always check SSH to all nodes in
the same group, as well as the first node for every other group. On big
clusters this can cause issues since many nodes will try to connect to...

11705e3d 09/30/2011 06:47 pm Iustin Pop

Optimise cli.JobExecutor with many pending jobs

In the case we submit many pending jobs (> 100) to the masterd, the
JobExecutor 'spams' the master daemon with status requests for the
status of all the jobs, even though in the end it will only choose a
single job for polling....

9dc45ab1 09/30/2011 01:10 pm Michael Hanselmann

ssh: Quote strings in error message

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

34aa8b7c 09/30/2011 01:10 pm Michael Hanselmann

utils.log: Write error messages to stderr

When “gnt-cluster copyfile” failed it would only print “Copy of file …
to node … failed”. A detailed message is written using logging.error.
Writing error messages to stderr can be helpful in figuring out what
went wrong (the messages also go to the log file, but not everyone might...

3656c889 09/28/2011 02:27 pm Iustin Pop

Fix handling of cluster verify hooks

The change to enforce boolean results for cluster verify group opcode
missed the HooksCallBack, which uses a very ugly 1/0
logic. Furthermore, the logic is wrong, since it unconditionally
resets the verify result to true....

835f8b23 09/28/2011 12:13 pm Iustin Pop

Redistribute the RAPI certificate

This reverts to the old behaviour in Ganeti 2.4 and before.

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

d71369d7 09/22/2011 02:31 pm Michael Hanselmann

RAPI: Fix wrong check on instance shutdown

Commit 7fa310f6d84 (April 1st, 2011) converted the RAPI resource for
shutting down an instance to FillOpCode. Unfortunately it missed the
fact that the shutdown resource gets its parameters as query arguments.

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

fa411651 09/22/2011 02:31 pm Michael Hanselmann

baserlib: Accept empty body in FillOpcode

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>
(cherry picked from commit c6e1a3eef05674d637570c39f25a799cec7ba187)

Signed-off-by: Michael Hanselmann <>

17385bd2 08/30/2011 02:01 pm Andrea Spadaccini

Fixes to errors/warnings raised by pylint 0.24

Running pylint 0.24.0 revealed 2 errors and 1 warning. Here is how I
fixed them:

  • jqueue.py: silenced E1101
  • netutils.py: rewrote the list comprehension using extend()
  • watcher/__init__.py: fixed a missing format string parameter...
b459a848 08/30/2011 11:24 am Andrea Spadaccini

DeprecationWarning fixes for pylint

In version 0.21, pylint unified all the disable-* (and enable-*)
directives to disable (resp. enable). This leads to a lot of
DeprecationWarning being emitted even if one uses the recommended
version of pylint (0.21.1, as stated in devnotes.rst)....

72ce3463 08/26/2011 05:53 pm René Nussbaumer

Merge branch 'devel-2.4' into devel-2.5

Conflicts:
NEWS (trivial)
configure.ac (trivial)
daemons/ensure-dirs.in (deleted)

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

e4a48c7b 08/26/2011 03:53 pm Michael Hanselmann

utils: Fix UnescapeAndSplit parsing bug

If a value passed to UnescapeAndSplit ended with a backslash an
exception would be raised:

$ gnt-instance modify -H mem=x\\ inst1.example.com
[…]
e2 = slist.pop(0)
IndexError: pop from empty list

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

8e47b5da 08/26/2011 02:57 pm Michael Hanselmann

Two more PEP8 fixes

cmdlib: Avoid wrapping using backslash

gnt_group: Avoid * magic using keyword arguments (the “pep8” tool
doesn't like the inline comment in this case and will complain about
spaces around the “
*” operator)

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

e687ec01 08/25/2011 01:53 pm Michael Hanselmann

PEP8 style fixes

Identified using the “pep8” utility.

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

82461fad 08/23/2011 12:12 pm René Nussbaumer

Documentation fix for importing with --src-dir option

Signed-off-by: Agata Murawska <>
Reviewed-by: Michael Hanselmann <>
(cherry picked from commit b7d7876bd0e9844fab8be28bfa1fd5d563ec7412)

Conflicts:

lib/cmdlib.py (easily fixed)
7a380ddf 08/23/2011 12:01 pm René Nussbaumer

Fix a parsing issue with DRBD 8.3.11 in the Linux Kernel

In the Linux kernel commit 4b0715f096 introduced a display bug into
/proc/drbd which broke our regex.

The bug was first introduced into Linux 2.6.39-rc1. This bug is still
unfixed as of today.

This patch adapt the regular expression to workaround this bug for the...

5f01e6ad 08/22/2011 06:46 pm Michael Hanselmann

watcher: Wait for child processes by default

This patch retains the behaviour of ganeti-watcher in previous Ganeti
versions.

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

b6d02fa9 08/19/2011 05:55 pm Iustin Pop

sphinx_ext: workaround epydoc warning

Similar to commit c29e35f, this works around epydoc breakage by
aliasing the module. Makes 'apidoc' pass again on my machine.

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

f299ca21 08/19/2011 05:51 pm Michael Hanselmann

Unify some file headers

Remove unnecessary commas, add empty lines where necessary to make them
consistent.

I'm working on a script to check this, but it's not yet ready.

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

a95f19d7 08/19/2011 04:25 pm Michael Hanselmann

ensure-dirs: Fix epydoc error

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

b7d7876b 08/19/2011 04:23 pm Agata Murawska

Documentation fix for importing with --src-dir option

Signed-off-by: Agata Murawska <>
Reviewed-by: Michael Hanselmann <>

c3f54085 08/19/2011 03:11 pm Michael Hanselmann

ensure-dirs: Check mode and owner before changing

This avoids many calls to chmod(2) and chown(2), and thereby ctime
updates.

Since I had to update the unittests anyway I untangled the code a bit,
split it into more separate functions and added some more tests....

d00a730d 08/19/2011 03:11 pm Michael Hanselmann

ensure-dirs: Refine error handling on stat(2)

The “_stat_fn” function is renamed to “_lstat_fn” to reflect its
function. The try/except block just wraps calling lstat(2) and nothing
else.

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

297657a2 08/19/2011 03:11 pm Michael Hanselmann

ensure-dirs: Change wording of some messages

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

961226f6 08/19/2011 03:11 pm Michael Hanselmann

ensure-dirs: Implement debug logging

There was no logging at all.

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

cb66225d 08/19/2011 03:11 pm Michael Hanselmann

ensure-dirs: Set permissions on job files in queue

This was a regression from 2.4.

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

247ee81f 08/19/2011 11:28 am Michael Hanselmann

ensure-dirs: Set permissions on queue lock file

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

cd57bab6 08/17/2011 05:57 pm Michael Hanselmann

ensure-dirs: Set correct permissions on ssconf files

The files should be 0444, not 0400. This was a regression from 2.4.

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

b845c8a1 08/15/2011 06:46 pm Andrea Spadaccini

Handle network interfaces without IPs

If the user specified a network interface with no IPs, he would receive
an unhelpful "list index out of range" error. Fixed that.

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

11ae7a0a 08/15/2011 06:46 pm Andrea Spadaccini

Fixed potential unreferenced variable usage

I noticed a path in the code that would use spice_ip_version even if
it was not initialized. This patch fixes it.

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

b1cb62bd 08/12/2011 06:08 pm Andrea Spadaccini

Added basic support for SPICE

Implemented the following parameters:
- spice_bind
- spice_ip_version

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

ebe6cf38 08/12/2011 04:52 pm Michael Hanselmann

Fix exit code of “gnt-cluster verify”

With commit fcad7225e3fc4 LU-generated jobs are used, but the
exit code must still be backwards-compatible.

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

905108ab 08/12/2011 04:43 pm Michael Hanselmann

Small improvements for cluster verify

- Check if BGL is actually owned
- Show group name as feedback

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

5bfb1134 08/12/2011 03:52 pm Michael Hanselmann

watcher: Use locks when querying for resource information

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

ee13764f 08/12/2011 03:52 pm Michael Hanselmann

Allow locking to be used via OpQuery

The original design for query2 specifically excluded locking, but now
it's turned out that it would be a good thing to have in watcher. This
patch adds a new parameter to OpQuery and enables its use in LUQuery. A
missing function is added to LUGroupQuery, a comment clarified in...

1456df62 08/12/2011 03:49 pm Michael Hanselmann

opcodes: Add more result checks, add some comments

Some of these will be used by the RAPI documentation.

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

f96c51a0 08/12/2011 03:49 pm Michael Hanselmann

sphinx_ext: Allow documenting opcode results

Will be used by RAPI documentation.

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

9eec6d67 08/12/2011 03:49 pm Michael Hanselmann

ht: Allow adding comment to type descriptions

This will be used to add some more details to type descriptions, e.g. on
opcode parameters or result values. The implementation is very similar
to “WithDesc”.

I chose to use “[…]” after finding “/*…*/” hard to read and spot. At...

bdfd7802 08/12/2011 03:12 pm Michael Hanselmann

Clarify job ID-related type checks, add unittests

Instead of a rather complicated expression only “JobId” is output. Job
ID lists (like generated by “SubmitManyJobs”) are limited to two-item
lists. Unittests are added.

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

f7686867 08/12/2011 03:12 pm Michael Hanselmann

Change OpClusterVerifyConfig's result, verify results

This patch removes the list of node groups (not used anymore since
commit fcad7225e3fc) from OpClusterVerifyConfig's result and adds result
verification to all OpClusterVerify* opcodes.

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

fcad7225 08/12/2011 12:02 pm Michael Hanselmann

Use LU-generated jobs for verifying cluster

This patch moves the logic for verifying the various node groups in a
cluster into the master daemon. Job dependencies are used to ensure the
configuration, which requires the BGL, is verified first.

With this change it will be possible to expose whole-cluster...

57106b74 08/12/2011 12:02 pm Michael Hanselmann

opcodes: Use variables for verification parameters

Just some cleanup before the 2.5 release.

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

c7bb3095 08/12/2011 12:01 pm Michael Hanselmann

mcpu: Specify actual received type on opcode issue

This helped me debug an issue with opcodes.

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

e50d8412 08/11/2011 03:50 pm Michael Hanselmann

Use resource kind as OpQuery*'s description

This gives a hint as to what's queried. “QUERY” or
QUERY” are way better than just “QUERY”.

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

37531236 08/11/2011 03:18 pm Andrea Spadaccini

Added helper functions in netutils and related constants

Added the following functions to netutils:
- IsValidInterface
- GetInterfaceIpAddresses
- _GetIpAddressesFromIpOutput

Added the following static methods to netutils.IPAddress:
- GetAddressFamilyFromVersion...

140ff718 08/11/2011 03:11 pm Michael Hanselmann

Fix epydoc error in rlib2.py

I blindly assumed epydoc would use normal reST, but turns out it uses
its own “epytext” in our configuration. Since the latter doesn't support
blockquotes, I just make the paragraph a literal block.

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

d91a933f 08/10/2011 06:32 pm Michael Hanselmann

Fix typo in rlib2's docstring

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

f3c1a70c 08/10/2011 06:26 pm Michael Hanselmann

Documentation fixes and clarification

- In README, refer to “install.rst”, not “install.html”
- In rapi.rst, wrap line longer than 72 characters
- In rlib2.py, update and clarify description of POST vs. PUT

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

c20efaa8 08/10/2011 06:23 pm Michael Hanselmann

gnt-instance: Rename SHUTDOWN* to EXPAND*

Once upon a time these constants were only used for stopping instances,
but pretty soon they became more useful. Let's rename them.

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

bd7b2070 08/10/2011 02:47 pm Michael Hanselmann

rlib2: Exclude oplog/opresult from bulk job list

These fields can get rather large. Excluding them from the big bulk list
reduces the amount of data. They are still available via per-job
requests.

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

f4e86448 08/09/2011 03:33 pm Michael Hanselmann

rlib: Expose node group tags

Commit 1ffd26739d3 added support for tagging node groups. Also add a
check for exposed fields.

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

e987f166 08/09/2011 03:33 pm Michael Hanselmann

rapi: Bulk support for jobs

This was requested in issue 181.

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

d7e4a2b1 08/09/2011 03:32 pm Andrea Spadaccini

Fixed an error in the documentation of _GetKVMVersion

Fixed an epydoc compilation error that I introduced with last commit.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

440351f8 08/09/2011 02:29 pm Andrea Spadaccini

Removed code duplication for calls to _GetKVMVersion

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

0b0ca0c0 08/08/2011 07:18 pm Michael Hanselmann

Fix epydoc breakage caused by f8638e288c7a

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

e2d14329 08/08/2011 06:50 pm Andrea Spadaccini

Changed NET_PORT_CHECK to REQ_NET_PORT_CHECK, to improve consistency

I originally made this change because I needed the OPT_NET_PORT_CHECK,
and I am committing it even if I don't need anymore OPT_NET_PORT_CHECK
because IMO it improves the consistency of the name of the wrappers....

c4dfb0b6 08/08/2011 06:49 pm Andrea Spadaccini

Added check for the ip command at configure time

Also, corrected a few places where the ip command was hardcoded.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

f8638e28 08/08/2011 06:42 pm Michael Hanselmann

Detect globbing patterns as query arguments

Short: this patch enables the use of “gnt-instance list '*.site'”.

Detailed description: This patch changes the command line interface code
to try to deduce the kind of filter from the arguments to a “list”
command. If it's a list of plain names an old-style name filter is used....

e3a19474 08/08/2011 01:30 pm Iustin Pop

Allow fixing of split instances via relocate

Currently, the IAllocator code requests strictly that the (set of) groups of
the nodes we're relocating from is equal to the set of groups we're
relocating to.

This, however, makes is impossible to fix split instances, since (by...

f5fab862 08/08/2011 12:12 pm Iustin Pop

Further cleanup after multi-evacuate removal

Commit f0edfcf6 removed the parsing of multi-evacuate result, but the
code went from:

if mode in (multi-evac, relocate):

if mode relocate:

to:

if mode  relocate:

if mode == relocate...
2f41ea77 08/08/2011 12:11 pm Iustin Pop

Fix bug in IAllocator parsing of Evacuate result

Commit 342f9172 added stricter checks for the iallocator result in
evacuate mode, but it does this irrespective of the result
status. When the result has failed and (according to the design) the
list of nodes is empty, this code will trigger the following:...

16629d10 08/05/2011 05:16 pm Michael Hanselmann

Implement globbing operator for filters

The operators “=*” and “!*” do globbing in filters, e.g.:

$ gnt-instance list --no-headers -o name 'name =* "*.site"'
inst1.site.example.com

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

18e4dee6 08/05/2011 04:57 pm Iustin Pop

Zero DRBD metadata before creation

The docstring of the DRBD8 class says:

… The meta device is checked for valid size and is zeroed on create.

which is not done today, hence we have
http://code.google.com/p/ganeti/issues/detail?id=182:

node1# mkreiserfs -f /dev/xenvg/t8...
f0edfcf6 08/05/2011 04:48 pm Michael Hanselmann

Remove iallocator's “multi-evacuate” mode

It is no longer used and has been deprecated in 2.5.

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

58aa30d7 08/05/2011 04:41 pm Michael Hanselmann

confd.querylib: Remove long-deprecated query mode

This was never used by a stable version.

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

ce4cd929 08/05/2011 04:40 pm Michael Hanselmann

Add docstring to cmdlib.TLReplaceDisks._FindFaultyDisks

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

6f9e71bb 08/05/2011 04:40 pm Michael Hanselmann

watcher: Fix breakage caused by 9bb69bb52fb9

The first argument to str.split is the separator, not the maximum number
of splits.

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

cb386168 08/05/2011 02:58 pm Michael Hanselmann

LUGroupVerifyDisks: Use _CheckInstanceNodeGroups' result

… instead of getting the list of instances once again from the
configuration.

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

b9ff3e15 08/05/2011 02:58 pm Michael Hanselmann

cmdlib: Factorize checking node groups' instances

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

9bb69bb5 08/05/2011 02:06 pm Michael Hanselmann

watcher: Write per-group instance status, merge into global one

Each per-group watcher process writes its own instance status file. Once
that's done it tries to acquire an exclusive lock on the global file and
will proceed to read all status file, merging them based on each file's...

0e5084ee 08/05/2011 02:06 pm Michael Hanselmann

utils.ReadFile: Add pre-read callback

This will be used by the watcher to store the file's fstat(2). It must
be done from the filehandle.

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

2f1fe558 08/05/2011 12:48 pm René Nussbaumer

Merge branch 'stable-2.4'

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

eee68d57 08/04/2011 05:56 pm Agata Murawska

Fixed a typo in utils/process.py

Signed-off-by: Agata Murawska <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

12126847 08/04/2011 05:01 pm Apollon Oikonomopoulos

Remove 15-second sleep from LUInstanceCreate

Remove 15 second sleep when wait_for_sync is not set. LUInstanceCreate already
calls _WaitForSync with oneshot=True, which already performs an internal
wait-loop for disks to start syncing.

Signed-off-by: Apollon Oikonomopoulos <>...

af993a2c 08/04/2011 05:01 pm Iustin Pop

Add a readability alias

lu.glm.list_owned becomes lu.owned_locks, which is clearer for the
reader.

Also rename three variables (which were before named owned_locks) to
make clearer what they track.

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

ce523de1 08/04/2011 04:19 pm Michael Hanselmann

Fix broken object references in docstrings

The module is called “objects”, not “object”.

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

bd2a5569 08/04/2011 04:18 pm Michael Hanselmann

Add “gnt-instance change-group” command

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

1aef3df8 08/04/2011 04:18 pm Michael Hanselmann

Add opcode to change instance's group

This is quite similar to evacuating a group, but the locking
is different.

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

eafa26af 08/04/2011 04:18 pm Michael Hanselmann

Factorize checking instance's node groups

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

173dbf05 08/04/2011 01:28 pm Michael Hanselmann

Remove WATCHER_STATEFILE constant

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

16e0b9c9 08/04/2011 01:28 pm Michael Hanselmann

ganeti-watcher: Split for node groups

This patch brings a huge change to ganeti-watcher to make it aware of
node groups. Each node group is processed in its own subprocess,
reducing the impact of long-running operations.

The global watcher state file, $datadir/ganeti/watcher.data, is replaced...

de9c12f7 08/04/2011 01:27 pm Michael Hanselmann

Lock potential target nodes for group evacuation

All potential target nodes should be locked while calculating
a group evacuation.

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

6e80da8b 08/04/2011 01:27 pm Michael Hanselmann

Small changes in group evacuation

- Use OpPrereqError in CheckPrereq
- Clarify command synopsis

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

a14065ac 08/04/2011 01:26 pm Michael Hanselmann

cmdlib: Factorize getting iallocator

The same logic will be used for changing an instance's group.

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

41e1e79e 08/03/2011 07:35 pm Apollon Oikonomopoulos

Pause DRBD sync for OS install if not wait_for_sync

When wait_for_sync is set to False in LUInstanceCreate, Ganeti lets DRBD sync
in the background while performing the rest of the installation steps,
including OS installation.

However, OS installation is a very disk-intensive task that intereferes badly...

a6a3efe4 08/03/2011 07:21 pm Iustin Pop

Fix documentation of gnt-instance failover

Explain that we only start the instance on the new node if it was
originally running.

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

d5fca545 08/03/2011 06:27 pm Iustin Pop

Fix small typo in docstring

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

6aa7a354 08/03/2011 05:42 pm Iustin Pop

Change the backend.InstanceLogName signature

This uses now the component for the transfer (if available), otherwise
(e.g. in installs/renames) nothing.

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

6613661a 08/03/2011 05:42 pm Iustin Pop

Instance transfer: export component name to backend

This modifies the RPC layer to export the component name too to the
backend, so that it can be used in log files and messages.

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

5e26c4d9 08/03/2011 05:42 pm Iustin Pop

Instance transfer: add argument for the 'component'

Currently, transfer data is done mainly with just the instance name,
but when we have instances with multiple disks this is not enough to
distinguish between the different transfers being done for the
instance....

71333cb9 08/03/2011 05:41 pm Iustin Pop

Optimise use of repeated/looping GetInstanceInfo

Similar to the previous patch, this adds a helper function to
eliminate repeated calls info ConfigWriter.

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

f5eaa3c1 08/03/2011 05:41 pm Iustin Pop

Optimise use of repeated/looping GetNodeInfo

This adds a new ConfigWriter.GetMultiNodeInfo function and replaces
multiple/looping calls to GetNodeInfo with it.

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

a4338da2 08/03/2011 05:41 pm Iustin Pop

Fix lint errors

It turns out that the only use of the operator module was for
itemgetter, so patch eb62069e should have removed that import too.

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

eb62069e 08/03/2011 01:37 pm Iustin Pop

Add two more compat functions

operator.itemgetter(0) → fst
operator.itemgetter(1) → snd

snd is not used yet, but it makes sense to add both.

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

7c070961 08/02/2011 04:12 pm Iustin Pop

Fix types passed to IAllocator

Iallocator mode reloc, parameter reloc_from takes a list; half of the
code already forced this parameter to list, we add the other two cases
where it is needed.

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

dfc8824a 08/02/2011 12:56 pm Michael Hanselmann

jqueue: Add short delay before detecting job changes

By sleeping for 100ms after receiving a notification for a changed job
file the job is given some additional time to change again. This
significantly reduces the number of LUXI calls for WaitForJobChanges...

fab9573b 08/02/2011 12:08 pm Michael Hanselmann

Add primary/second nodes' group as query fields

These will be very useful for ganeti-watcher as it needs to retrieve
instances by group.

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

d66bbe9f 08/02/2011 11:20 am Iustin Pop

Fix doclint failures

Commit 54ca6e4b2 renamed some arguments, but didn't also renames them
in the docstrings.

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

8f07dc0d 07/29/2011 06:02 pm Michael Hanselmann

watcher: Separate function for writing instance status file

For now this will do another query to the master daemon, but with the
split for node groups this issue will go away.

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

d7c42723 07/29/2011 06:02 pm Michael Hanselmann

watcher: Make RAPI error messages less technical

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