ganeti-local
13 years agoAnother fix for LUClusterVerifyDisks
Iustin Pop [Thu, 20 Jan 2011 16:55:35 +0000 (17:55 +0100)]
Another fix for LUClusterVerifyDisks

The LVM queries should only be done for vm_capable nodes. In order to
do this, we also add a new ConfigWriter method to abstract that query.

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

13 years agoQA: also run gnt-cluster verify-disks
Iustin Pop [Thu, 20 Jan 2011 15:04:00 +0000 (16:04 +0100)]
QA: also run gnt-cluster verify-disks

The bug recently reported by Apollon Oikonomopoulos was missed because
we don't test this command at all.

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

13 years agoFix disk adoption breakage
Apollon Oikonomopoulos [Tue, 18 Jan 2011 10:30:12 +0000 (12:30 +0200)]
Fix disk adoption breakage

Disk adoption is currently broken by 84d7e26b, which added multiple LVM
volume group support. This patch fixes the calls to rpc.call_vg_list,
which are multi-node calls but were handled as single-node calls in
84d7e26b.

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 agoFix typo in query2 design document
Michael Hanselmann [Thu, 20 Jan 2011 14:58:41 +0000 (15:58 +0100)]
Fix typo in query2 design document

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

13 years agoImprove documentation for QRFS_UNAVAIL
Iustin Pop [Thu, 20 Jan 2011 11:31:46 +0000 (12:31 +0100)]
Improve documentation for QRFS_UNAVAIL

IMHO this should have been named QRFS_NA or QRFS_UNSUPPORTED, but
UNAVAIL is good enough.

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

13 years agolvmstrap: add PV-on-partition support
Iustin Pop [Wed, 19 Jan 2011 16:52:10 +0000 (17:52 +0100)]
lvmstrap: add PV-on-partition support

This is a not-so-nice change, adding support for partitions to be used
as PVs.

The not-nice part is that partitions live in a separate place in
sysfs, whereas in dev they live at the same level as disks. We
workaround this via a new SysfsName function that computes the correct
sysfs base path for a given disk.

The other rule is that if a disk is not in use, we ignore its
partitions completely, as the disk will be re-partitioned anyway. Only
if the disk is busy, we consider each of its partitions for the
free/busy list.

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

13 years agolvmstrap: abstract a little the sysfs paths
Iustin Pop [Wed, 19 Jan 2011 16:49:26 +0000 (17:49 +0100)]
lvmstrap: abstract a little the sysfs paths

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

13 years agolvmstrap: ignore small-sized partitions
Iustin Pop [Wed, 19 Jan 2011 16:11:40 +0000 (17:11 +0100)]
lvmstrap: ignore small-sized partitions

This patch changes lvmstrap to ignore “small” partitions. Currently
extended partitions are reported as unused as with a size of 1024
(bytes), and this confuses lvmstrap. Since a very small partition
won't help anyway (below hundred of PE size is not helpful), let's
restrict it to 1GB.

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

13 years agolvmstrap: add explicit test for swap backends
Iustin Pop [Wed, 19 Jan 2011 13:49:50 +0000 (14:49 +0100)]
lvmstrap: add explicit test for swap backends

Similar to mounted filesystems, recent kernel/userland report swap
backends:

    root@node4:~# fuser -avm /dev/sda6
                         USER        PID ACCESS COMMAND
    /dev/sda6:           root     kernel swap  /dev/sda6

But old ones not:

    node1# fuser -avm /dev/sda6
                         USER        PID ACCESS COMMAND
    /dev/sda6:

So we add an explicit test for swap backends using /proc/swaps.

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

13 years agolvmstrap: add an explicit test for mounted devices
Iustin Pop [Wed, 19 Jan 2011 13:46:44 +0000 (14:46 +0100)]
lvmstrap: add an explicit test for mounted devices

Recent kernels/userland report a mounted filesystem as follows:

    root@node4:~# fuser -avm /dev/sda5
                         USER        PID ACCESS COMMAND
    /dev/sda5:           root     kernel mount /srv/ganeti

