ganeti-local
13 years agoIntroduced VG-aware disk space checks
Dmitry Chernyak [Thu, 25 Nov 2010 00:14:37 +0000 (03:14 +0300)]
Introduced VG-aware disk space checks

Implemented _CheckNodesFreeDiskPerVG and _ComputeDiskSizePerVG functions
for VG-aware iterations.

Signed-off-by: Dmitry Chernyak <dmi.chernyak@gmail.com>
[iustin@google.com: some style fixes (long lines, etc.)]
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoAdded "vg" argument to the --disk syntax
Dmitry Chernyak [Thu, 25 Nov 2010 00:14:36 +0000 (03:14 +0300)]
Added "vg" argument to the --disk syntax

Added "vg" argument to the "gnt-instance ... --disk" syntax specification.
Now is ok to write:

gnt-instance add ... --disk N:size=NNg,vg=VG_NAME ...

But not all internal structures are ready to handle this yet.

Signed-off-by: Dmitry Chernyak <dmi.chernyak@gmail.com>
[iustin@google.com: removed changes to design-2.0.rst]
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoMerge branch 'devel-2.3'
Iustin Pop [Wed, 24 Nov 2010 17:12:38 +0000 (17:12 +0000)]
Merge branch 'devel-2.3'

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

13 years agoMerge branch 'devel-2.2' into devel-2.3
Iustin Pop [Wed, 24 Nov 2010 17:01:57 +0000 (17:01 +0000)]
Merge branch 'devel-2.2' into devel-2.3

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

13 years agoFix coverage reports
Iustin Pop [Wed, 24 Nov 2010 16:06:32 +0000 (16:06 +0000)]
Fix coverage reports

Currently, the coverage reports include the unittests themselves, and
this skewes unfairly the reports, as the coverage for the tests is very
high (since they all run).

To fix this, we export the ganeti temp dir from run-in-temp-dir, and we
use that to exclude the tests directory. The patch also fixes a but
related to multiple directories to be omitted (--omit a --omit b is
wrong, it needs to be --omit a,b).

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

13 years agoAdding --node-parameters command line flag
René Nussbaumer [Wed, 24 Nov 2010 12:14:03 +0000 (13:14 +0100)]
Adding --node-parameters command line flag

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

13 years agoAdding ndparams to their OpCodes and LU calls
René Nussbaumer [Wed, 24 Nov 2010 10:59:35 +0000 (11:59 +0100)]
Adding ndparams to their OpCodes and LU calls

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

13 years agoAdd consistency test for mcpu dispatch table
Michael Hanselmann [Fri, 19 Nov 2010 20:42:52 +0000 (21:42 +0100)]
Add consistency test for mcpu dispatch table

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

13 years agocmdlib: Use _POutputFields where possible
Michael Hanselmann [Fri, 19 Nov 2010 20:19:54 +0000 (21:19 +0100)]
cmdlib: Use _POutputFields where possible

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

13 years agoUpdate query2 design document
Michael Hanselmann [Fri, 12 Nov 2010 17:30:39 +0000 (18:30 +0100)]
Update query2 design document

While starting to implement this, I found a number of deficiencies:

- Drop regular expressions. As it turned out, only very few fields for
  instances used them, all of which can easily be turned into static
  field names.
- Use two separate calls with a request and response description each.
- Add forgotten list of fields to query request.
- Add value status for case where a field is not available for an item,
  e.g. NIC 3 for an instance with only one network interface.
- Add "timestamp" field type.
- Updated examples.

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

13 years agoBasic stuff to allocate disks on different VGs
Dmitry Chernyak [Mon, 22 Nov 2010 22:02:25 +0000 (01:02 +0300)]
Basic stuff to allocate disks on different VGs

Extend allocation functions to be aware of different vg names.  Suppose,
vg_name is helded in disk.physical_id[0] (already was) LUCreateInstance
is modified to be aware of new "vg" argument of the disk specification.

cfg.GetVGName() will only be used when no VG is specified.

The "add" and "remove" for plain and drbd instances should be correct.
The "move" for plain instance should be correct.

