ganeti-local
12 years agoMerge branch 'stable-2.6'
Iustin Pop [Tue, 29 May 2012 15:12:03 +0000 (17:12 +0200)]
Merge branch 'stable-2.6'

* stable-2.6:
  Document that the disk/hypervisor state is not used
  Correct the watcher state files in the man page
  Re-wrap some lines in watcher code
  Add support for SIGHUP handling in Haskell daemons
  Rework logging setup for Haskell daemons
  Adapt example init.d script to work on Fedora
  Update the INSTALL doc for Fedora users
  kvm-ifup: Use /bin/bash

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

12 years agoDocument that the disk/hypervisor state is not used
Iustin Pop [Tue, 29 May 2012 12:08:14 +0000 (14:08 +0200)]
Document that the disk/hypervisor state is not used

This didn't get completed in time for 2.6, so we document that it's
not working as is. Well, it's not broken, just not used by anything.

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

12 years agoCorrect the watcher state files in the man page
Iustin Pop [Mon, 28 May 2012 14:05:32 +0000 (16:05 +0200)]
Correct the watcher state files in the man page

The move to per-group state files forgot to update the man page of
ganeti-watcher; let's fix this and add some more details on what
removal means and when it's needed.

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

12 years agoRe-wrap some lines in watcher code
Iustin Pop [Mon, 28 May 2012 14:05:31 +0000 (16:05 +0200)]
Re-wrap some lines in watcher code

These were using exactly 80 chars, and I like them smaller.

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

12 years agoAdd support for SIGHUP handling in Haskell daemons
Iustin Pop [Fri, 25 May 2012 16:00:56 +0000 (18:00 +0200)]
Add support for SIGHUP handling in Haskell daemons

This patch adds support for handling SIGHUP and reopening the
stdout/stderr logfile in daemon mode (but not in foreground mode).

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

12 years agoRework logging setup for Haskell daemons
Iustin Pop [Fri, 25 May 2012 15:40:53 +0000 (17:40 +0200)]
Rework logging setup for Haskell daemons

This fixes a missing functionality: closing of stdout/stderr when
forking daemons. Without this, starting the daemons from the command
line seems to work, but doing it from utils.RunCmd breaks, since
without closing the standard descriptors, RunCmd never finishes.

The code is not very nice; basically what we need is an actual type
for the LogMode desired (LogConsole, LogStderr, LogFile FilePath), but
the syslog (yes/no and *only*) complicates this even more. I'll think
more on this and probably fix it in master.

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

12 years agoAdapt example init.d script to work on Fedora
René Nussbaumer [Thu, 24 May 2012 13:36:47 +0000 (15:36 +0200)]
Adapt example init.d script to work on Fedora

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

12 years agoUpdate the INSTALL doc for Fedora users
René Nussbaumer [Thu, 24 May 2012 13:29:38 +0000 (15:29 +0200)]
Update the INSTALL doc for Fedora users

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

12 years agoMerge branch 'stable-2.5' into stable-2.6
Michael Hanselmann [Thu, 24 May 2012 14:01:48 +0000 (16:01 +0200)]
Merge branch 'stable-2.5' into stable-2.6

* stable-2.5:
  kvm-ifup: Use /bin/bash

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

12 years agokvm-ifup: Use /bin/bash
Michael Hanselmann [Thu, 24 May 2012 07:44:25 +0000 (09:44 +0200)]
kvm-ifup: Use /bin/bash

As reported by Ben Beuchler, kvm-ifup uses bash-specific constructs and
doesn't work with Ubuntu's default shell. We use bash all over the place
anyway, so changing the shebang line is the easiest solution.

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

12 years agoMerge branch 'stable-2.6'
Iustin Pop [Wed, 23 May 2012 12:05:05 +0000 (14:05 +0200)]
Merge branch 'stable-2.6'

* stable-2.6:
  Version bump for 2.6.0~beta1
  Adjust cfgupgrade for new minor version
  Add support to daemon-util for distributions without start-stop-daemon
  Improve the check-news script
  Fix NEWS file
  _MaybeParseUnit: The elements are dicts not arrays
  Make it possible to reset vcpu/spindle ratio to default
  Add man page documentation for cpu_mask hv parameter
  Add checks from wrong hard-coded paths in manpages
  Fix hardcoded paths in gnt-cluster.rst man page
  First round of NEWS file updates for 2.6
  gnt-group: Adding vcpu/spindle ratio to ipolicy flags
  gnt-cluster modify: Add ipolicy for spindle ratio opt
  cli: Add ipolicy_spindle_ratio to CreateIPolicyFromOpts
  gnt-instance info: Rework beparams listings
  Fix a tiny typo
  constants: Add FIXME regarding CPU pinning bitfield

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

12 years agoMerge branch 'devel-2.6' into stable-2.6
Iustin Pop [Wed, 23 May 2012 11:53:58 +0000 (13:53 +0200)]
Merge branch 'devel-2.6' into stable-2.6