But old ones do not:

    node1# fuser -avm /dev/sda5
                         USER        PID ACCESS COMMAND
    /dev/sda5:

So in order to cover both, we add an explicit test for this. We
already compute the device numbers of all mounted filesystems, so it
is a trivial addition (GetMountInfo() is cheap, so we don't need to
cache it).

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

13 years agolvmstrap: add more excluded FS types
Iustin Pop [Wed, 19 Jan 2011 11:10:36 +0000 (12:10 +0100)]
lvmstrap: add more excluded FS types

Also moves the list of excluded types to the top level and make it a
frozenset.

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

13 years agolvmstrap: fix very old contact information
Iustin Pop [Wed, 19 Jan 2011 17:02:55 +0000 (18:02 +0100)]
lvmstrap: fix very old contact information

A memory from the past: this was left over from before the 1.2 release
or so…

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

13 years agoInstance query: replace duplicates with aliases
Iustin Pop [Wed, 19 Jan 2011 09:17:52 +0000 (10:17 +0100)]
Instance query: replace duplicates with aliases

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

13 years agoquery: Add alias support in _PrepareFieldList
Iustin Pop [Wed, 19 Jan 2011 09:16:10 +0000 (10:16 +0100)]
query: Add alias support in _PrepareFieldList

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

13 years agoFix disk count check in LUSetInstanceParams
Apollon Oikonomopoulos [Tue, 18 Jan 2011 10:31:58 +0000 (12:31 +0200)]
Fix disk count check in LUSetInstanceParams

LUSetInstanceParams checked instance.nics (and not instance.disks)
against constants.MAX_DISKS.

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

13 years agoDocument iallocator change (alloc_policy)
Balazs Lecz [Wed, 19 Jan 2011 14:29:05 +0000 (14:29 +0000)]
Document iallocator change (alloc_policy)

Signed-off-by: Balazs Lecz <leczb@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoAdd check-news to EXTRA_DIST
Michael Hanselmann [Tue, 18 Jan 2011 16:58:33 +0000 (17:58 +0100)]
Add check-news to EXTRA_DIST

This was missing from commit 7385c51d.

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

13 years agoAdd script checking release dates in NEWS
Michael Hanselmann [Tue, 18 Jan 2011 16:26:26 +0000 (17:26 +0100)]
Add script checking release dates in NEWS

This will detect human errors when setting a release date in NEWS.

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

13 years agoquery: use the actual types for BE/HV parameters
Iustin Pop [Sun, 16 Jan 2011 15:57:53 +0000 (16:57 +0100)]
query: use the actual types for BE/HV parameters

This patch exposes the VTYPE kind of BE/HV parameters, instead of
returning QFT_OTHER. The current situation makes a query like:

    gnt-instance list -o name,be/memory,oper_ram

very strange looking.

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

13 years agoquery: return UNAVAIL for "wrong" HV parameters
Iustin Pop [Sun, 16 Jan 2011 16:28:33 +0000 (17:28 +0100)]
query: return UNAVAIL for "wrong" HV parameters

If a HV parameter is required that does not apply for an instance,
currently the code returns None. This is bad, as it means we cannot
switch to the actual HV parameter types and validate correctly this
field.

This patch changes it so that in this case we return QRFS_UNAVAIL;
ideally we would use a NOT_APPROPRIATE or similar field, but UNAVAIL is
good enough (the call cannot fail in another way).

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

13 years agoquery: change (debug-mode) field validation errors
Iustin Pop [Sun, 16 Jan 2011 16:22:37 +0000 (17:22 +0100)]
query: change (debug-mode) field validation errors

Currently, the single assert just checks that the entire row is
consistent (true/false), and dumps the row and field definitions as an
accompanying message. This makes it very hard to understand what failed.

This patch changes this validation to show descriptive messages, which
makes it much faster in diagnosing invalid result.

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

13 years agoRename a few instance field titles
Iustin Pop [Sun, 16 Jan 2011 15:23:45 +0000 (16:23 +0100)]
Rename a few instance field titles