Signed-off-by: Dmitry Chernyak <dmi.chernyak@gmail.com>
[iustin@google.com: fixed missing parameters in two cases and tabs]
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoAdding convenience getter for ndparams
René Nussbaumer [Mon, 22 Nov 2010 13:15:41 +0000 (14:15 +0100)]
Adding convenience getter for ndparams

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

13 years agoRAPI: implement no_install during instance creation
Lance Albertson [Mon, 22 Nov 2010 21:28:11 +0000 (15:28 -0600)]
RAPI: implement no_install during instance creation

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

13 years agoutils._RunCmdPipe: simplify the timeout logic
Iustin Pop [Mon, 22 Nov 2010 21:21:04 +0000 (22:21 +0100)]
utils._RunCmdPipe: simplify the timeout logic

There are two issues: first, it's simpler to assign directly to pt
instead of via another local variable. Second, this code doesn't make
sense:
  if lt < 0:
    break
  pt = max(0, lt)

If lt is indeed < 0, then the code will break. Otherwise, lt ≥ 0, and
max(0, lt) will always be equal to lt. So we remove the extra
assignment.

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

13 years agoutils._RunCmdPipe: fix poller timeout usage
Iustin Pop [Mon, 22 Nov 2010 20:57:59 +0000 (21:57 +0100)]
utils._RunCmdPipe: fix poller timeout usage

This patch makes a simple timeout test (e.g. testTimeoutKill) go from
13K poll syscalls to just 6. The code didn't take into account that
RunningTimeout talks in seconds while the poller object expects
milliseconds.

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

13 years agoFix utils unittest TestRunCmd.testTimeoutKill
Iustin Pop [Mon, 22 Nov 2010 20:42:52 +0000 (21:42 +0100)]
Fix utils unittest TestRunCmd.testTimeoutKill

Currently the test executes "/bin/sh -c 'trap "" TERM …" via the shell,
which means we have two shells involved (the parent one and the child
one, which does the trap). For some weird reason, this works for older
OSes: the first shell exec's the second one, whereas on squeeze it forks
and only then exec. This might be due to changes in Python or bash or
whatever.

In any case, the point is that this is a hacky way to call a shell, so
we change this to simply execute the desired shell directly, without any
intermediate shells (I don't understand why it was written as such
originally).

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

13 years agoRAPI: export the node group UUID in the node query
Iustin Pop [Mon, 22 Nov 2010 16:48:57 +0000 (16:48 +0000)]
RAPI: export the node group UUID in the node query

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

13 years agoAdding oob_program in the same style as beparams
René Nussbaumer [Fri, 19 Nov 2010 13:22:48 +0000 (14:22 +0100)]
Adding oob_program in the same style as beparams

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

13 years agoMerge branch 'devel-2.3'
Iustin Pop [Fri, 19 Nov 2010 16:26:30 +0000 (17:26 +0100)]
Merge branch 'devel-2.3'

* devel-2.3:
  Updates NEWS and configure.ac for 2.3.0~rc1
  Update NEWS & configure.ac for the 2.2.2 release
  Fix documentation regarding conversion to drbd
  Fix documentation regarding conversion to drbd
  Reinstall instance: disallow offline secondaries
  QA: check that doubly modifying an OS state is OK
  Fix breakage in OS state modify
  QA: add tests for gnt-cluster modify -B
  LUSetClusterParms: fix validation of beparams
  Add unittests for TemporaryReservationManager
  TempReservationManager: Reserved() doesn't work

Conflicts:
man/gnt-instance.sgml (ported to the RST version)

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

13 years agoTemporarily remove the interactive tests
Iustin Pop [Fri, 19 Nov 2010 16:22:17 +0000 (17:22 +0100)]
Temporarily remove the interactive tests

make check < /dev/null breaks these tests. Until we have change RunCmd
to override stdin, we need to remove them.

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

13 years agoSupport timeouts in RunCmd
René Nussbaumer [Tue, 9 Nov 2010 13:02:50 +0000 (14:02 +0100)]
Support timeouts in RunCmd

