ganeti-local
13 years agoRAPI: Add support for querying resources
Michael Hanselmann [Fri, 11 Mar 2011 13:25:24 +0000 (14:25 +0100)]
RAPI: Add support for querying resources

- Access is only permitted for authenticated clients (queries can return
  sensitive data)
- Filters can be specified when sending a PUT request
- Updates RAPI client, documentation and tests

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd support for query resources in RAPI URIs
Michael Hanselmann [Tue, 8 Mar 2011 13:14:11 +0000 (14:14 +0100)]
Add support for query resources in RAPI URIs

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agomasterd: Simplify code for field queries
Michael Hanselmann [Fri, 11 Mar 2011 13:26:06 +0000 (14:26 +0100)]
masterd: Simplify code for field queries

Instead of going via cmdlib and using special cases for different
resources, the list of fields is used directly.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoconstants: Rename QR_OP_*, add QR_VIA_RAPI
Michael Hanselmann [Fri, 11 Mar 2011 13:26:17 +0000 (14:26 +0100)]
constants: Rename QR_OP_*, add QR_VIA_RAPI

Commit 28b71a76 added a list of resources which can be queried using
LUXI. Unfortunately the variable was named “QR_OP_LUXI”, which can be
confusing. This patch renames “QR_OP_QUERY” to “QR_VIA_OP”, “QR_OP_LUXI”
to “QR_VIA_LUXI” and adds a new variable, currently equal to
“QR_VIA_LUXI”, for remote API queries (mostly for documentation).

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoqlang: Remove unused ReadSimpleFilter
Michael Hanselmann [Fri, 11 Mar 2011 14:57:37 +0000 (15:57 +0100)]
qlang: Remove unused ReadSimpleFilter

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoTLReplaceDisks: Add check if disks are activated
René Nussbaumer [Tue, 15 Mar 2011 08:23:23 +0000 (09:23 +0100)]
TLReplaceDisks: Add check if disks are activated

Previously we failed later with a rather useless error message. This
patch fixes this and tells the user to activate-disks if replace-disks
is in the need of activated disks rather than abort with a cryptic error
message.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoLUOsDiagnose: Move legacy behaviour into filter
Michael Hanselmann [Tue, 8 Mar 2011 10:43:42 +0000 (11:43 +0100)]
LUOsDiagnose: Move legacy behaviour into filter

The behaviour of LUOsDiagnose needs special treatment. Commit d22dfef7
changed it to not return hidden, blacklisted or invalid OSes if the
respective field is not requested. This behaviour needs to be preserved
for users of the old opcode, but since it provides an implicit
filtering, it should not be done for LUQuery (the generic way to query
for resources) and is therefore moved from the underlying implementation
to LUOsDiagnose. Users of the new opcode should pass an explicit filter.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoConvert OsDiagnose to query
Michael Hanselmann [Mon, 7 Mar 2011 13:48:46 +0000 (14:48 +0100)]
Convert OsDiagnose to query

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoqlang: Add some more documentation for filters
Michael Hanselmann [Fri, 11 Mar 2011 16:08:49 +0000 (17:08 +0100)]
qlang: Add some more documentation for filters

It's not perfect, but at least some more.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoquery: Add conversion wrapper
Michael Hanselmann [Fri, 11 Mar 2011 13:54:50 +0000 (14:54 +0100)]
query: Add conversion wrapper

Allows converting the value of a column before returning it. Useful for
sorting while still using one of the other generic functions for
retrieving the value.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoFix epydoc warning about unknown reference
Michael Hanselmann [Fri, 11 Mar 2011 16:56:23 +0000 (17:56 +0100)]
Fix epydoc warning about unknown reference

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoconfig: Wrap MatchNameComponent, reduce lock duration
Michael Hanselmann [Fri, 11 Mar 2011 16:29:41 +0000 (17:29 +0100)]
config: Wrap MatchNameComponent, reduce lock duration

- Remove duplication by merging two MatchNameComponent into a wrapper
- Reduce lock duration by getting list of names under lock and then
  matching names without the lock
- Also, ExpandNodeName's docstring is fixed.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoopcodes: Document OpQueryFields' parameters
Michael Hanselmann [Tue, 8 Mar 2011 13:13:50 +0000 (14:13 +0100)]
opcodes: Document OpQueryFields' parameters

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoInstance failover: fix bug for INT_MIRROR cases
Iustin Pop [Wed, 9 Mar 2011 16:23:10 +0000 (17:23 +0100)]
Instance failover: fix bug for INT_MIRROR cases