The conversion to querylib introduced unique field titles, which however
did an inconsistent rename of the instance vcpus/memory fields.

This patch makes both BE_MEMORY and _VCPUS be named with prefix “Config”
(which before was “Configured_”), and drops the “Runtime” (note no
underscore) prefix on the oper_ ones.

Rationale: for numeric fields, the width of the title defines the width
of the columns, as the numbers are usually small. Hence these columns
(more likely used than the BE ones) would be very wide, leading to a
not-so-nice display. I happened upon this when my terminals didn't
manage to fit a gnt-instance list anymore.

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

13 years agoquery: Change internal result computation
Iustin Pop [Sun, 16 Jan 2011 15:02:25 +0000 (16:02 +0100)]
query: Change internal result computation

While looking at the query library, I realized that while we have five
field statuses, making this a 5-dimensional space, four of them are
shrunk to a single possible value (None). Hence it should be possible to
convert this into a single value space plus extra 4 special constants.

This patch implements this, making (IMHO) the return value of normal
functions much simpler: you simply return the desired value, instead of
(QRFS_NORMAL, value); for the special results, you simply return
_FS_UNAVAIL, instead of (QRFS_UNAVAIL, None). This I believe does
simplify the code.

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

13 years agoImport QRFS_* and QFT_* in query.py
Iustin Pop [Sun, 16 Jan 2011 14:17:40 +0000 (15:17 +0100)]
Import QRFS_* and QFT_* in query.py

Currently, the QRFT/QFT constants are used with the module (e.g.
constants.QRFS_NORMAL) in the query library. Given that there are 176
uses of these constants in a module that has roughly ~1200 lines in
total (including whitespace), it makes sense to import these directly to
improve readability.

This patch does this and (IMHO) it does indeed make the code more to the
point; the entire query library is about queries, so using these
constants directly doesn't cause any misunderstandings.

Note: the epydoc links are not changed, since we want the generated docs
to point to the right place.

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

13 years agoBuild epydoc's module list from Makefile
Michael Hanselmann [Tue, 18 Jan 2011 12:43:52 +0000 (13:43 +0100)]
Build epydoc's module list from Makefile

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

13 years agoKVM: don't fail removing non-existing nic path
Guido Trotter [Mon, 17 Jan 2011 15:50:03 +0000 (15:50 +0000)]
KVM: don't fail removing non-existing nic path

This shouldn't normally happen, but if it does no need to fail.

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

13 years agoKVM: Perform network configuration in Ganeti
Apollon Oikonomopoulos [Mon, 17 Jan 2011 18:42:51 +0000 (20:42 +0200)]
KVM: Perform network configuration in Ganeti

This patch introduces network configuration for KVM in Ganeti.

There are three problems with having KVM perform network configuration via ifup
scripts:
  a) Ganeti never gets to know the tap interface that is associated with an
     instance's NIC
  b) Migration of routed instances will cause network problems because the
     incoming KVM side configures the network as soon as it is spawned and not
     as soon as the migration finishes. This means that all routing
     configuration will be present in both, primary and secondary, nodes at the
     same time, possibly causing network disruption during the migration.
  c) We never get to know if the network configuration succeeded or not.

This patch moves network configuration from KVM to Ganeti, using KVM's ability
to receive already open tap devices as file descriptors.

_WriteNetScript is removed from hv_kvm.py, together with its unit tests.

Minor modifications are made to _ExecKVMRuntime to handle tap device
initialization. NIC <-> tap associations are stored under a new directory,
_ROOT_DIR/nic in a file-per-nic fashion.

The end-user semantics remain the same: The user can override the network
configuration by providing _KVM_NET_SCRIPT. If this is not present or
executable, the default constants.KVM_IFUP script is run.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

13 years agoShip default kvm-ifup script
Apollon Oikonomopoulos [Mon, 17 Jan 2011 10:50:05 +0000 (12:50 +0200)]
Ship default kvm-ifup script