Further investigations have to be done for merging some of these bits
together with import-export daemon which uses similiar logic.

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

13 years agoUpdates NEWS and configure.ac for 2.3.0~rc1 v2.3.0rc1
Iustin Pop [Fri, 19 Nov 2010 13:10:54 +0000 (14:10 +0100)]
Updates NEWS and configure.ac for 2.3.0~rc1

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

13 years agoMerge branch 'devel-2.2' into devel-2.3
Iustin Pop [Fri, 19 Nov 2010 13:01:14 +0000 (14:01 +0100)]
Merge branch 'devel-2.2' into devel-2.3

* devel-2.2:
  Update NEWS & configure.ac for the 2.2.2 release
  Fix documentation regarding conversion to drbd

Conflicts:
NEWS         (integrated 2.2 changes)
configure.ac (kept our version)

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

13 years agoUpdate NEWS & configure.ac for the 2.2.2 release v2.2.2
Iustin Pop [Fri, 19 Nov 2010 10:42:35 +0000 (11:42 +0100)]
Update NEWS & configure.ac for the 2.2.2 release

This imports the 2.1.8 NEWS entry and adds the 2.2.2 one, then updates the
configure.ac version.

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

13 years agoFix documentation regarding conversion to drbd
Iustin Pop [Fri, 19 Nov 2010 10:17:12 +0000 (11:17 +0100)]
Fix documentation regarding conversion to drbd

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

13 years agoFix documentation regarding conversion to drbd
Iustin Pop [Fri, 19 Nov 2010 10:17:12 +0000 (11:17 +0100)]
Fix documentation regarding conversion to drbd

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

13 years agoReinstall instance: disallow offline secondaries
Iustin Pop [Thu, 18 Nov 2010 09:37:34 +0000 (10:37 +0100)]
Reinstall instance: disallow offline secondaries

Currently, reinstallation of a DRBD instance with the secondary node offline does:

node1# gnt-instance reinstall -f instance1
Waiting for job 139053 for instance1...
Thu Nov 18 01:36:09 2010  - WARNING: Could not prepare block device disk/0 on node node3 (is_primary=False, pass=1): Node is marked offline
Thu Nov 18 01:36:09 2010  - WARNING: Could not shutdown block device disk/0 on node node3: Node is marked offline
Job 139053 for instance1 has failed: Failure: command execution error:
Disk consistency error

Since this fails anyway, let's check the secondary nodes, thus
preventing any modifications to the instance (e.g. OS type change):

node1# gnt-instance reinstall -f instance1
Waiting for job 139058 for instance1...
Job 139058 for instance1 has failed: Failure: prerequisites not met for this operation:
error type: wrong_state, error details:
Instance secondary node offline, cannot reinstall: node3

The patch needs modifications to the _CheckNodeOnline function, in order
to display meaningful messages ("Can't use offline node" would be very
confusing for an instance reinstall, since we didn't select a node
manually).

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

13 years agoQA: check that doubly modifying an OS state is OK
Iustin Pop [Thu, 18 Nov 2010 09:23:48 +0000 (10:23 +0100)]
QA: check that doubly modifying an OS state is OK

