Statistics
| Branch: | Tag: | Revision:

root / lib @ f3c1a70c

# Date Author Comment
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 <>

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

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

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

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

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

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

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

54ca6e4b 07/29/2011 06:02 pm Michael Hanselmann

watcher.state: Use strings, not objects

Until now the state class would receive instances as objects
(ganeti.watcher.Instance), but this is not necessary. By using strings
the interface is simplified.

This patch also simplifies some code accessing the internal structures,...

013ce4ae 07/29/2011 06:02 pm Michael Hanselmann

watcher: Raise error on unknown hook status

Also, remove punctuation from one error message.

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

0cc9e018 07/29/2011 06:01 pm Michael Hanselmann

watcher: Reformat constants

Make them match with style guide.

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

9d7b1e53 07/29/2011 06:01 pm Michael Hanselmann

Add new watcher constants

WATCHER_STATEFILE will be removed at the end of this
patch series.

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

21daa4a8 07/29/2011 04:19 pm Stephen Shirley

Fix formatting of frozensets

Signed-off-by: Stephen Shirley <>
Reviewed-by: Iustin Pop <>

21ee2318 07/29/2011 04:04 pm Michael Hanselmann

cli: Add constant for node group option

ganeti-watcher will use this constant to pass the option to itself for
processing all node groups.

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

194e8648 07/29/2011 03:36 pm Iustin Pop

Replace %r with '%s' in masterd/instance.py

I still don't know why Michael is a fan of %r, but in the meantime
this patch changes:

WARNING: import u'import-2011-07-29_01_39_33-y3gZKV' on node1 failed:
Exited with status 1

into:

WARNING: import 'import-2011-07-29_01_39_33-y3gZKV' on node1 failed:...

990ade2d 07/29/2011 01:59 pm Stephen Shirley

Add "reboot_behavior" hypervisor flag

During instance installations, you do not want the instance to reboot
and start again with the same parameters, as that will most likely
re-start the install process. Therefore, when the instance requests a
reboot it should instead shutdown. This flag allows this to be...

896a03f6 07/29/2011 11:49 am Iustin Pop

Clear the OS scripts environment

The OS scripts currently run with the whole noded environment; this is
different from the hooks which run with a cleared one and most likely
an oversight.

This might create problems when upgrading, so it needs to be clearly...

adf6301e 07/29/2011 11:48 am Michael Hanselmann

watcher: Split state class into separate module

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

bcf0450d 07/29/2011 11:21 am Michael Hanselmann

Rename watcher's constant for instance status file

“upfile” is a bad name.

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

9ca87fb3 07/28/2011 04:27 pm Michael Hanselmann

watcher: Split node maintenance into separate module

The node maintenance class is standalone.

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

db0647dc 07/28/2011 02:17 pm Iustin Pop

Merge branch 'devel-2.4'

  • devel-2.4:
    Add support for cluster/OS parameters in QA
    Add OS search path to gnt-cluster info

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

35007011 07/28/2011 02:08 pm Iustin Pop

Remove requirement for variants on OS API v15+

This removes:

- the check in backend that such OSes have a variants file or if it
exists that is non-empty; in order for this to work, we also rework
the logic in backend._TryOSFromDisk to allow for optional OS files...

4474f112 07/28/2011 11:19 am Iustin Pop

Revert "cli.JobExecutor: Feedback function for info output"

This reverts commit 7421df8e5f2cf31022085b332d1300640ba5854b.