It seems Michael submitted the daemon-util patch on devel-2.6, and I
didn't realise it. It's way too early in the release cycle of 2.6 to
have diverging branches, so I'm merging devel-2.6 into stable-2.6 and
then will ff the devel branch to the merge point.

* origin/devel-2.6:
  Add support to daemon-util for distributions without start-stop-daemon

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

12 years agoVersion bump for 2.6.0~beta1 v2.6.0beta1
Iustin Pop [Tue, 22 May 2012 15:46:22 +0000 (17:46 +0200)]
Version bump for 2.6.0~beta1

Finally!

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

12 years agoAdjust cfgupgrade for new minor version
Iustin Pop [Tue, 22 May 2012 15:59:44 +0000 (17:59 +0200)]
Adjust cfgupgrade for new minor version

Also does some abstracting of the versions.

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

12 years agoAdd support to daemon-util for distributions without start-stop-daemon
Jun Futagawa [Tue, 15 May 2012 07:38:07 +0000 (16:38 +0900)]
Add support to daemon-util for distributions without start-stop-daemon

This adds support to daemon-util for Red Hat based distributions that
do not have a start-stop-daemon. If /sbin/start-stop-daemon is not
available, daemon-util will source /etc/rc.d/init.d/functions.
check(), start(), and stop() are updated to use the relevant functions
from /etc/rc.d/init.d/functions.

Thanks to Stephen Fromm and Michael Hanselmann for improving the error
handling, style, and comments.

Signed-off-by: Jun Futagawa <jfut@integ.jp>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
(cherry picked from commit 4b42c3d665d4d92068e4319dfd35e83a54443f3b)

12 years agoImprove the check-news script
Iustin Pop [Tue, 22 May 2012 08:56:07 +0000 (10:56 +0200)]
Improve the check-news script

Allow all errors to be displayed, instead of aborting at the first
one, and don't show stacktraces anymore.

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

12 years agoFix NEWS file
Iustin Pop [Tue, 22 May 2012 08:52:29 +0000 (10:52 +0200)]
Fix NEWS file

Too many empty lines…

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

12 years ago_MaybeParseUnit: The elements are dicts not arrays
René Nussbaumer [Tue, 22 May 2012 08:56:35 +0000 (10:56 +0200)]
_MaybeParseUnit: The elements are dicts not arrays

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

12 years agoMake it possible to reset vcpu/spindle ratio to default
René Nussbaumer [Mon, 21 May 2012 14:31:42 +0000 (16:31 +0200)]
Make it possible to reset vcpu/spindle ratio to default

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

12 years agoAdd man page documentation for cpu_mask hv parameter
Iustin Pop [Fri, 18 May 2012 15:05:28 +0000 (17:05 +0200)]
Add man page documentation for cpu_mask hv parameter

This is adapted from the design doc.

Also fixes a typo in cmdlib.py.

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

12 years agoAdd checks from wrong hard-coded paths in manpages
Iustin Pop [Fri, 18 May 2012 10:23:26 +0000 (12:23 +0200)]
Add checks from wrong hard-coded paths in manpages

This is trivial, but should prevent such things in the future.

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

12 years agoFix hardcoded paths in gnt-cluster.rst man page
Iustin Pop [Fri, 18 May 2012 09:57:03 +0000 (11:57 +0200)]
Fix hardcoded paths in gnt-cluster.rst man page

Also reworks a bit the sentence and fixes a typo.

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

12 years agoFirst round of NEWS file updates for 2.6
Iustin Pop [Tue, 15 May 2012 17:13:06 +0000 (19:13 +0200)]
First round of NEWS file updates for 2.6

More will come, this is just what I took from the existing NEWS
entries.

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

12 years agognt-group: Adding vcpu/spindle ratio to ipolicy flags
René Nussbaumer [Mon, 21 May 2012 11:40:22 +0000 (13:40 +0200)]
gnt-group: Adding vcpu/spindle ratio to ipolicy flags

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

12 years agognt-cluster modify: Add ipolicy for spindle ratio opt
René Nussbaumer [Wed, 16 May 2012 14:53:47 +0000 (16:53 +0200)]
gnt-cluster modify: Add ipolicy for spindle ratio opt

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

12 years agocli: Add ipolicy_spindle_ratio to CreateIPolicyFromOpts
René Nussbaumer [Wed, 16 May 2012 14:49:57 +0000 (16:49 +0200)]
cli: Add ipolicy_spindle_ratio to CreateIPolicyFromOpts

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

12 years agoAdd support to daemon-util for distributions without start-stop-daemon
Jun Futagawa [Tue, 15 May 2012 07:38:07 +0000 (16:38 +0900)]
Add support to daemon-util for distributions without start-stop-daemon

This adds support to daemon-util for Red Hat based distributions that
do not have a start-stop-daemon. If /sbin/start-stop-daemon is not
available, daemon-util will source /etc/rc.d/init.d/functions.
check(), start(), and stop() are updated to use the relevant functions
from /etc/rc.d/init.d/functions.

Thanks to Stephen Fromm and Michael Hanselmann for improving the error
handling, style, and comments.