Patches db366d9a and aac4511a added support for EXT_MIRROR instances,
but inadvertently introduced a bug: for INT_MIRROR cases, we don't
need (actually we can't support) neither an iallocator nor a target
node.

To fix this, we move the iallocator/node checks in CheckPrereq (or
respectively in the tasklet CheckPrereq), where we have access to the
instance configuration, and additionally we check for and prevent
passing either of these two for INT_MIRROR instances.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agognt-cluster epo: Adding --power-delay flag
René Nussbaumer [Wed, 9 Mar 2011 09:50:57 +0000 (10:50 +0100)]
gnt-cluster epo: Adding --power-delay flag

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agognt-node power: Adding --power-delay flag
René Nussbaumer [Wed, 9 Mar 2011 09:47:35 +0000 (10:47 +0100)]
gnt-node power: Adding --power-delay flag

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agocli.py: Adding POWER_DELAY_OPT
René Nussbaumer [Wed, 9 Mar 2011 09:44:16 +0000 (10:44 +0100)]
cli.py: Adding POWER_DELAY_OPT

The command line option --power-delay sets the time waited between power
ons.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoOpOobCommand: Adding power on delay
René Nussbaumer [Tue, 8 Mar 2011 10:56:57 +0000 (11:56 +0100)]
OpOobCommand: Adding power on delay

This delays the invocation of the power on of the next node. So if you
power on a bunch of nodes it will not blow the fuse.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoOpOobCommand: Document all fields
René Nussbaumer [Tue, 8 Mar 2011 10:56:25 +0000 (11:56 +0100)]
OpOobCommand: Document all fields

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agognt-cluster epo: Adding --shutdown-timeout
René Nussbaumer [Tue, 8 Mar 2011 10:34:15 +0000 (11:34 +0100)]
gnt-cluster epo: Adding --shutdown-timeout

This adds the --shutdown-timeout flag to gnt-cluster epo to specify the
shutdown timeout for instance shutdown.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoRename DTS_NET_MIRROR to DTS_INT_MIRROR
Apollon Oikonomopoulos [Mon, 28 Feb 2011 11:51:16 +0000 (13:51 +0200)]
Rename DTS_NET_MIRROR to DTS_INT_MIRROR

DTS_INT_MIRROR better contrasts DTS_EXT_MIRROR.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
[iustin@google.com: updated patch for changed context]
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoShared file support for tools/burnin
Apollon Oikonomopoulos [Mon, 28 Feb 2011 11:51:15 +0000 (13:51 +0200)]
Shared file support for tools/burnin

Make burnin work with -t sharedfile and update burnin's help.

Shared block storage support is *not* included, as currently there is no way to
provision shared block storage from within Ganeti.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoKVM: use cache=none for shared disk templates
Apollon Oikonomopoulos [Mon, 28 Feb 2011 11:51:14 +0000 (13:51 +0200)]
KVM: use cache=none for shared disk templates

Disable host cache for externally mirrored disks to avoid cache incoherency.
Without this, migrations between the same two nodes may end up in disk
corruption.

This is a runtime override of cluster defaults, mostly a workaround.
Unfortunately, we cannot use cmdlib._CheckHVParams, as we want to check the
hypervisor parameters *in conjunction* with the disk template, which is part of
the instance definition.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoShared storage instance failover
Apollon Oikonomopoulos [Mon, 28 Feb 2011 11:51:13 +0000 (13:51 +0200)]
Shared storage instance failover

Modify LUFailoverInstance to enable shared storage instances to failover.
Shared storage instance failover requires either a target node or an
iallocator to determine the target node. If none is given, the cluster default
iallocator is used.

The hook environment variables {OLD,NEW}_SECONDARY will be blank for shared
storage instances.

Locking behaviour is the same as for instance migration.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
[iustin@google.com: revert the DTS_NET_MIRROR specific changes]
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoShared storage node migration
Apollon Oikonomopoulos [Mon, 28 Feb 2011 11:51:12 +0000 (13:51 +0200)]
Shared storage node migration

Modify LUNodeMigrate to provide node migration for nodes with instances using
shared storage. gnt-node migrate has to be passed an iallocator for migration
of shared storage instances to be performed. When using a shared storage
backend, all cluster nodes are locked.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoShared storage instance migration
Apollon Oikonomopoulos [Mon, 28 Feb 2011 11:51:11 +0000 (13:51 +0200)]
Shared storage instance migration

Modify LUMigrateInstance and TLMigrateInstance to allow instance migrations for
instances with DTS_EXT_MIRROR disk templates.

Migrations of shared storage instances require either a target node, or an
iallocator to determine the target node. If none is given, the cluster default
iallocator is used.

Locking behaviour: If the iallocator is used, then initially all nodes are
locked and subsequently only the locks on the source node and the target node
selected by the iallocator are retained.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
[iustin@google.com: small changes in cmdlib.py]
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoCLI changes to facilitate shared storage migration/failover
Apollon Oikonomopoulos [Mon, 28 Feb 2011 11:51:10 +0000 (13:51 +0200)]
CLI changes to facilitate shared storage migration/failover

Add DST_NODE_OPT to cli.py to use for directly specifying the target node
during migration/failover.

gnt-instance failover/migrate also get passed an iallocator option.

gnt-node failover/migrate get only a target_node option.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMigration and failover: add iallocator and target_node slots
Apollon Oikonomopoulos [Mon, 28 Feb 2011 11:51:09 +0000 (13:51 +0200)]
Migration and failover: add iallocator and target_node slots

Add iallocator and target_node slots to OpMigrateInstance and
OpFailoverInstance to facilitate shared-storage-backed instance mobility. Add
iallocator slot to OpMigrateNode (no explicit target_node in this case).

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoIAllocator changes to work with shared storage
Apollon Oikonomopoulos [Mon, 28 Feb 2011 11:51:08 +0000 (13:51 +0200)]
IAllocator changes to work with shared storage

Make cmdlib.IAllocator shared-storage-aware. IAllocator requires secondary
nodes only on DTS_NET_MIRROR disk templates and requires no secondaries for
DTS_EXT_MIRROR templates.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoShared block storage support
Apollon Oikonomopoulos [Fri, 4 Mar 2011 14:35:23 +0000 (16:35 +0200)]
Shared block storage support

This patch introduces basic shared block storage support.

It introduces a new storage backend, bdev.PersistentBlockDevice, to
use as a backend for shared block storage. The new bdev requires a new
BLOCKDEV_DRIVER_MANUAL constant with the value "manual" and uses it as
the first part of the block device unique_id.

A new disk template, DT_BLOCK is introduced as well and added to
DTS_EXT_MIRROR and DTS_MAY_ADOPT. Also added DTS_MUST_ADOPT constant
and use it to check for the presence of the adopt keyword during LU
invocation. We enforce the /dev/disk limitation upon adoption, but we
allow block devices to reside anywhere under /dev.

This is very basic support and includes no storage manipulation (provisioning,
resizing, renaming) which will have to be implemented through a "driver"
framework.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
[iustin@google.com: slight changes to bdev.py]
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoAdd bdev_sizes RPC call
Apollon Oikonomopoulos [Fri, 4 Mar 2011 14:28:58 +0000 (16:28 +0200)]
Add bdev_sizes RPC call

The bdev_sizes multi-node RPC call returns the sizes of the requested
block devices on the desired nodes. Its intended use is to verify the
existence of a block device on a given node for shared block storage
support.

Block device paths are expected to lie under constants.BLOCKDEV_DIR
("/dev/disk" by default), where persistent symlinks for block devices
are assumed to exist.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
[iustin@google.com: small changes in backend.py]
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoQA: Improve tests for gnt-os
Michael Hanselmann [Mon, 7 Mar 2011 19:01:08 +0000 (20:01 +0100)]
QA: Improve tests for gnt-os

- Test OS lists via command line and RAPI
- Test “gnt-os diagnose” and “gnt-os info”

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoQA: Add utility to ensure item is not in sequence
Michael Hanselmann [Mon, 7 Mar 2011 18:59:24 +0000 (19:59 +0100)]
QA: Add utility to ensure item is not in sequence

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoQA: Rename OS state test for clarification
Michael Hanselmann [Mon, 7 Mar 2011 16:46:33 +0000 (17:46 +0100)]
QA: Rename OS state test for clarification

Also add an additional check to ensure the OS does not exist.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoQA: Use constants instead of hardcoded numbers
Michael Hanselmann [Mon, 7 Mar 2011 16:45:57 +0000 (17:45 +0100)]
QA: Use constants instead of hardcoded numbers

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoLog log-file reopening
Iustin Pop [Wed, 23 Feb 2011 13:45:45 +0000 (14:45 +0100)]
Log log-file reopening

This makes the log files get an record notifying of the reopen, so as
to force creation of the log files soon after rotation.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoMerge branch 'stable-2.4'
Iustin Pop [Mon, 7 Mar 2011 13:33:48 +0000 (14:33 +0100)]
Merge branch 'stable-2.4'

* stable-2.4:
  Release 2.4.0
  Small improvement to the ganeti man page
  Fix LUClusterRepairDiskSizes and rpc result usage
  Fix RPC mismatch in blockdev_getsize[s]
  RAPI: fix evacuate node resource
  Fix typo in kvm-ifup script
  NEWS: Replace smartquotes, start lines with uppercase
  Fix LU processor's GetECId
  Update NEWS and release 2.4.0 rc3
  Fix potential data-loss bug in disk wipe routines
  1-char comment typo fix
  Expand some acronyms, add to glossary

Conflicts:
        NEWS (trivial)

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoquery: Add operator for truth
Michael Hanselmann [Wed, 2 Mar 2011 17:34:42 +0000 (18:34 +0100)]
query: Add operator for truth

The “?” operator is the equivalent of “if var” in Python.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoRelease 2.4.0 v2.4.0
Iustin Pop [Mon, 7 Mar 2011 11:00:51 +0000 (12:00 +0100)]
Release 2.4.0

NEWS update and version bump.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoMerge branch 'devel-2.3' into devel-2.4
Iustin Pop [Mon, 7 Mar 2011 09:50:27 +0000 (10:50 +0100)]
Merge branch 'devel-2.3' into devel-2.4

* devel-2.3:
  Fix LUClusterRepairDiskSizes and rpc result usage
  Fix RPC mismatch in blockdev_getsize[s]
  RAPI: fix evacuate node resource

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoSmall improvement to the ganeti man page
Iustin Pop [Thu, 3 Mar 2011 10:16:39 +0000 (11:16 +0100)]
Small improvement to the ganeti man page

Also specifies the comma-escaping feature.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMerge branch 'devel-2.2' into devel-2.3
Iustin Pop [Fri, 4 Mar 2011 11:36:15 +0000 (12:36 +0100)]
Merge branch 'devel-2.2' into devel-2.3

* devel-2.2:
  Fix LUClusterRepairDiskSizes and rpc result usage
  Fix RPC mismatch in blockdev_getsize[s]

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoFix LUClusterRepairDiskSizes and rpc result usage
Iustin Pop [Tue, 15 Feb 2011 13:39:44 +0000 (14:39 +0100)]
Fix LUClusterRepairDiskSizes and rpc result usage

This LU was introduced before the RPC result conversion from .data to
.payload, and it has managed to keep the old-style usage (how? it's
the only LU that does so). Fix by changing to payload, and add some
extra logging for easier diagnose.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Stephen Shirley <diamond@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
(cherry picked from commit 043beb38f4e10b75d0820c361c668c441c7a6980)

13 years agoFix RPC mismatch in blockdev_getsize[s]
Iustin Pop [Tue, 15 Feb 2011 13:29:08 +0000 (14:29 +0100)]
Fix RPC mismatch in blockdev_getsize[s]

Commit 92fd2250 added consistency checks in the RPC layer, which broke
the call_blockdev_getsizes RPC call (declared with 's' at the end in
rpc.py, without 's' in the node daemon).

The immediate fix is to correct the rpc function name, the long term
one will be to remove this duplication.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Stephen Shirley <diamond@google.com>
(cherry picked from commit ccfbbd2d1546b4f57d5bfeb115573967f7fb558b)

13 years agoRAPI: fix evacuate node resource
Iustin Pop [Fri, 4 Mar 2011 10:04:10 +0000 (11:04 +0100)]
RAPI: fix evacuate node resource

PollJob returns the whole op_results, hence a list of opcode results.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agognt-instance rename: Update the man-page
René Nussbaumer [Fri, 4 Mar 2011 09:38:38 +0000 (10:38 +0100)]
gnt-instance rename: Update the man-page

In commit 31fe5102a a additional check was added. This patch rephrases
the man page accordingly to address this change.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoLUInstanceRename: Fail if renamed hostname mismatch
René Nussbaumer [Thu, 3 Mar 2011 09:18:08 +0000 (10:18 +0100)]
LUInstanceRename: Fail if renamed hostname mismatch

There's a problem if you run gnt-instance rename with a non FQDN and the
renamed LU tries to resolve the hostname to make it FQDN. It could be
that this resolved hostname was just a CNAME to another name which leads
to wrongly renamed instances name.

Given a name of "foobar" is a CNAME to "moohost" now if you gonna rewrite an
instance named "foobar1" to "foobar" it will pickup the host "moohost".
This is not obvious behaviour. If we detect this case we abort with a
prereq error. The user then however can continue with a FQDN and
--no-name-check if he intends to force the operation.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMerge remote branch 'stable-2.4' into devel-2.4
Guido Trotter [Wed, 2 Mar 2011 21:36:01 +0000 (13:36 -0800)]
Merge remote branch 'stable-2.4' into devel-2.4

* origin/stable-2.4:
  Fix typo in kvm-ifup script
  NEWS: Replace smartquotes, start lines with uppercase
  Update NEWS and release 2.4.0 rc3
  Fix potential data-loss bug in disk wipe routines

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoRemove bridge field from rapi daemon
Guido Trotter [Wed, 16 Feb 2011 13:54:46 +0000 (13:54 +0000)]
Remove bridge field from rapi daemon

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoRemove bridge field from rapi client
Guido Trotter [Wed, 16 Feb 2011 13:54:33 +0000 (13:54 +0000)]
Remove bridge field from rapi client

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoFix test rapi request
Guido Trotter [Wed, 16 Feb 2011 13:53:33 +0000 (13:53 +0000)]
Fix test rapi request

This was wrong even before, as it contained both a bridge and a link,
which are incompatible when passed together. Fix by passing only the
link field.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoRemove deprecated 'bridge' nic parameter
Guido Trotter [Wed, 16 Feb 2011 12:19:04 +0000 (12:19 +0000)]
Remove deprecated 'bridge' nic parameter

This has been a synonym for "link" since a few major versions.
Add a NEWS entry so we won't forget to mention it at release time.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoUnhardcode constants from instance batch create
Guido Trotter [Wed, 16 Feb 2011 12:09:11 +0000 (12:09 +0000)]
Unhardcode constants from instance batch create

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoAdd comments about INIC, IDISK and NIC constants
Guido Trotter [Wed, 16 Feb 2011 12:02:28 +0000 (12:02 +0000)]
Add comments about INIC, IDISK and NIC constants

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoquery: Fix bug when names are specified
Michael Hanselmann [Tue, 1 Mar 2011 17:25:04 +0000 (18:25 +0100)]
query: Fix bug when names are specified

If the client/caller would specify names through the use of a filter,
the result would be sorted. This is a regression over earlier Ganeti
versions and verified in QA. This patch adds an optional parameter to
control the sorting and provides unittests.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoFix typo in kvm-ifup script
Michael Hanselmann [Tue, 1 Mar 2011 17:32:40 +0000 (18:32 +0100)]
Fix typo in kvm-ifup script

Reported-by: Bas Tichelaar <bas@30loops.net>
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

13 years agoAdd DTS_MIRRORED frozenset
Apollon Oikonomopoulos [Mon, 28 Feb 2011 11:51:05 +0000 (13:51 +0200)]
Add DTS_MIRRORED frozenset

Use DTS_MIRRORED to indicate mirrored disk templates that allow
migrations/failover.

DTS_MIRRORED is the union of DTS_EXT_MIRROR and DTS_NET_MIRROR.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoShared file storage initialization code
Apollon Oikonomopoulos [Mon, 28 Feb 2011 11:51:04 +0000 (13:51 +0200)]
Shared file storage initialization code

Add shared file storage handling during cluster initialization.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoCore shared file storage support
Apollon Oikonomopoulos [Mon, 28 Feb 2011 11:51:03 +0000 (13:51 +0200)]
Core shared file storage support

This patch introduces core file storage support, consisting of the following:

A configure-time switch for enabling/disabling shared file storage
support and controlling the shared file storage location:
--with-shared-file-storage-dir=.  Shared file storage configuration is then
available as _autoconf.ENABLE_SHARED_FILE_STORAGE and
_autoconf.SHARED_FILE_STORAGE_DIR and there is a cluster-wide ssconf
key named "shared_file_storage_dir" for changing the file location.

A new disk template named "sharedfile" (DT_SHARED_FILE), using
ganeti.bdev.FileStorage.

Auxiliary functions in lib/config.py to handle shared file storage.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
[iustin@google.com: small style fixes]
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoAdd shared file storage design doc
Apollon Oikonomopoulos [Mon, 28 Feb 2011 11:51:02 +0000 (13:51 +0200)]
Add shared file storage design doc

Add doc/design-shared-storage.rst to document the proposed changes and update
Makefile.am respectively.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agocmdlib: Allow use of more complex filters
Michael Hanselmann [Mon, 28 Feb 2011 11:23:08 +0000 (12:23 +0100)]
cmdlib: Allow use of more complex filters

This patch finally enables the use of complex filters through opcodes
and LUXI.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoquery: Add support for filters
Michael Hanselmann [Mon, 28 Feb 2011 11:22:50 +0000 (12:22 +0100)]
query: Add support for filters

This patch adds a “compiler” for query filters, converting them to a
callable function used while preparing the query result. In addition, a
hints call allows some analysis to be done on the query (e.g. referenced
names), making data collection more efficient.

The depth of filters is limited to avoid exceeding the runtime's maximum
recursion depth.

More operators and other improvements can be implemented using this
base. Extensive unittests are provided.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd query field flags
Michael Hanselmann [Fri, 25 Feb 2011 14:27:32 +0000 (15:27 +0100)]
Add query field flags

Some fields (e.g. “name”) should be treated specially when comparing for
equality. Hypervisor names should use normal rules, but for node names,
“node2” should be equivalent with “node2.example.com”.

To make these differences, a new field for flags is added to the query
fields. It is not added to ”objects.QueryFieldDefinition” (the first
item) as it would be exported to clients, something not desired for
these internal rules. Instead, an additional field is added.

Other special rules, e.g. “a list of strings” for an instance's
secondary nodes, can be implemented as flags, too.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoqlang: Add new operators
Michael Hanselmann [Fri, 25 Feb 2011 11:42:30 +0000 (12:42 +0100)]
qlang: Add new operators

These are only used programmatically, not exposed to the user.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoNEWS: Replace smartquotes, start lines with uppercase
Michael Hanselmann [Mon, 28 Feb 2011 15:26:00 +0000 (16:26 +0100)]
NEWS: Replace smartquotes, start lines with uppercase

- Sphinx converts ASCII quotes ("") to smartquotes (“”) automatically
- Sentences or list items start with an uppercase letter
- Changed description of non-verbose “gnt-* list” output slightly

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoFix LU processor's GetECId
Michael Hanselmann [Mon, 28 Feb 2011 17:01:43 +0000 (18:01 +0100)]
Fix LU processor's GetECId

The exception was never actually raised.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Adeodato Simo <dato@google.com>

13 years agognt-cluster master-failover: Undrain queue
Michael Hanselmann [Mon, 28 Feb 2011 15:15:09 +0000 (16:15 +0100)]
gnt-cluster master-failover: Undrain queue

- Move functions for drain status (tracked via file) from jqueue to jstore
- Undrain queue on master failover if necessary
- Add QA test

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoUpdate NEWS and release 2.4.0 rc3 v2.4.0rc3
Iustin Pop [Mon, 28 Feb 2011 14:12:14 +0000 (15:12 +0100)]
Update NEWS and release 2.4.0 rc3

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMerge branch 'devel-2.4' into stable-2.4
Iustin Pop [Mon, 28 Feb 2011 13:30:45 +0000 (14:30 +0100)]
Merge branch 'devel-2.4' into stable-2.4

* devel-2.4:
  1-char comment typo fix
  Expand some acronyms, add to glossary
  query_unittest: Fix argument to set()

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoFix potential data-loss bug in disk wipe routines
Iustin Pop [Mon, 28 Feb 2011 10:06:14 +0000 (11:06 +0100)]
Fix potential data-loss bug in disk wipe routines

For the 2.4 release, we only add the missing RPC calls. However, this
needs to be fixed properly, by preventing usage of mis-configured
disks.

Also add a bit more logging so that it's directly clear on which node
the wipe is being done.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoQuery: Add additional test to node.powered for OOB handling
René Nussbaumer [Fri, 25 Feb 2011 13:42:19 +0000 (14:42 +0100)]
Query: Add additional test to node.powered for OOB handling

This patch covers the testing of _GetNodePower of query.py not only for
unavailable but also for OOB support and returning the right
node.powered.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years ago1-char comment typo fix
Stephen Shirley [Fri, 25 Feb 2011 15:02:14 +0000 (16:02 +0100)]
1-char comment typo fix

Signed-off-by: Stephen Shirley <diamond@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agognt-* list-fields: Show field description
Michael Hanselmann [Fri, 25 Feb 2011 13:13:16 +0000 (14:13 +0100)]
gnt-* list-fields: Show field description

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agognt-instance reboot start instance if not yet started
René Nussbaumer [Thu, 24 Feb 2011 13:32:21 +0000 (14:32 +0100)]
gnt-instance reboot start instance if not yet started

This patch starts the instance when gnt-instance reboot is invoked on a
instance already stopped.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoUpdate the DD of OOB with gnt-cluster epo
René Nussbaumer [Tue, 15 Feb 2011 10:16:19 +0000 (11:16 +0100)]
Update the DD of OOB with gnt-cluster epo

This command came up in a local discussion about how much logic we
should put into gnt-node power off. We decided to go with a separate
convenience command which takes care of all the steps through the
procedures to turn down the cluster into a state suitable for a shutdown
of the underlying machine.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoutils: Export NiceSortKey function
Michael Hanselmann [Thu, 24 Feb 2011 18:20:13 +0000 (19:20 +0100)]
utils: Export NiceSortKey function

The ability to split a string into a list of strings and integers can be
handy elsewhere and is necessary for sorting query results by names.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoExpand some acronyms, add to glossary
Stephen Shirley [Thu, 24 Feb 2011 15:19:07 +0000 (16:19 +0100)]
Expand some acronyms, add to glossary

Signed-off-by: Stephen Shirley <diamond@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoFix test output splattering
René Nussbaumer [Thu, 24 Feb 2011 13:51:13 +0000 (14:51 +0100)]
Fix test output splattering

Instead of hardcode to ToStdout in the helper class, we should use
a user provided feedback function. In unittests this is a noop.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoGenerate query fields in man pages
Michael Hanselmann [Thu, 24 Feb 2011 11:58:52 +0000 (12:58 +0100)]
Generate query fields in man pages

This patch replaces the hand-written lists of fields, sometimes
incomplete, wrong or inconsistent, with generated ones. What's not very
nice yet is the representation for numbered lists (“nic.ip/0: IP address
of 1st network interface”, “nic.ip/1: IP address of 2nd network
interface”, etc.), but some kind of grouping can be done later.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd script to generate query fields documentation
Michael Hanselmann [Wed, 23 Feb 2011 17:05:22 +0000 (18:05 +0100)]
Add script to generate query fields documentation

- All lines matching "@QUERY_FIELDS_${resource}@" in the input will be
  replaced with a definition list describing the fields for $resource
- The core code is kept in the Sphinx extension, so that it could be
  used from there, too

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd query field descriptions
Michael Hanselmann [Wed, 23 Feb 2011 13:58:47 +0000 (14:58 +0100)]
Add query field descriptions

- Make “doc” parameter to MakeField non-optional
- Add descriptions for all fields

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoquery: Add support for field description
Michael Hanselmann [Tue, 22 Feb 2011 14:18:48 +0000 (15:18 +0100)]
query: Add support for field description

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoAdd function to format ordinals
Michael Hanselmann [Tue, 22 Feb 2011 17:58:38 +0000 (18:58 +0100)]
Add function to format ordinals

See [1] for the rules.

[1] http://en.wikipedia.org/wiki/Names_of_numbers_in_English#Ordinal_numbers

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoIntroducing gnt-cluster epo
René Nussbaumer [Wed, 16 Feb 2011 10:05:56 +0000 (11:05 +0100)]
Introducing gnt-cluster epo

This is a convenience command to do an automated EPO in the possible limits of
Ganeti.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoMove OOB_TIMEOUT_OPT to cli.py
René Nussbaumer [Wed, 16 Feb 2011 12:09:00 +0000 (13:09 +0100)]
Move OOB_TIMEOUT_OPT to cli.py

OOB commands where we need to be able to specify the timeout are
enhancing over the border of just gnt-node so we move it into cli.py
for easy reuse in other cli parts.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoepydoc.conf: Avoid newlines, rebuild if necessary
Michael Hanselmann [Wed, 23 Feb 2011 16:13:38 +0000 (17:13 +0100)]
epydoc.conf: Avoid newlines, rebuild if necessary

Using $(strip …) ensures there won't be any newlines in the value.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoAdd constants for node roles
Michael Hanselmann [Wed, 23 Feb 2011 17:04:48 +0000 (18:04 +0100)]
Add constants for node roles

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoAdd constants for instance status
Michael Hanselmann [Wed, 23 Feb 2011 13:39:08 +0000 (14:39 +0100)]
Add constants for instance status

They've been hardcoded for too long.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMerge remote branch 'devel-2.4'
René Nussbaumer [Wed, 23 Feb 2011 13:29:00 +0000 (14:29 +0100)]
Merge remote branch 'devel-2.4'

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoquery_unittest: Fix argument to set()
René Nussbaumer [Wed, 23 Feb 2011 13:16:12 +0000 (14:16 +0100)]
query_unittest: Fix argument to set()

Commit e431074f introduced an uncatched bug. This patch fixes this. The
set is expecting a list or iteratable to work on, so it splitted the
provided instance name into a set of characters. This caused the
exp_status never been set and therefore not catched in one assert rule
further below who checks that every status was tested.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoquery: Use aliases for legacy instance NIC fields
Michael Hanselmann [Tue, 22 Feb 2011 18:02:28 +0000 (19:02 +0100)]
query: Use aliases for legacy instance NIC fields

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMerge branch 'devel-2.4'
Michael Hanselmann [Wed, 23 Feb 2011 12:25:09 +0000 (13:25 +0100)]
Merge branch 'devel-2.4'

* devel-2.4:
  Fix title of query field containing instance name

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoAdd unittest for cli.FormatResultError
Michael Hanselmann [Tue, 22 Feb 2011 17:00:56 +0000 (18:00 +0100)]
Add unittest for cli.FormatResultError

Also make the parameter for verbosity mandatory.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoFix title of query field containing instance name
Michael Hanselmann [Tue, 22 Feb 2011 17:17:57 +0000 (18:17 +0100)]
Fix title of query field containing instance name

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agocmdlib: Fix pylint error
Michael Hanselmann [Tue, 22 Feb 2011 17:14:22 +0000 (18:14 +0100)]
cmdlib: Fix pylint error

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agocmdlib: Use filters internally for queries
Michael Hanselmann [Tue, 15 Feb 2011 18:52:25 +0000 (19:52 +0100)]
cmdlib: Use filters internally for queries

This is in preparation for implementing real query filters.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMerge branch 'devel-2.4'
Michael Hanselmann [Tue, 22 Feb 2011 15:36:44 +0000 (16:36 +0100)]
Merge branch 'devel-2.4'

* devel-2.4: (60 commits)
  Update news and bump version for 2.4.0 rc2
  Fix pylint warnings
  TestRapiInstanceRename use instance name
  Change the list formatting to a 'special' chars
  Add support for merging node groups
  Add option to rename groups on conflict
  Fix minor docstring typo
  Add QA rapi test for instance reinstall
  RAPI: remove required parameters for reinstall
  Fix HV/OS parameter validation on non-vm nodes
  NodeQuery: mark live fields as UNAVAIL for non-vm_capable nodes
  NodeQuery: don't query non-vm_capable nodes
  Fix LUClusterRepairDiskSizes and rpc result usage
  Fix RPC mismatch in blockdev_getsize[s]
  Remove superfluous redundant requirement
  Don't remove master_candidate flag from merged nodes
  Use a consistent ECID base
  listrunner: convert from getopt to optparse
  listrunner: fix agent usage
  Revert "Disable the cluster-merge tool for the moment"
  ...

Conflicts:
NEWS: Trivial
lib/cli.py: Dropped _RSTATUS_TO_TEXT from master and used
    RSS_DESCRIPTION from devel-2.4 instead, adjusted users accordingly

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoAdd/rename label for LUXI in documentation
Michael Hanselmann [Mon, 21 Feb 2011 15:51:42 +0000 (16:51 +0100)]
Add/rename label for LUXI in documentation

The HTTP server design doc will refer to the LUXI protocol,
so conflicts need to be avoided.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoUpdate news and bump version for 2.4.0 rc2 v2.4.0rc2
Iustin Pop [Mon, 21 Feb 2011 10:28:00 +0000 (11:28 +0100)]
Update news and bump version for 2.4.0 rc2

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>

13 years agoMerge branch 'devel-2.4' into stable-2.4
Iustin Pop [Mon, 21 Feb 2011 09:36:10 +0000 (10:36 +0100)]
Merge branch 'devel-2.4' into stable-2.4

* devel-2.4: (23 commits)
  Fix pylint warnings
  Change the list formatting to a 'special' chars
  Add support for merging node groups
  Add option to rename groups on conflict
  Fix minor docstring typo
  Fix HV/OS parameter validation on non-vm nodes
  NodeQuery: mark live fields as UNAVAIL for non-vm_capable nodes
  NodeQuery: don't query non-vm_capable nodes
  Remove superfluous redundant requirement
  Don't remove master_candidate flag from merged nodes
  Use a consistent ECID base
  listrunner: convert from getopt to optparse
  listrunner: fix agent usage
  Revert "Disable the cluster-merge tool for the moment"
  Fix cluster-merging by not stopping noded
  Fix error msg for instances on offline nodes
  Minor reordering to match param order
  cluster verify and instance disks on offline nodes
  Cluster verify and N+1 warnings for offline nodes
  Handle gnt-instance shutdown --all for empty clusters
  Use gnt-node add --force-join to add foreign nodes
  Add --force-join option to gnt-node add
  Fix iterating over node groups

Of the above commits present in the devel-2.4 branch, only the “Add
--force-join option to gnt-node add” is a potential issue, but this
has been QA-ed successfully. The other fixes are split in three
groups:

- non-core changes (cluster-merge, listrunner)
- trivial fixes (docstrings, etc.)
- bugs that we want fixed

As such, instead of cherry-picking only individual patches, I propose
that we unify stable and devel 2.4 and make a new RC out of the
result.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>