In order to retain backwards compatibility, we ship the shell script previously
generated by _WriteNetScript as a stand-alone script under PKGLIBDIR.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

13 years agoKVM: Add auxiliary functions to handle tap devices
Apollon Oikonomopoulos [Mon, 17 Jan 2011 18:41:34 +0000 (20:41 +0200)]
KVM: Add auxiliary functions to handle tap devices

Add two new functions, _OpenTap and _ProbeTapVnetHdr, to
hypervisors.hv_kvm.

_ProbeTapVnetHdr checks if the host kernel supports the virtio net header
(IFF_VNET_HDR) feature. This feature allows KVM to ask the the host kernel to
perform checksumming and segmentation offload of the data passing through a
guest's virtio NIC, using a special header[1] prepended to data sent through
the tap interface. A qemu-kvm version later than 0.12 is required for this
feature to work.

_OpenTap opens a new tap device suitable for use with qemu-kvm's "-net
tap,fd=n" option. It also enables vnet_hdr support if requested and safe to do
so.

[1] struct virtio_net_hdr in include/linux/virtio_net.h

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

13 years agoepydoc: specify files in tools/
Guido Trotter [Tue, 18 Jan 2011 11:54:56 +0000 (11:54 +0000)]
epydoc: specify files in tools/

This way we can add there non-python scripts

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

13 years agoRemove hard-coded OP_ID definitions
Iustin Pop [Sat, 15 Jan 2011 14:32:54 +0000 (15:32 +0100)]
Remove hard-coded OP_ID definitions

The removal requires adding a few pylint ignores, as it cannot know that
OP_ID will be defined at runtime.

Also switch the asserts to check for non-declaration.

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

13 years agoCheck consistency of the class names and OP_ID
Iustin Pop [Sat, 15 Jan 2011 14:25:24 +0000 (15:25 +0100)]
Check consistency of the class names and OP_ID

As the class names should be now consistent with the OP_IDs, we add a
check for wrongly-defined OP_IDs.

However, the future removal of the hand-coded OP_IDs will render this
obsolete, so this check is introduced just to make sure that the
previous renaming patches did the right job, and it will then be
removed.

The consistency checks require renaming the test opcodes, which were
using arbitrary names, depending on test author. They are now all
standardized on OpTest (local scope).

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

13 years agoRename OpTestJobqueue and LUTestJobqueue
Iustin Pop [Sat, 15 Jan 2011 12:07:20 +0000 (13:07 +0100)]
Rename OpTestJobqueue and LUTestJobqueue

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

13 years agoRename OpAddTags and LUAddTags
Iustin Pop [Sat, 15 Jan 2011 12:06:57 +0000 (13:06 +0100)]
Rename OpAddTags and LUAddTags

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

13 years agoRename OpSearchTags and LUSearchTags
Iustin Pop [Sat, 15 Jan 2011 12:06:57 +0000 (13:06 +0100)]
Rename OpSearchTags and LUSearchTags

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

13 years agoRename OpGetTags and LUGetTags
Iustin Pop [Sat, 15 Jan 2011 12:06:57 +0000 (13:06 +0100)]
Rename OpGetTags and LUGetTags

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

13 years agoRename OpDelTags and LUDelTags
Iustin Pop [Sat, 15 Jan 2011 12:06:57 +0000 (13:06 +0100)]
Rename OpDelTags and LUDelTags

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

13 years agoRename OpDiagnoseOS and LUDiagnoseOS
Iustin Pop [Sat, 15 Jan 2011 12:06:57 +0000 (13:06 +0100)]
Rename OpDiagnoseOS and LUDiagnoseOS

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

13 years agoRename OpSetNodeParams and LUSetNodeParams
Iustin Pop [Sat, 15 Jan 2011 12:06:57 +0000 (13:06 +0100)]
Rename OpSetNodeParams and LUSetNodeParams

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

13 years agoRename OpRemoveNode and LURemoveNode
Iustin Pop [Sat, 15 Jan 2011 12:06:57 +0000 (13:06 +0100)]
Rename OpRemoveNode and LURemoveNode

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