Signed-off-by: Jun Futagawa <jfut@integ.jp>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agognt-instance info: Rework beparams listings
René Nussbaumer [Wed, 16 May 2012 12:14:10 +0000 (14:14 +0200)]
gnt-instance info: Rework beparams listings

This patch reworks the beparams listing to the new style. However, due
to this process the naming of the fields with mixed casing changed to
lowercase and is therefore not 100% compatible with the previous versions.

As "memory" is marked deprecated and sort of default we merge that just
into the actual dict, which leads to the following output:

  - maxmem: 128
  - memory: default (128)
  - minmem: 128

Instead of:

  - maxmem: 128
  - minmem: 128
  - memory: 128

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

12 years agoFix a tiny typo
Iustin Pop [Tue, 15 May 2012 17:08:47 +0000 (19:08 +0200)]
Fix a tiny typo

Was showing in the man page as --diskN, without a space.

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

12 years agoconstants: Add FIXME regarding CPU pinning bitfield
Michael Hanselmann [Tue, 15 May 2012 15:04:52 +0000 (17:04 +0200)]
constants: Add FIXME regarding CPU pinning bitfield

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

12 years agoAllow units in ipolicy disk/mem CLI changes
Iustin Pop [Mon, 14 May 2012 14:47:14 +0000 (16:47 +0200)]
Allow units in ipolicy disk/mem CLI changes

This makes "gnt-cluster modify --specs-mem-size max=16g" work. The
downside (due to how we iterate) is that error messages are not very
clear:

  $ gnt-cluster modify --specs-mem-size max=16a
  Failure: prerequisites not met for this operation:
  error type: wrong_input, error details:
  Invalid disk ({}) or memory ({'max': '16a'}) size in policy: Unknown unit: a

Also updates the help of these commands, which was very confusing
before (at least for me).

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

12 years agoMove some ipolicy functions from objects to cli
Iustin Pop [Mon, 14 May 2012 14:39:57 +0000 (16:39 +0200)]
Move some ipolicy functions from objects to cli