The feedback_fn argument to JobExecutor is used for PollJob, and thus
has a fixed signature: a single arg, tuple of (timestamp, log type,...

f39b695a 07/28/2011 11:16 am Iustin Pop

Fix group verification of offline nodes

Commit aef59ae7 reworked the file verification, but forgot to take
into account offline nodes.

The fact that this was not detected yet is due to the fact that we
don't test clusters with offline nodes in QA :(

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

6ba2bdc2 07/27/2011 03:50 pm Iustin Pop

Disallow variants for OSes that don't support them

Otherwise we get no variant checks at all, but the variant is still
recorded.

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

6ae1fade 07/27/2011 11:38 am Iustin Pop

Fix OS queries for API v20 w/parameters

OS parameters is a list of tuples, so we can't pass it directly to
utils.NiceSort, hence we use a sort key.

This was not detected in QA since QA only tests API v10 :(

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

9f039737 07/26/2011 02:22 pm Iustin Pop

Add helper for declaring all locks shared

This patch adds a function for abstracting
“dict.fromkeys(locking.LEVELS, 1)”. It also removes a duplicate
assignment for the share_locks in LUInstanceQuerydata.

Additionally, it moves the _SupportsOob function to the helper...

1ce03fb1 07/26/2011 02:19 pm Michael Hanselmann

Add ht-based result checks to opcodes

This adds the infrastructure necessary to check opcode results using
ht-based functions. Checks are added for two opcodes.

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

ae1a845c 07/26/2011 01:53 pm Michael Hanselmann

Change OpClusterVerifyDisks to per-group opcodes

Until now verifying disks, which is also used by the watcher,
would lock all nodes and instances. With this patch the opcode
is changed to operate on per nodegroup, requiring fewer locks.

Both “gnt-cluster” and “ganeti-watcher” are changed for the...

c4ff2275 07/26/2011 01:53 pm Michael Hanselmann

cmdlib: Give instance name in error message on group evacuation

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

3ddd94f9 07/26/2011 01:53 pm Michael Hanselmann

cmdlib: Factorize mapping instance LVs to node/volume

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

7421df8e 07/26/2011 01:53 pm Michael Hanselmann

cli.JobExecutor: Feedback function for info output

This will be used in the watcher where we don't want to
pollute stdout unless in debug mode.

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

f36c3e2d 07/26/2011 01:12 pm Ben Lipton

Add OS search path to gnt-cluster info

Otherwise, it's pretty hard to figure it out from the command line.

Signed-off-by: Ben Lipton <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

13aeae6a 07/26/2011 11:31 am Iustin Pop

Fix recompilation of htools on regen-vcs-version

Currently, most htools code depends on Constants.hs which is generated
from constants.py and also depends on _autoconf.py. Also, _autoconf.py
depends on vcs-version, which all together means that when 'make...

a3ac3243 07/26/2011 11:31 am Iustin Pop

Add another name for the --yes-do-it option

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

d0c8c01d 07/25/2011 04:55 pm Iustin Pop

Most boring patch ever

s/'/"/ in (hopefully) the right places.

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

0fa044e7 07/25/2011 04:06 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4:
    Reopen daemon's stdio on SIGHUP
    Reopen log file only once after SIGHUP
    Don't leak file descriptors when setting up daemon output
    Fix aliases in bash completion

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

110f49ef 07/25/2011 04:01 pm Michael Hanselmann

Reopen daemon's stdio on SIGHUP

Before this patch daemons would continue to refer to an old logfile for
their standard I/O if they had been asked to reopen the log (SIGHUP).

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

ad88650c 07/25/2011 04:01 pm Michael Hanselmann

Reopen log file only once after SIGHUP

Commit b6fa9a44 added a re-openable log handler. The log file is
reopened when a daemon is sent a HUP signal. Due to a bug in the code,
fixed by this patch, the log file would be reopened for every single log
message thereafter....

638ac34b 07/25/2011 04:01 pm Michael Hanselmann

Don't leak file descriptors when setting up daemon output

When a daemon's output is configured using “utils.SetupDaemonFDs”, the
function must use dup2(2). Unfortunately the code didn't close the
original file descriptors, leaking them in the process.

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

f965260c 07/22/2011 02:32 pm Michael Hanselmann

gnt-instance info: Return static info if node offline

Before this patch “gnt-instance info” would fail with the error message
“Error checking node $node: Node is marked offline” if the instance's
primary node is marked offline and the user didn't explicitely request...

3b61ee44 07/22/2011 02:30 pm Michael Hanselmann

Ignore offline primary when failing over

When the source node for a failover is marked offline, there's no need
to require the user to specify “--ignore-consistency”.

To make it work at all, a number of bugs introduced by the merge of
migration and failover are also fixed by this patch....

d6f46b6a 07/22/2011 01:29 pm Michael Hanselmann

gnt-instance console: Use query instead of opcode

This means opening the console no longer requires the instance lock,
allowing it to be used during long-running operations (e.g. replacing a
disk).

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

dbfde874 07/22/2011 12:07 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4:
    gnt-node volumes: Fix instance names

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

018ae30b 07/22/2011 12:03 pm Michael Hanselmann

Add opcode attribute for comments

This attribute allows programmatic submitters of jobs (e.g. iallocator)
to add a comment to each opcode, describing its purpose. Example:

$ gnt-job info 123
Job ID: 123

Opcodes:
OP_INSTANCE_REPLACE_DISKS
…...

4b413e49 07/22/2011 12:00 pm Michael Hanselmann

gnt-node volumes: Fix instance names

Commit 84d7e26b changed “objects.Instance.MapLVsByN” to not just return
the LV name, but to include the volume group name (e.g.
“xenvg/d67e8700….disk0_data”). This in turn broke the mapping of volume
names in LUNodeQueryvols, stopping instance names from displayed in...

463f75a5 07/21/2011 04:25 pm Michael Hanselmann

Fix instance failover (missing argument)

More fallout from commit 323f9095b49d.

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

c0a146a1 07/21/2011 04:25 pm Michael Hanselmann

Implement instance failover via RAPI

No idea why this was missed before.

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

44b4eddc 07/21/2011 02:55 pm Michael Hanselmann

Make lock monitor more versatile

With this change it'll be possible to register other lock information
providers. One usecase for this are job dependencies, which can be shown
in the output of “gnt-debug locks”, too.

The lock monitor is changed to accept more than one return value from...

4c03b2b5 07/21/2011 02:55 pm Michael Hanselmann

locking.GLM: Allow adding locks to monitor

This will be used for exporting job dependencies through
the lock monitor.

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

fcb21ad7 07/21/2011 02:55 pm Michael Hanselmann

Export job dependencies through lock monitor

This makes them visible to the user. Example:

$ gnt-debug locks -o name,pending
Name Pending
job/890 job:891,892
job/892 job:894

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

67a315ba 07/21/2011 02:20 pm Michael Hanselmann

Add error state to LUGroupEvacuate's exceptions

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

47099cd1 07/21/2011 02:20 pm Michael Hanselmann

Rename *_STATUS_WAITLOCK to …_WAITING

This patch renames the {JOB,OP}_STATUS_WAITLOCK constants to {JOB,OP}_STATUS_WAITING, as per design document for chained jobs.

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

f6eb380d 07/21/2011 12:39 pm Michael Hanselmann

gnt-group: Add command to evacuate whole group

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

08f8c82c 07/21/2011 12:39 pm Michael Hanselmann

Add new opcode for evacuating group

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