13 years agoRename OpQueryNodeStorage and LUQueryNodeStorage
Iustin Pop [Sat, 15 Jan 2011 12:06:56 +0000 (13:06 +0100)]
Rename OpQueryNodeStorage and LUQueryNodeStorage

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

13 years agoRename OpQueryNodeVolumes and LUQueryNodeVolumes
Iustin Pop [Sat, 15 Jan 2011 12:06:56 +0000 (13:06 +0100)]
Rename OpQueryNodeVolumes and LUQueryNodeVolumes

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

13 years agoRename OpQueryNodes and LUQueryNodes
Iustin Pop [Sat, 15 Jan 2011 12:06:51 +0000 (13:06 +0100)]
Rename OpQueryNodes and LUQueryNodes

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

13 years agoRename OpPowercycleNode and LUPowercycleNode
Iustin Pop [Sat, 15 Jan 2011 12:06:18 +0000 (13:06 +0100)]
Rename OpPowercycleNode and LUPowercycleNode

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

13 years agoRename OpModifyNodeStorage and LUModifyNodeStorage
Iustin Pop [Sat, 15 Jan 2011 12:06:17 +0000 (13:06 +0100)]
Rename OpModifyNodeStorage and LUModifyNodeStorage

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

13 years agoRename OpMigrateNode and LUMigrateNode
Iustin Pop [Sat, 15 Jan 2011 12:06:17 +0000 (13:06 +0100)]
Rename OpMigrateNode and LUMigrateNode

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

13 years agoRename OpNodeEvacuationStrategy and LUNodeEvacuationStrategy
Iustin Pop [Sat, 15 Jan 2011 12:06:17 +0000 (13:06 +0100)]
Rename OpNodeEvacuationStrategy and LUNodeEvacuationStrategy

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

13 years agoRename OpAddNode and LUAddNode
Iustin Pop [Sat, 15 Jan 2011 12:05:50 +0000 (13:05 +0100)]
Rename OpAddNode and LUAddNode

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

13 years agoRename OpStartupInstance and LUStartupInstance
Iustin Pop [Sat, 15 Jan 2011 12:05:50 +0000 (13:05 +0100)]
Rename OpStartupInstance and LUStartupInstance

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

13 years agoRename OpShutdownInstance and LUShutdownInstance
Iustin Pop [Sat, 15 Jan 2011 12:05:50 +0000 (13:05 +0100)]
Rename OpShutdownInstance and LUShutdownInstance

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

13 years agoRename OpSetInstanceParams and LUSetInstanceParams
Iustin Pop [Sat, 15 Jan 2011 12:05:50 +0000 (13:05 +0100)]
Rename OpSetInstanceParams and LUSetInstanceParams

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

13 years agoRename OpReplaceDisks and LUReplaceDisks
Iustin Pop [Sat, 15 Jan 2011 12:05:49 +0000 (13:05 +0100)]
Rename OpReplaceDisks and LUReplaceDisks

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

13 years agoRename OpRenameInstance and LURenameInstance
Iustin Pop [Sat, 15 Jan 2011 11:57:46 +0000 (12:57 +0100)]
Rename OpRenameInstance and LURenameInstance

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

13 years agoRename OpRemoveInstance and LURemoveInstance
Iustin Pop [Sat, 15 Jan 2011 11:57:46 +0000 (12:57 +0100)]
Rename OpRemoveInstance and LURemoveInstance

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

13 years agoRename OpReinstallInstance and LUReinstallInstance
Iustin Pop [Sat, 15 Jan 2011 11:57:46 +0000 (12:57 +0100)]
Rename OpReinstallInstance and LUReinstallInstance

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

13 years agoRename OpRecreateInstanceDisks and LURecreateInstanceDisks
Iustin Pop [Sat, 15 Jan 2011 11:57:46 +0000 (12:57 +0100)]
Rename OpRecreateInstanceDisks and LURecreateInstanceDisks

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