These are only used in CLI programs to parse command line options and
such they do not belong in object.py (I will change them more and I
don't want to add more code in objects.py).

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

12 years agoBeautify a couple of error messages
Iustin Pop [Mon, 14 May 2012 13:33:05 +0000 (15:33 +0200)]
Beautify a couple of error messages

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

12 years agoFix _ComputeNewInstanceViolations logic
Iustin Pop [Mon, 14 May 2012 13:31:37 +0000 (15:31 +0200)]
Fix _ComputeNewInstanceViolations logic

This function did the opposite: was computing which old instance
violated the specs but no longer do it now. new - old is the expected
behaviour.

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

12 years agoBeautify disk ipolicy violations in cluster-verify
Iustin Pop [Mon, 14 May 2012 13:21:27 +0000 (15:21 +0200)]
Beautify disk ipolicy violations in cluster-verify

Currently, we only get:

  instance3: ['disk-size value 512 is not in range [1024, 1048576]'

which doesn't explain which disk we are talking about. This patch
extends the verification functions to take an additional parameter
that qualifies the disk:

  instance3: ['disk-size/0 value 512 is not in range [1024, 1048576]'

Future patch will make the formatting of the list better.

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

12 years agoqa_utils: Factorize code for getting entity name
Michael Hanselmann [Tue, 15 May 2012 09:07:08 +0000 (11:07 +0200)]
qa_utils: Factorize code for getting entity name

This reduces code duplication and provides better error messages if
something is incorrect while getting a node or instance name.

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

12 years agoNEWS: Style fixes
Michael Hanselmann [Thu, 10 May 2012 10:59:06 +0000 (12:59 +0200)]
NEWS: Style fixes

- Quote where appropriate
- Small wording changes

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

12 years agoqa_utils: Accept string as instance for check
Michael Hanselmann [Mon, 14 May 2012 13:50:35 +0000 (15:50 +0200)]
qa_utils: Accept string as instance for check

Some tests don't have access to an instance dictionary.

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

12 years agoQA: Cleanup after commit 5fa0375e4a
Michael Hanselmann [Mon, 14 May 2012 13:51:51 +0000 (15:51 +0200)]
QA: Cleanup after commit 5fa0375e4a

Some tests had wrong assumptions on the instance status and some
needed explicit start or stop commands.

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

12 years agoLUInstanceCreate: Run rename script on instance import
Michael Hanselmann [Mon, 14 May 2012 13:46:22 +0000 (15:46 +0200)]
LUInstanceCreate: Run rename script on instance import

If an instance is imported with a different name, network settings may have to
be changed. Since import scripts may not already to the right thing, we decided
to run the rename script. The same technique is already used for inter-cluster
instance moves.

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

12 years agoganeti.query_unittest: Adding testcase for diskparams
René Nussbaumer [Mon, 14 May 2012 13:33:36 +0000 (15:33 +0200)]
ganeti.query_unittest: Adding testcase for diskparams

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

12 years agognt-group add: Fix diskparam fill
René Nussbaumer [Mon, 14 May 2012 08:32:09 +0000 (10:32 +0200)]
gnt-group add: Fix diskparam fill

This was a pretty non-obvious bug. A cluster looks sane after
gnt-cluster init, however on a daemon restart the diskparameters had the
default filled in. The same applies to gnt-group add. This is due to the
nature that UpgradeConfig() from NodeGroups did just populate them with
defaults if something was set on it.

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

12 years agognt-group modify: Fix an update issue with diskparams
René Nussbaumer [Fri, 11 May 2012 14:56:49 +0000 (16:56 +0200)]
gnt-group modify: Fix an update issue with diskparams

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

12 years agoMake x509 unittest testClockSkew a bit less flaky
Iustin Pop [Mon, 14 May 2012 09:33:04 +0000 (11:33 +0200)]
Make x509 unittest testClockSkew a bit less flaky

Since the tested function actually uses time.time(), it cannot be make
fully stable, but 1 second is very dangerous; let's just test SKEW * 2
and higher since that should be good (if the delta between _GenCert
and VerifyX509Certificate is 5 minutes, then…).

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

12 years agognt-group: Add info command
René Nussbaumer [Fri, 11 May 2012 13:27:58 +0000 (15:27 +0200)]
gnt-group: Add info command

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

12 years agocli: Make FormatParameterDict recursive
René Nussbaumer [Fri, 11 May 2012 13:15:35 +0000 (15:15 +0200)]
cli: Make FormatParameterDict recursive

This is useful if you have nested parameter dicts like in diskparams.

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

12 years agoquery: Expose diskparamters through query
René Nussbaumer [Fri, 11 May 2012 11:55:46 +0000 (13:55 +0200)]
query: Expose diskparamters through query

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

12 years agognt-cluster info: Print and format disk parameters
René Nussbaumer [Fri, 11 May 2012 09:47:35 +0000 (11:47 +0200)]
gnt-cluster info: Print and format disk parameters

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

12 years agoMerge branch 'devel-2.5'
Iustin Pop [Fri, 11 May 2012 13:48:32 +0000 (15:48 +0200)]
Merge branch 'devel-2.5'

* devel-2.5:
  Update NEWS and bump version for 2.5.1 release
  Fix gnt-group --help display
  Fix hardcoded Xen kernel path
  Fix grow-disk handling of invalid units
  Accept both PUT and POST in noded
  Preserve bridge MTU in KVM ifup script
  Update synopsis for “gnt-cluster repair-disk-sizes”
  Reconcile Makefile.am and test data files
  Workaround changed LVM behaviour
  Enable lvmstrap to run under Linux 3.x
  Add a default PATH variable to OS scripts env
  Move hooks PATH environment variable to constants
  Add note to the install doc about bridge MAC issues
  Fix exception re-raising in Python Luxi clients
  Fix LVM volume listing with newer LVM

Conflicts:
        NEWS (trivial)

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

12 years agoMerge commit 'v2.5.1' into devel-2.5
Iustin Pop [Fri, 11 May 2012 13:05:58 +0000 (15:05 +0200)]
Merge commit 'v2.5.1' into devel-2.5

* commit 'v2.5.1':
  Update NEWS and bump version for 2.5.1 release
  Fix gnt-group --help display
  Fix hardcoded Xen kernel path
  Fix grow-disk handling of invalid units
  Accept both PUT and POST in noded
  Preserve bridge MTU in KVM ifup script
  Update synopsis for “gnt-cluster repair-disk-sizes”
  Reconcile Makefile.am and test data files
  Workaround changed LVM behaviour
  Enable lvmstrap to run under Linux 3.x
  Add a default PATH variable to OS scripts env
  Move hooks PATH environment variable to constants
  Add note to the install doc about bridge MAC issues
  Fix exception re-raising in Python Luxi clients
  Fix LVM volume listing with newer LVM

Conflicts:
        lib/client/gnt_group.py (trivial, fixup conflicts from 6bc3ed14)

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

12 years agoRemove some duplicate code in the Xen config writing
Iustin Pop [Thu, 10 May 2012 18:26:39 +0000 (20:26 +0200)]
Remove some duplicate code in the Xen config writing

Should be straightforward; the only difference from before is that we
will remove the 'auto' file even during migration finalise.

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

12 years agoUpdate NEWS and bump version for 2.5.1 release v2.5.1
Iustin Pop [Fri, 11 May 2012 09:32:27 +0000 (11:32 +0200)]
Update NEWS and bump version for 2.5.1 release

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

12 years agoFix gnt-group --help display
Iustin Pop [Fri, 16 Mar 2012 10:59:01 +0000 (11:59 +0100)]
Fix gnt-group --help display

Copy-paste mismatch :)

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
(cherry picked from commit 36c70d4ddc508dd1ffdcc806d617d5100f4cb265)

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

12 years agoFix hardcoded Xen kernel path
Iustin Pop [Fri, 23 Mar 2012 09:08:41 +0000 (09:08 +0000)]
Fix hardcoded Xen kernel path

We already have a ./configure-time variable for this, but it seems to
be actually unused.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
(cherry picked from commit 3c4afa2e93d9499ce39c1aed575dacb549d35083)

Signed-off-by: Iustin Pop <iustin@google.com>
(trivial patch, let's cherry-pick it)
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoFix grow-disk handling of invalid units
Iustin Pop [Fri, 27 Apr 2012 10:04:59 +0000 (12:04 +0200)]
Fix grow-disk handling of invalid units

The reason why grow-disk was doing:

$ gnt-instance grow-disk instance3 0 -64
Unhandled Ganeti error: Invalid format

Is because it does it's own ParseUnit call, and doesn't transform that
into a nicer message.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
(cherry picked from commit c8bde61ea8360da67fc09339f1fe29ddd0acc374)

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

12 years agoAccept both PUT and POST in noded
Iustin Pop [Fri, 21 Oct 2011 21:51:39 +0000 (23:51 +0200)]
Accept both PUT and POST in noded

This is a partial cherry-pick from
7530364ddbe949bc34fc26f25ba3f5d921beb021 on master:

Currently, noded requires PUT, even though the semantics of the RPC
calls do not match a PUT. We change the code accept both PUT and POST,
with the intention to remove the PUT support in a later version.

Additionally, we add a message to the HttpBadRequest exception to make
clear the failure mode (not seeing any error message was what made me
send this patch…). This was the only description-less use of this
exception, by the way.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
(cherry picked from commit 7530364ddbe949bc34fc26f25ba3f5d921beb021)

What was not cherry-picked is the rpc change (to switch to PUT). The
reason I want to backport this to devel-2.5 is that when upgrading to
2.6, having noded accept both makes for an easier upgrade path.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
(cherry picked from commit 5d0566deaf5cd50f487c97ae6884bef0939db1c5)

Signed-off-by: Iustin Pop <iustin@google.com>

Yet another cherry-pick (must go deeper!); since we might not make a
new release from the devel-2.5 branch, let's add this to stable-2.5.

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

12 years agoPreserve bridge MTU in KVM ifup script
Andrea Spadaccini [Tue, 11 Oct 2011 13:39:05 +0000 (14:39 +0100)]
Preserve bridge MTU in KVM ifup script

Closes: #201 - KVM_IFUP does not set bridge-MTU on tap devices
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
(cherry picked from commit a1ec8695a6b453acdc2fa746a27be73c614b2e87)

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

12 years agoUpdate synopsis for “gnt-cluster repair-disk-sizes”
Michael Hanselmann [Thu, 3 Nov 2011 15:40:44 +0000 (16:40 +0100)]
Update synopsis for “gnt-cluster repair-disk-sizes”

Mention that instances can be passed on the CLI when “--help” is used.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Andrea Spadaccini <spadaccio@google.com>
(cherry picked from commit eb5ac108d146644200df98b9f90dae003dcea426)

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

12 years agoReconcile Makefile.am and test data files
Iustin Pop [Wed, 15 Feb 2012 16:02:33 +0000 (17:02 +0100)]
Reconcile Makefile.am and test data files

Sorry, forgot this in previous commit.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
(cherry picked from commit 1a1e7ab3f7cfe156152fb69961115a2c85b2a82d)

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

12 years agoWorkaround changed LVM behaviour
Iustin Pop [Wed, 15 Feb 2012 12:14:04 +0000 (13:14 +0100)]
Workaround changed LVM behaviour

The vgreduce command has changed behaviour from when we initially
wrote the code (2.02.02 versus 2.02.66, 4 years delta):

- if there are LVs which will be impacted, it requires --force
- otherwise refuses to proceed, but it still returns exit code 0

We handle this by looking to see if it returns "Wrote out consistent
volume group" (behaviour unchanged), or if it complains about
"--force"; in the case it didn't complete, we retry the operation.

We improve a bit the checking of "vgs", as it uses to fail silently
and we didn't detect it.

New tests for this function should test, I believe, all the expected
variations; at the least we now have data files with the expected
output.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
(cherry picked from commit 048eeb2b8faa15bfb94205f908538ae729d6ca27)

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

12 years agoEnable lvmstrap to run under Linux 3.x
Alexander Schreiber [Tue, 13 Mar 2012 16:34:52 +0000 (17:34 +0100)]
Enable lvmstrap to run under Linux 3.x

Extend the kernel version check to also accept Linux 3.x as valid.

Signed-off-by: Alexander Schreiber <als@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
(cherry picked from commit 1bf72492d381aacb5c488f1a87ac7665b9ddc6c7)

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

12 years agoapidoc: Fix some typos and errors introduced by my previous patches
René Nussbaumer [Thu, 10 May 2012 11:53:56 +0000 (13:53 +0200)]
apidoc: Fix some typos and errors introduced by my previous patches

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

12 years agobdev: Add a guard to verify disk parameters are set
René Nussbaumer [Tue, 8 May 2012 09:16:11 +0000 (11:16 +0200)]
bdev: Add a guard to verify disk parameters are set

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

12 years agoLUGroup*: Fix inheritance of disk parameters
René Nussbaumer [Wed, 4 Apr 2012 12:41:06 +0000 (14:41 +0200)]
LUGroup*: Fix inheritance of disk parameters

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

12 years agobdev: Take the params directly from disk without refill
René Nussbaumer [Wed, 4 Apr 2012 12:19:53 +0000 (14:19 +0200)]
bdev: Take the params directly from disk without refill

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

12 years agoSpecial case blockdev_find
René Nussbaumer [Fri, 4 May 2012 11:33:12 +0000 (13:33 +0200)]
Special case blockdev_find

Similiar to blockdev_create we sometimes do find on children. This fixes
those cases. However, this is not very nice.

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

12 years agoSpecial case blockdev_create
René Nussbaumer [Thu, 3 May 2012 09:08:38 +0000 (11:08 +0200)]
Special case blockdev_create

This is due to the nature of bdev. We spread some logic into cmdlib and
deal for example with it's children recursively. This makes it hard to
annotate the disk parameters in a generic way as we don't always deal
with the top most disk. But the disk parameters are depending on the top
device not on the children.

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

12 years agocmdlib: Adding annotation helper for special cases
René Nussbaumer [Tue, 8 May 2012 08:10:35 +0000 (10:10 +0200)]
cmdlib: Adding annotation helper for special cases

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

12 years agocmdlib: Remove all diskparams calculations not required anymore
René Nussbaumer [Wed, 4 Apr 2012 12:26:43 +0000 (14:26 +0200)]
cmdlib: Remove all diskparams calculations not required anymore

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

12 years agocmdlib: Adapt the rpc calls
René Nussbaumer [Wed, 4 Apr 2012 11:34:45 +0000 (13:34 +0200)]
cmdlib: Adapt the rpc calls

The following (blockdev) RPC calls are not converted yet (as they are
not straight forward or need more research):

* bdev_sizes
* blockdev_remove
* blockdev_shutdown
* blockdev_removechildren
* blockdev_close
* blockdev_getsize
* drbd_disconnect_net
* blockdev_rename (has already a special encoder, needs further research
  if needed at all)
* blockdev_getmirrorstatus (not sure if we have everywhere a clear link
  to the instance the disk belongs)
* blockdev_getmirrorstatus_multi (same here, further research)

Then special cases where we take care later in the patch series:

* blockdev_create (special cased)
* blockdev_find (special cased, like blockdev_create)

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

12 years agorpc: Adapt the callbacks to the new encoder type
René Nussbaumer [Tue, 3 Apr 2012 16:44:16 +0000 (18:44 +0200)]
rpc: Adapt the callbacks to the new encoder type

We change the cmdlib side on the next patch.

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

12 years agorpc: Adding new encoders for annotating disk parameters
René Nussbaumer [Tue, 3 Apr 2012 11:25:22 +0000 (13:25 +0200)]
rpc: Adding new encoders for annotating disk parameters

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

12 years agorpc: Adding helper to annotate disk params
René Nussbaumer [Tue, 3 Apr 2012 12:10:23 +0000 (14:10 +0200)]
rpc: Adding helper to annotate disk params

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

12 years agoconfig: Adding convenience method for disk parameters
René Nussbaumer [Fri, 30 Mar 2012 12:58:52 +0000 (14:58 +0200)]
config: Adding convenience method for disk parameters

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

12 years agoobjects: Add helper function to fill disk parameters
René Nussbaumer [Fri, 30 Mar 2012 12:40:12 +0000 (14:40 +0200)]
objects: Add helper function to fill disk parameters

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

12 years agoQA: Decorate tests with instance checks
Michael Hanselmann [Thu, 10 May 2012 09:54:47 +0000 (11:54 +0200)]
QA: Decorate tests with instance checks

Start using “InstanceCheck” decorator where appropriate. Use direct call
for check in places where the instance status changes during the test.

The parameters of “TestInstanceImport” had to be re-ordered to have the
instance as the first argument.

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

12 years agoQA: Infrastructure for hook script to check instance status
Michael Hanselmann [Thu, 10 May 2012 09:44:02 +0000 (11:44 +0200)]
QA: Infrastructure for hook script to check instance status

This script can be used to check if an instance is running or stopped at
various points during a QA run. Environment variables are used to pass
the most essential information.

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

12 years agoQA: Support passing keyword arguments to test functions
Michael Hanselmann [Thu, 10 May 2012 06:15:48 +0000 (08:15 +0200)]
QA: Support passing keyword arguments to test functions

Until now this wasn't possible.

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

12 years agoAdd a default PATH variable to OS scripts env
Iustin Pop [Wed, 9 May 2012 03:12:48 +0000 (05:12 +0200)]
Add a default PATH variable to OS scripts env

In commit 896a03f6 I cleaned up the environment for OS scripts,
however I think that was a bit too extreme - it breaks our own
instance-debootstrap hooks, because for example dpkg (called from the
grub script) requires PATH to be set.

Instead of requiring every OS to define a path, let's set a default
PATH for the OS scripts, which should cover most common uses. A more
specialised PATH can be set, if needed, in the OS scripts.

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

12 years agoMove hooks PATH environment variable to constants
Andrea Spadaccini [Tue, 1 Nov 2011 18:45:27 +0000 (18:45 +0000)]
Move hooks PATH environment variable to constants

Move the contents of the PATH environment variable for hooks to
constants, and use its value in the code and in the hooks documentation.

Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
(cherry picked from commit fe5ca2bbc103d25d159bc23b00c3acdfb024c0d2)
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

12 years agoAdd note to the install doc about bridge MAC issues
Iustin Pop [Tue, 8 May 2012 11:06:10 +0000 (13:06 +0200)]
Add note to the install doc about bridge MAC issues

Thanks to Faidon Liambotis for explaining this on the external IRC
channel.

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

12 years agoFix exception re-raising in Python Luxi clients
Iustin Pop [Tue, 8 May 2012 12:29:07 +0000 (14:29 +0200)]
Fix exception re-raising in Python Luxi clients

Commit e687ec01 (present in 2.5 since the 2.5 beta 3) did consistency
fixes across the code-base. Unfortunately this was done without enough
checks on the actual meaning of one of the fixes, which means error
re-raising in lib/errors.py is broken.

The problem is that:

  raise cls, args

is different than:

  raise cls(args)

And our unit-tests didn't catch this (this patch updates the tests).

This breakage is usually trivial, like wrong error messages:

  $ gnt-instance remove no-such-instance
  Failure: prerequisites not met for this operation:
  ("Instance 'no-such-instance' not known", 'unknown_entity')

versus:

  $ gnt-instance remove no-such-instance
  Failure: prerequisites not met for this operation:
  error type: unknown_entity, error details:
  Instance 'no-such-instance' not known

or:

  $ gnt-instance add … no-such-instance
  Failure: prerequisites not met for this operation:
  ('The given name (no-such-instance) does not resolve: Name or service not known', 'resolver_error')

versus:

  $ gnt-instance add … no-such-instance
  Failure: prerequisites not met for this operation:
  error type: resolver_error, error details:
  The given name (no-such-instance) does not resolve: Name or service not known

But in some cases where we rely on a certain data representation
(e.g. HooksAbort), this actually breaks because we try to iterate over
the wrong type:

  File "/usr/lib/python2.6/dist-packages/ganeti/cli.py", line 1907, in FormatError
     for node, script, out in err.args[0]:
  ValueError: need more than 1 value to unpack

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

12 years agoAllow clock skews in certificate verification
Iustin Pop [Wed, 9 May 2012 08:42:59 +0000 (10:42 +0200)]
Allow clock skews in certificate verification

Currently we allow for up to NODE_MAX_CLOCK_SKEW time difference
between nodes in some operations, but not everywhere: SSL certificate
verification (import/export, both intra and inter-cluster) has a zero
limit (downwards), and a week upwards. This can cause even
intra-cluster backup problems, if the source node has a time even two
seconds in the future.

To fix this, when we verify certificates compare with a time offset
with the max skew, which fixes the lower bound and reduces the upper
bound by an insignificant amount (0.04%).

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

12 years agoImprove formatting in the hooks documentation
Iustin Pop [Tue, 8 May 2012 10:54:54 +0000 (12:54 +0200)]
Improve formatting in the hooks documentation

The pyeval role generates literal (e.g. ``OP_CLUSTER…``) formatting,
which differs from the other headers. This is confusing, so let's add
a note that these are virtual operations, which makes the output more
consistent.

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

12 years agoAdd decoding of Luxi calls and unittests for LuxiOp
Iustin Pop [Mon, 7 May 2012 10:56:32 +0000 (12:56 +0200)]
Add decoding of Luxi calls and unittests for LuxiOp

This patch adds a hand-coded decoder for LuxiCall arguments, as the
data-structure is not uniform enough for automated generation (even
for the serialisation, we had to add hints for some fields,
de-serialisation is even harder).

It also fixes a tiny issue with WaitForJobChange job ID encoding, and
adds unittests for the encoding/decoding of LuxiOp structures.

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

12 years agoSome unit tests improvements
Iustin Pop [Mon, 7 May 2012 10:07:10 +0000 (12:07 +0200)]
Some unit tests improvements

In preparation for unit-testing the Luxi definitions, this improves
the auto-generation of OpCodes: currently this uses unbounded plain
Strings for names and fields, and this creates too big test sizes
(e.g. when automatically generating job sets).

Furthermore, there are some more cleanups: switching from liftM to
applicative style for easier definition, and some improvements in
generators.

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

12 years agoAuto-define a LuxiReq data type
Iustin Pop [Sat, 5 May 2012 04:18:39 +0000 (06:18 +0200)]
Auto-define a LuxiReq data type

We currently auto-generate a LuxiOp data type, which holds the entire
operation (including parameters). However, having a data type just for
the method call would be useful, so let's change THH to also
defineSADT for the Luxi constructors.

Currently I don't know how to match automatically a LuxiReq to its
LuxiOp counterpart (not even sure we need that), so any matching will
remain manual.

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

12 years agoReplace hardcoded constants with Constants.hs names
Iustin Pop [Sat, 5 May 2012 04:14:12 +0000 (06:14 +0200)]
Replace hardcoded constants with Constants.hs names

Now that luxi.py constants are exported, we can use them for more
consistency.

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

12 years agoFix Makefile dependencies for building Constants.hs
Iustin Pop [Sat, 5 May 2012 03:51:03 +0000 (05:51 +0200)]
Fix Makefile dependencies for building Constants.hs

I was wondering why my changes to luxi.py did not trigger the rebuild…

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

12 years agoCorrect capitalisation of two Luxi calls
Iustin Pop [Sat, 5 May 2012 03:42:48 +0000 (05:42 +0200)]
Correct capitalisation of two Luxi calls

Two Luxi calls have inconsistent an name/value mapping (in the Python
code):

- REQ_AUTOARCHIVE_JOBS versus AutoArchiveJobs (versus AutoarchiveJobs)
- REQ_QUEUE_SET_DRAIN_FLAG versus SetDrainFlag (no Queue)

While these are only a consistency issue, let's fix them so that the
Haskell code (which uses the auto-generated camel-case form) doesn't
need to handle them case specially, and looks more like the Python
code (hah, joke!).

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

12 years agoAdd a new JSON function
Iustin Pop [Sat, 5 May 2012 03:32:53 +0000 (05:32 +0200)]
Add a new JSON function

And its associated unittests.

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

12 years agoAdd design document for query path splitting
Iustin Pop [Wed, 18 Apr 2012 16:15:51 +0000 (18:15 +0200)]
Add design document for query path splitting

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

12 years agoFix LVM volume listing with newer LVM
Iustin Pop [Mon, 30 Apr 2012 22:33:20 +0000 (15:33 -0700)]
Fix LVM volume listing with newer LVM

Per commit 0304f0e, newer LVM has extended the lv_attr field. However,
that commit was incomplete as we examine this attribute in another
place in the code.

Thanks to user alperhome, the _LVSLINE_REGEX in lib/backend.py also
needs fixing. I've used the same change as in the above commit: accept
at minimum 6 characters, but allow for more.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>

12 years agoImplement reverse mapping of values to names
Iustin Pop [Fri, 4 May 2012 06:39:40 +0000 (23:39 -0700)]
Implement reverse mapping of values to names

This adds a bit of dumb mapping of values to names, while trying to be
safe. This is the best we can do without resorting to parsing or
interpreting ASTs.

The difference in the output is:

 -- | Converted from Python list or set ADMINST_ALL
 adminstAll :: [String]
-adminstAll = ["down", "offline", "up"]
+adminstAll = [adminstDown, adminstOffline, adminstUp]

Since for most such values we use strings, we don't gain in type
safety on the Haskell side. But it makes the output more readable and
it might open up other opportunities later.

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

12 years agoImplement support for multi-module export
Iustin Pop [Fri, 4 May 2012 06:11:30 +0000 (23:11 -0700)]
Implement support for multi-module export

This add support for exporting constants from multiple modules (as
opposed to hard-coding constants), and also makes the output more
readable by skipping things we know for sure we don't want to convert
(as opposed to things we would like to but don't know _how_ to
convert).

Additionally, we export the constants from the luxi module too.

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

12 years agoAdd missing qa/__init__.py file
Michael Hanselmann [Fri, 4 May 2012 12:34:16 +0000 (14:34 +0200)]
Add missing qa/__init__.py file

The file was there and listed in Makefile.am, but I forgot to add it to
commit a0c3e7264a.

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

12 years agoQA: Fix shutdown for reinstall/rename tests
Michael Hanselmann [Thu, 26 Apr 2012 17:57:29 +0000 (19:57 +0200)]
QA: Fix shutdown for reinstall/rename tests

The “RunTestIf” uses an AND association between the passed test names,
so the instance would be be shut down if both rename and reinstall were
enabled. Since this is not necessarily the case, OR must be used.

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

12 years agoQA: Enable use of OR conditions in test checks
Michael Hanselmann [Thu, 26 Apr 2012 17:35:46 +0000 (19:35 +0200)]
QA: Enable use of OR conditions in test checks

Until now “TestRunIf” and “TestEnabled” could only handle AND. With this
patch a new class named “Either” is added to “qa_config” and allows OR.
The name “Either” was chosen instead of “Or” as the latter is very close
to the reserved keyword “or”.

Examples:
  ["rapi", Either(["instance-rename", "instance-reboot"])]

  Either(["node-list", "instance-list", "job-list"])

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

12 years agoFurther fixes for new-style exception handling
Iustin Pop [Mon, 30 Apr 2012 23:53:59 +0000 (16:53 -0700)]
Further fixes for new-style exception handling

Commit 30d25dd8 moved the htools code to new-style exception handling,
but the hconfd code hasn't been, which fails when compiling on newer
GHC versions.

This patch does the rest of the move; however, the situation is not
very nice, we should have a better way to handle this (introduce
catchIO? or something like that).

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

12 years agoAdd NEWS entry for paramiko/pycrypto warnings
Iustin Pop [Mon, 30 Apr 2012 21:33:18 +0000 (14:33 -0700)]
Add NEWS entry for paramiko/pycrypto warnings

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>