This would have prevented the bug fixed in the previous patch :(

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

13 years agoFix breakage in OS state modify
Iustin Pop [Thu, 18 Nov 2010 09:20:06 +0000 (10:20 +0100)]
Fix breakage in OS state modify

I was using the feedback_fn function incorrectly (it doesn't
automatically expand the arguments).

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 [Wed, 17 Nov 2010 15:28:23 +0000 (16:28 +0100)]
Merge branch 'devel-2.2' into devel-2.3

* devel-2.2:
  QA: add tests for gnt-cluster modify -B
  LUSetClusterParms: fix validation of beparams

Conflicts:
lib/cmdlib.py (reverted & applied manually the change)

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

13 years agoQA: add tests for gnt-cluster modify -B
Iustin Pop [Wed, 17 Nov 2010 10:53:10 +0000 (11:53 +0100)]
QA: add tests for gnt-cluster modify -B

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

13 years agoLUSetClusterParms: fix validation of beparams
Iustin Pop [Wed, 17 Nov 2010 10:52:04 +0000 (11:52 +0100)]
LUSetClusterParms: fix validation of beparams

Since the contents of the dict is validated via the ForceDictType, we can
simply require that it is a dict here. The previous check was wrong, as it was
copied from the HV checks (which also doesn't verify the leaf dict type).

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

13 years agoAdding unittests for RunningTimeout
René Nussbaumer [Tue, 16 Nov 2010 13:46:07 +0000 (14:46 +0100)]
Adding unittests for RunningTimeout

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

13 years agoMove locking.RunningTimeout to utils
René Nussbaumer [Tue, 9 Nov 2010 12:43:30 +0000 (13:43 +0100)]
Move locking.RunningTimeout to utils

As we need this functionality in other places than just locking it makes
sense to move it to utils rather than keeping it in locking

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

13 years agoSome further man tweaks
Iustin Pop [Sat, 13 Nov 2010 20:46:57 +0000 (21:46 +0100)]
Some further man tweaks

This fixes one non-defined @CUSTOM_@ entry, and replaces two hardcoded
paths with further configure-time variables.

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

13 years agoRemove last vestiges of docbook
Iustin Pop [Sat, 13 Nov 2010 20:30:44 +0000 (21:30 +0100)]
Remove last vestiges of docbook

This patch removes the last traces of docbook.

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

13 years agoRemove the SGML man sources
Iustin Pop [Sat, 13 Nov 2010 20:28:34 +0000 (21:28 +0100)]
Remove the SGML man sources

… finally!

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

13 years agoSwitch man pages from SGML to RST
Iustin Pop [Sat, 13 Nov 2010 19:41:14 +0000 (20:41 +0100)]
Switch man pages from SGML to RST

This patch changes the Makefile rules to build the man pages from the
RST sources instead of the SGML ones.

Note: pandoc quotes by default the ‘@’ character in manpage output, so
we explicitely undo this before writing the .in file.

Note 2: The docs unittest has switched from checking cmdsynopsis
elements to search for either '**command**' or '| **command**' at the
beggining of lines. This is not as safe as the sgml checker, but it
should be fine.

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

13 years agoAdd RST version of ganeti man page
Iustin Pop [Sat, 13 Nov 2010 19:30:50 +0000 (20:30 +0100)]
Add RST version of ganeti man page

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

13 years agoAdd RST version of ganeti-os-interface man page
Iustin Pop [Sat, 13 Nov 2010 18:43:24 +0000 (19:43 +0100)]
Add RST version of ganeti-os-interface man page

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

13 years agoAdd RST version of ganeti-cleaner man page
Iustin Pop [Sat, 13 Nov 2010 17:06:12 +0000 (18:06 +0100)]
Add RST version of ganeti-cleaner man page

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

13 years agoAdd RST version of ganeti-confd man page
Iustin Pop [Sat, 13 Nov 2010 19:24:40 +0000 (20:24 +0100)]
Add RST version of ganeti-confd man page

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

13 years agoAdd RST version of ganeti-rapi man page
Iustin Pop [Sat, 13 Nov 2010 19:22:53 +0000 (20:22 +0100)]
Add RST version of ganeti-rapi man page

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

13 years agoAdd RST version of ganeti-noded man page
Iustin Pop [Sat, 13 Nov 2010 19:17:35 +0000 (20:17 +0100)]
Add RST version of ganeti-noded man page

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

13 years agoAdd RST version of ganeti-watcher man page
Iustin Pop [Sat, 13 Nov 2010 19:14:32 +0000 (20:14 +0100)]
Add RST version of ganeti-watcher man page

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

13 years agoAdd RST version of ganeti-masterd man page
Iustin Pop [Sat, 13 Nov 2010 19:08:41 +0000 (20:08 +0100)]
Add RST version of ganeti-masterd man page

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

13 years agoAdd RST version of gnt-os man page
Iustin Pop [Sat, 13 Nov 2010 19:02:53 +0000 (20:02 +0100)]
Add RST version of gnt-os man page

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

13 years agoAdd RST version of gnt-job man page
Iustin Pop [Sat, 13 Nov 2010 18:59:21 +0000 (19:59 +0100)]
Add RST version of gnt-job man page

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

13 years agoAdd RST version of gnt-debug man page
Iustin Pop [Sat, 13 Nov 2010 18:55:47 +0000 (19:55 +0100)]
Add RST version of gnt-debug man page

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

13 years agoAdd RST version of gnt-backup man page
Iustin Pop [Sat, 13 Nov 2010 18:50:32 +0000 (19:50 +0100)]
Add RST version of gnt-backup man page

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

13 years agoAdd RST version of gnt-node man page
Iustin Pop [Sat, 13 Nov 2010 18:33:40 +0000 (19:33 +0100)]
Add RST version of gnt-node man page

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

13 years agoAdd RST version of gnt-cluster man page
Iustin Pop [Sat, 13 Nov 2010 18:17:41 +0000 (19:17 +0100)]
Add RST version of gnt-cluster man page

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

13 years agoAdd RST version of gnt-instance man page
Iustin Pop [Sat, 13 Nov 2010 18:02:10 +0000 (19:02 +0100)]
Add RST version of gnt-instance man page

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

13 years agoAdd a footer.rst
Iustin Pop [Thu, 11 Nov 2010 16:04:15 +0000 (17:04 +0100)]
Add a footer.rst

This is the conversion from footer.sgml. Will be used later for the
rst-to-man conversion.

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

13 years agoAdd pandoc to configure.ac
Iustin Pop [Thu, 11 Nov 2010 15:51:35 +0000 (16:51 +0100)]
Add pandoc to configure.ac

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

13 years agoDesign document for new query infrastructure
Michael Hanselmann [Fri, 12 Nov 2010 14:03:40 +0000 (15:03 +0100)]
Design document for new query infrastructure

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

13 years agoAdd group, group.uuid fields in node list
Iustin Pop [Thu, 11 Nov 2010 10:50:23 +0000 (11:50 +0100)]
Add group, group.uuid fields in node list

This is needed to at least see the current group configuration.

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

13 years agoAdd unittests for TemporaryReservationManager
Iustin Pop [Thu, 11 Nov 2010 09:38:44 +0000 (10:38 +0100)]
Add unittests for TemporaryReservationManager

And fix an error message.

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

13 years agoTempReservationManager: Reserved() doesn't work
David Knowles [Wed, 10 Nov 2010 20:57:19 +0000 (15:57 -0500)]
TempReservationManager: Reserved() doesn't work

Note: It appears this has been around since the initial checkin of
TemporaryReservationManager. I have no idea what this could break, so
someone else may want to test this more thoroughly.

Signed-off-by: David Knowles <dknowles@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

13 years agoimpexpd: Disable OpenSSL compression in socat if possible
Michael Hanselmann [Wed, 10 Nov 2010 18:43:01 +0000 (19:43 +0100)]
impexpd: Disable OpenSSL compression in socat if possible

This uses an option only available in patched socat versions. More
information is available from the INSTALL update included in this
patch.

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

13 years agoMerge branch 'devel-2.3'
Michael Hanselmann [Tue, 9 Nov 2010 15:35:36 +0000 (16:35 +0100)]
Merge branch 'devel-2.3'

* devel-2.3:
  devel/release: Use release-specific Makefile targets
  Makefile: Add new dist target for releases
  Makefile: Stricter checks for release distchecks

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

13 years agoMerge branch 'devel-2.2' into devel-2.3
Michael Hanselmann [Tue, 9 Nov 2010 13:56:49 +0000 (14:56 +0100)]
Merge branch 'devel-2.2' into devel-2.3

* devel-2.2:
  devel/release: Use release-specific Makefile targets
  Makefile: Add new dist target for releases
  Makefile: Stricter checks for release distchecks

Conflicts:
Makefile.am: Trivial

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

13 years agodevel/release: Use release-specific Makefile targets
Michael Hanselmann [Mon, 8 Nov 2010 19:44:00 +0000 (20:44 +0100)]
devel/release: Use release-specific Makefile targets

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

13 years agoMakefile: Add new dist target for releases
Michael Hanselmann [Mon, 8 Nov 2010 19:43:39 +0000 (20:43 +0100)]
Makefile: Add new dist target for releases

A new script, autotools/check-tar, is used to check the resulting
.tar.gz file for unwanted contents like wrong file owners or
permissions.

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

13 years agoMerge branch 'devel-2.3'
Michael Hanselmann [Mon, 8 Nov 2010 16:05:37 +0000 (17:05 +0100)]
Merge branch 'devel-2.3'

* devel-2.3:
  Update ganeti-os-interface documentation
  Makefile: Check for empty files and dirs on distcheck
  Revert commit e7e23e73, work around Automake bug

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

13 years agoUpdate ganeti-os-interface documentation
Apollon Oikonomopoulos [Fri, 5 Nov 2010 14:32:48 +0000 (16:32 +0200)]
Update ganeti-os-interface documentation

man/ganeti-os-interace.sgml lacked complete information for the NIC-related
environment variables. Added a reference to NIC_%N_LINK and NIC_%N_MODE and
clarified the reference to NIC_%N_BRIDGE.

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 agoMakefile: Check for empty files and dirs on distcheck
Michael Hanselmann [Thu, 4 Nov 2010 13:39:12 +0000 (14:39 +0100)]
Makefile: Check for empty files and dirs on distcheck

Including empty files can cause unnecessary warnings for packagers.

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

13 years agoRevert commit e7e23e73, work around Automake bug
Michael Hanselmann [Thu, 4 Nov 2010 14:56:13 +0000 (15:56 +0100)]
Revert commit e7e23e73, work around Automake bug

After commit e7e23e73 the build would fail in distcheck on systems with
Automake 1.10. An investigation identified Automake bug #533[1] as the
cause. Applying the changes in Automake commit 3a12ed5e[2] to the
generated Makefile.in file made distcheck work again.

The underlying problem is that in our case both doc/html and
doc/html/.dir were included in the distributed files. When distcheck
copied the former from the source to the staging directory, it was
marked as read-only (distcheck makes the whole source read-only). It
then tried to copy doc/html/.dir from the build directory, which failed.
Automake 1.11 and newer avoid this problem by adjusting the permissions.

Since depending on Automake 1.11 or above is not an option at this time,
a work-around was found by not using a “.dir” file in doc/html, but
using “index.html” as a flag for creating the directory.

[1] http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view&database=automake&pr=533
[2] http://git.savannah.gnu.org/gitweb/?p=automake.git;a=commit;h=3a12ed5e97dc193a38dd14e031658cbd329b50ca

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

13 years agoDesign Doc: Ganeti Node OOB Management Framework
Marc Schmitt [Thu, 28 Oct 2010 11:42:36 +0000 (13:42 +0200)]
Design Doc: Ganeti Node OOB Management Framework

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

13 years agoFix disk checks in “gnt-cluster verify”
Michael Hanselmann [Wed, 3 Nov 2010 12:56:16 +0000 (13:56 +0100)]
Fix disk checks in “gnt-cluster verify”

Tests have shown that the changes in commit b8d26c6e5 don't work as
wanted. If any disk wasn't found on the node, all disks located on the
same node would show as faulty. The cause was incorrect exception
handling on the node.

This patch changes the RPC call to return a per-disk success/error
status, avoiding the problem.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Luca Bigliardi <shammash@google.com>

13 years agoQA: Run “gnt-cluster verify” while DRBD instance exists
Michael Hanselmann [Wed, 3 Nov 2010 12:49:43 +0000 (13:49 +0100)]
QA: Run “gnt-cluster verify” while DRBD instance exists

This tests some parts of the disk information collection.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Luca Bigliardi <shammash@google.com>

13 years agoRemove empty file from doc/html in distribution
Michael Hanselmann [Tue, 2 Nov 2010 13:42:32 +0000 (14:42 +0100)]
Remove empty file from doc/html in distribution

It's not needed and some packaging systems complain about empty
files.

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

13 years agoRemove shebang line from ganeti.server.*
Michael Hanselmann [Tue, 2 Nov 2010 13:41:58 +0000 (14:41 +0100)]
Remove shebang line from ganeti.server.*

Some of then were forgotten.

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

13 years agoFix typos in NEWS
Michael Hanselmann [Tue, 2 Nov 2010 13:16:34 +0000 (14:16 +0100)]
Fix typos in NEWS

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

13 years agoBump version for Ganeti 2.3 v2.3.0rc0
Michael Hanselmann [Tue, 2 Nov 2010 10:49:55 +0000 (11:49 +0100)]
Bump version for Ganeti 2.3

Also update cfgupgrade and NEWS.

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

13 years agoAdd -s option to gnt-node modify
Guido Trotter [Sat, 30 Oct 2010 08:39:22 +0000 (09:39 +0100)]
Add -s option to gnt-node modify

We can now change a nodes' secondary ip.

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

13 years agoluxi: disable two lint errors
Guido Trotter [Mon, 1 Nov 2010 10:17:21 +0000 (10:17 +0000)]
luxi: disable two lint errors

This is already disabled for the same type of request a couple of lines
above. The new code was introduced in e986f20c but didn't have the
disables.

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

13 years agoRemove private ip mention in error message
Guido Trotter [Mon, 1 Nov 2010 12:44:22 +0000 (12:44 +0000)]
Remove private ip mention in error message

There is no "private" ip in Ganeti, we only have primary and secondary
ones. Whether they are public or private is a per-installation detail.

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

13 years agoAdd ConfigWriter.GetNodeGroup
Guido Trotter [Sat, 30 Oct 2010 09:16:20 +0000 (10:16 +0100)]
Add ConfigWriter.GetNodeGroup

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

13 years agoImprove LookupNodeGroup's docstring
Guido Trotter [Sat, 30 Oct 2010 09:15:58 +0000 (10:15 +0100)]
Improve LookupNodeGroup's docstring

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

13 years agoMerge the common options between import and add
Guido Trotter [Fri, 29 Oct 2010 11:43:13 +0000 (12:43 +0100)]
Merge the common options between import and add

The "I always wanted to do this" commit.

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

13 years agoDrop the -g shortcut for --vg-name
Guido Trotter [Fri, 29 Oct 2010 10:42:11 +0000 (11:42 +0100)]
Drop the -g shortcut for --vg-name

Changing the volume group is a lot less frequent than acting on a node
group. As such we drop the "-g" shortcut and require the long option to
be passed. In 2.3 the commands which used to accept the volume group as
"-g" won't have any node group option, so no confusion will arise. Later
on we may pass "-g" as the initial node group name to gnt-cluster init,
although that's not strictly necessary, as modifying it later is always
possible.

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

13 years agoUpdate NEWS for Ganeti 2.3
Michael Hanselmann [Mon, 1 Nov 2010 15:00:57 +0000 (16:00 +0100)]
Update NEWS for Ganeti 2.3

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

13 years agoQA: Test ssconf_instance_list file on rename and creation
Michael Hanselmann [Mon, 1 Nov 2010 13:01:23 +0000 (14:01 +0100)]
QA: Test ssconf_instance_list file on rename and creation

This test would've caught the bug fixed in the previous patch.

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

13 years agoconfig: Write ssconf after renaming instance
Michael Hanselmann [Mon, 1 Nov 2010 13:00:33 +0000 (14:00 +0100)]
config: Write ssconf after renaming instance

This fixes a bug where the ssconf_instance_list file was
not updated after an instance rename.

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

13 years agoChange qa_utils.ResolveInstanceName to take name
Michael Hanselmann [Mon, 1 Nov 2010 12:59:47 +0000 (13:59 +0100)]
Change qa_utils.ResolveInstanceName to take name

… instead of an object. Allows it to be used in places where
only the name is available.

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

13 years agoMakefile: Add PYTHON_BOOTSTRAP to linted code
Michael Hanselmann [Fri, 29 Oct 2010 14:55:05 +0000 (16:55 +0200)]
Makefile: Add PYTHON_BOOTSTRAP to linted code

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

13 years agoMake *.in non-executable
Michael Hanselmann [Fri, 29 Oct 2010 14:26:28 +0000 (16:26 +0200)]
Make *.in non-executable

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

13 years agoMove ganeti-rapi to ganeti.server.rapi
Michael Hanselmann [Fri, 29 Oct 2010 14:10:50 +0000 (16:10 +0200)]
Move ganeti-rapi to ganeti.server.rapi

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

13 years agoMove ganeti-noded to ganeti.server.noded
Michael Hanselmann [Fri, 29 Oct 2010 14:08:48 +0000 (16:08 +0200)]
Move ganeti-noded to ganeti.server.noded

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

13 years agoMove ganeti-confd to ganeti.server.confd
Michael Hanselmann [Fri, 29 Oct 2010 14:05:20 +0000 (16:05 +0200)]
Move ganeti-confd to ganeti.server.confd

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

13 years agoMove ganeti-masterd to ganeti.server.masterd
Michael Hanselmann [Fri, 29 Oct 2010 13:26:20 +0000 (15:26 +0200)]
Move ganeti-masterd to ganeti.server.masterd

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

13 years agoPrepare move of daemons to ganeti.server
Michael Hanselmann [Fri, 29 Oct 2010 13:13:51 +0000 (15:13 +0200)]
Prepare move of daemons to ganeti.server

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

13 years agoMove ganeti-watcher to ganeti.watcher
Michael Hanselmann [Wed, 27 Oct 2010 17:51:30 +0000 (19:51 +0200)]
Move ganeti-watcher to ganeti.watcher

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

13 years agoMakefile: Generalize bootstrap script generator
Michael Hanselmann [Wed, 27 Oct 2010 17:52:17 +0000 (19:52 +0200)]
Makefile: Generalize bootstrap script generator

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

13 years agoMakefile: Stricter checks for release distchecks
Michael Hanselmann [Wed, 27 Oct 2010 15:20:20 +0000 (17:20 +0200)]
Makefile: Stricter checks for release distchecks

This should avoid cases like commit f64de30f where the release
date was forgotten from NEWS.

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

13 years agosetup-ssh: Better error reporting
René Nussbaumer [Fri, 29 Oct 2010 12:52:52 +0000 (14:52 +0200)]
setup-ssh: Better error reporting

Together with Michael we refactored the code to make it better and
easier error reporting. Without printing backtraces for authentication
and verification issues.

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

13 years agoMakefile: Streamline directory creation
Michael Hanselmann [Thu, 28 Oct 2010 15:06:21 +0000 (17:06 +0200)]
Makefile: Streamline directory creation

Some directories don't exist in the repository, but are required at build time
(e.g. doc/html). Until now some were created explicitly, some through the
target “stamp-directories” and other target simply relied on a previous target
to create the directory.

This patch tries to clean this up by getting rid of “stamp-directories” and
instead use rules to recreate any missing directory. As described in a comment
in the code, a file inside each directory is necessary, named “.dir”.

Order-only dependencies are used for directory creation to avoid rebuilding
where only the “.dir” file is missing (see “info make”, section “4.3 Types of
Prerequisites”).

The target for building the documentation is also changed to use “…/index.html”
instead of a hidden file. Some style changes are also made.

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

13 years agoAdd support and checks for version in LUXI
Michael Hanselmann [Thu, 28 Oct 2010 16:48:20 +0000 (18:48 +0200)]
Add support and checks for version in LUXI

A new constant, LUXI_VERSION, is used to verify the peer's version. The
version is optional, so old(er) clients and servers talking to peers not
supporting it won't break. Example with mismatching library:

$ gnt-instance list
Unhandled Ganeti error: LUXI version mismatch, server 2020000, request
1010000

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

13 years agoluxi.ProtocolError: Derive from errors.LuxiError
Michael Hanselmann [Thu, 28 Oct 2010 15:11:43 +0000 (17:11 +0200)]
luxi.ProtocolError: Derive from errors.LuxiError

This allows LUXI errors to be encoded and serialized.

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