13 years agoRename OpRebootInstance and LURebootInstance
Iustin Pop [Sat, 15 Jan 2011 11:57:45 +0000 (12:57 +0100)]
Rename OpRebootInstance and LURebootInstance

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

13 years agoRename OpQueryInstanceData and LUQueryInstanceData
Iustin Pop [Sat, 15 Jan 2011 11:57:45 +0000 (12:57 +0100)]
Rename OpQueryInstanceData and LUQueryInstanceData

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

13 years agoRename OpQueryInstances and LUQueryInstances
Iustin Pop [Sat, 15 Jan 2011 11:57:45 +0000 (12:57 +0100)]
Rename OpQueryInstances and LUQueryInstances

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

13 years agoRename OpMoveInstance and LUMoveInstance
Iustin Pop [Sat, 15 Jan 2011 11:57:04 +0000 (12:57 +0100)]
Rename OpMoveInstance and LUMoveInstance

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

13 years agoRename OpMigrateInstance and LUMigrateInstance
Iustin Pop [Sat, 15 Jan 2011 11:57:04 +0000 (12:57 +0100)]
Rename OpMigrateInstance and LUMigrateInstance

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

13 years agoRename OpGrowDisk and LUGrowDisk
Iustin Pop [Sat, 15 Jan 2011 11:57:04 +0000 (12:57 +0100)]
Rename OpGrowDisk and LUGrowDisk

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

13 years agoRename OpFailoverInstance and LUFailoverInstance
Iustin Pop [Sat, 15 Jan 2011 11:56:18 +0000 (12:56 +0100)]
Rename OpFailoverInstance and LUFailoverInstance

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

13 years agoRename OpDeactivateInstanceDisks and LUDeactivateInstanceDisks
Iustin Pop [Sat, 15 Jan 2011 11:56:18 +0000 (12:56 +0100)]
Rename OpDeactivateInstanceDisks and LUDeactivateInstanceDisks

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

13 years agoRename OpCreateInstance and LUCreateInstance
Iustin Pop [Sat, 15 Jan 2011 11:56:18 +0000 (12:56 +0100)]
Rename OpCreateInstance and LUCreateInstance

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

13 years agoRename OpConnectConsole and LUConnectConsole
Iustin Pop [Sat, 15 Jan 2011 11:56:18 +0000 (12:56 +0100)]
Rename OpConnectConsole and LUConnectConsole

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

13 years agoRename OpActivateInstanceDisks and LUActivateInstanceDisks
Iustin Pop [Sat, 15 Jan 2011 11:56:10 +0000 (12:56 +0100)]
Rename OpActivateInstanceDisks and LUActivateInstanceDisks

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

13 years agoRename OpSetGroupParams and LUSetGroupParams
Iustin Pop [Sat, 15 Jan 2011 11:56:10 +0000 (12:56 +0100)]
Rename OpSetGroupParams and LUSetGroupParams

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

13 years agoRename OpRenameGroup and LURenameGroup
Iustin Pop [Sat, 15 Jan 2011 11:56:10 +0000 (12:56 +0100)]
Rename OpRenameGroup and LURenameGroup

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

13 years agoRename OpRemoveGroup and LURemoveGroup
Iustin Pop [Sat, 15 Jan 2011 11:56:09 +0000 (12:56 +0100)]
Rename OpRemoveGroup and LURemoveGroup

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

13 years agoRename OpQueryGroups and LUQueryGroups
Iustin Pop [Sat, 15 Jan 2011 11:56:09 +0000 (12:56 +0100)]
Rename OpQueryGroups and LUQueryGroups

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

13 years agoRename OpAssignGroupNodes and LUAssignGroupNodes
Iustin Pop [Sat, 15 Jan 2011 11:56:06 +0000 (12:56 +0100)]
Rename OpAssignGroupNodes and LUAssignGroupNodes

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

13 years agoRename OpAddGroup and LUAddGroup
Iustin Pop [Sat, 15 Jan 2011 11:56:05 +0000 (12:56 +0100)]
Rename OpAddGroup and LUAddGroup

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

13 years agoRename OpVerifyDisks and LUVerifyDisks
Iustin Pop [Sat, 15 Jan 2011 11:56:05 +0000 (12:56 +0100)]
Rename OpVerifyDisks and LUVerifyDisks

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

13 years agoRename OpVerifyCluster and LUVerifyCluster
Iustin Pop [Sat, 15 Jan 2011 11:56:01 +0000 (12:56 +0100)]
Rename OpVerifyCluster and LUVerifyCluster

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

13 years agoRename OpSetClusterParams and LUSetClusterParams
Iustin Pop [Sat, 15 Jan 2011 11:56:01 +0000 (12:56 +0100)]
Rename OpSetClusterParams and LUSetClusterParams

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

13 years agoRename OpRepairDiskSizes and LURepairDiskSizes
Iustin Pop [Sat, 15 Jan 2011 11:56:00 +0000 (12:56 +0100)]
Rename OpRepairDiskSizes and LURepairDiskSizes

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

13 years agoRename OpRenameCluster and LURenameCluster
Iustin Pop [Sat, 15 Jan 2011 11:55:56 +0000 (12:55 +0100)]
Rename OpRenameCluster and LURenameCluster

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

13 years agoRename OpRedistributeConfig and LURedistributeConfig
Iustin Pop [Sat, 15 Jan 2011 11:55:56 +0000 (12:55 +0100)]
Rename OpRedistributeConfig and LURedistributeConfig

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

13 years agoRename OpQueryClusterInfo and LUQueryClusterInfo
Iustin Pop [Sat, 15 Jan 2011 11:55:52 +0000 (12:55 +0100)]
Rename OpQueryClusterInfo and LUQueryClusterInfo

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

13 years agoRename OpPostInitCluster and LUPostInitCluster
Iustin Pop [Sat, 15 Jan 2011 11:55:42 +0000 (12:55 +0100)]
Rename OpPostInitCluster and LUPostInitCluster

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

13 years agoRename OpDestroyCluster and LUDestroyCluster
Iustin Pop [Sat, 15 Jan 2011 11:55:42 +0000 (12:55 +0100)]
Rename OpDestroyCluster and LUDestroyCluster

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

13 years agoRename OpQueryConfigValues and LUQueryConfigValues
Iustin Pop [Sat, 15 Jan 2011 11:55:42 +0000 (12:55 +0100)]
Rename OpQueryConfigValues and LUQueryConfigValues

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

13 years agoRename OpRemoveExport and LURemoveExport
Iustin Pop [Sat, 15 Jan 2011 11:55:37 +0000 (12:55 +0100)]
Rename OpRemoveExport and LURemoveExport

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

13 years agoRename OpQueryExports and LUQueryExports
Iustin Pop [Sat, 15 Jan 2011 11:55:37 +0000 (12:55 +0100)]
Rename OpQueryExports and LUQueryExports

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

13 years agoRename OpPrepareExport and LUPrepareExport
Iustin Pop [Sat, 15 Jan 2011 11:55:30 +0000 (12:55 +0100)]
Rename OpPrepareExport and LUPrepareExport

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

13 years agoRename OpExportInstance and LUExportInstance
Iustin Pop [Sat, 15 Jan 2011 11:55:30 +0000 (12:55 +0100)]
Rename OpExportInstance and LUExportInstance

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

13 years agoFix the OP_ID of OpAssignGroupNodes
Iustin Pop [Sat, 15 Jan 2011 10:34:32 +0000 (11:34 +0100)]
Fix the OP_ID of OpAssignGroupNodes

Commit 96276ae added the above opcode, but forgot to update the OP_ID
per our previous mailing list discussions. This patch makes the OP_ID
be consistent with the other IDs (OP_$object_$action).

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

13 years agoFix bug introduced by f5677ab
Iustin Pop [Sat, 15 Jan 2011 13:11:56 +0000 (14:11 +0100)]
Fix bug introduced by f5677ab

Commit f5677ab added the _VerifyOob functionality, but there are two
issues with this function:

- a real bug, as objects.Node doesn't have a 'master' attribute
- a design bug, as we need to verify the OOB programs not only on
  current masters, but on all nodes that can become masters via the
  auto-promote functionality; otherwise, an automated cluster operation
  could cause the cluster to become inconsistent (error in verify)

The Node.master bug didn't appear in QA because it is triggered only
with non-master-candidate nodes, and our QA doesn't test this
combination (and neither other node flags combination).

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
Guido Trotter [Fri, 14 Jan 2011 16:15:32 +0000 (16:15 +0000)]
Merge branch 'devel-2.3' into devel-2.4

* devel-2.3:
  Allow burnin with hidden OSes

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

13 years agoAllow burnin with hidden OSes
Guido Trotter [Fri, 14 Jan 2011 13:56:41 +0000 (13:56 +0000)]
Allow burnin with hidden OSes

burnin is a cluster/testing feature, so it makes sense that a hidden OS
can be used for it.

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

13 years agoBump version for Ganeti 2.4.0~beta1 v2.4.0beta1
Michael Hanselmann [Fri, 14 Jan 2011 11:11:45 +0000 (12:11 +0100)]
Bump version for Ganeti 2.4.0~beta1

Update the version in all necessary places. Update NEWS with release
date.

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

13 years agoUpdate NEWS for Ganeti 2.4
Michael Hanselmann [Fri, 14 Jan 2011 09:58:04 +0000 (10:58 +0100)]
Update NEWS for Ganeti 2.4

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

13 years agoUpdate RPC protocol version for Ganeti 2.4
Michael Hanselmann [Fri, 14 Jan 2011 10:51:04 +0000 (11:51 +0100)]
Update RPC protocol version for Ganeti 2.4

As it's quite easy to forget updating the protocol version (and was
actually forgotten for Ganeti 2.3), it is now derived from the
configuration version (which is equivalent with the Ganeti version). The
protocol version for Ganeti 2.4 will be 2040000.

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

13 years agoSet +x on tools/ganeti-listrunner
Michael Hanselmann [Fri, 14 Jan 2011 09:30:24 +0000 (10:30 +0100)]
Set +x on tools/ganeti-listrunner

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

13 years agoMerge branch 'devel-2.3'
René Nussbaumer [Fri, 14 Jan 2011 09:32:37 +0000 (10:32 +0100)]
Merge branch 'devel-2.3'

Conflicts:
doc/design-2.3.rst
  This was a minor conflict with some rewording of a phrase

lib/client/gnt_instance.py
  Removed _FormatParameterDict function as it was moved to cli.py in
  master branch

Reviewed-by: Michael Hanselmann <hansmi@google.com>

13 years agoquery: Update docstrings
Michael Hanselmann [Wed, 12 Jan 2011 11:54:12 +0000 (12:54 +0100)]
query: Update docstrings

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

13 years agoFix growing of DRBD disks
Iustin Pop [Thu, 13 Jan 2011 15:51:57 +0000 (16:51 +0100)]
Fix growing of DRBD disks

Patch 03941a26 made disk growth VG-aware, but the code has a bug: it
only works for LD_LV disks, and not LD_DRBD. To fix it, we add a
generic function to compute the per-VG growth requirements, and switch
to using that instead of manual build.

Furthermore, since the function _CheckNodesFreeDiskPerVG always takes
its input from this new function or _ComputeDiskSizePerVG, we change
the latter to always return a dict (possibly empty), instead of either
a dict or None. This makes the types more consistent.

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

13 years agoList node parameters in gnt-group list
René Nussbaumer [Wed, 12 Jan 2011 09:50:17 +0000 (10:50 +0100)]
List node parameters in gnt-group list

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

13 years agoList node parameters (if any) in gnt-node info
René Nussbaumer [Wed, 12 Jan 2011 09:28:13 +0000 (10:28 +0100)]
List node parameters (if any) in gnt-node info

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