Agata Murawska [Thu, 21 Jun 2012 13:09:27 +0000 (15:09 +0200)]
Human readable hcheck functionality
Full hcheck functionality is implemented in this patch. Hcheck runs
per-group checks, provides summary for the entire cluster and simulates
rebalance if required, the printing the modified metrics.
In this patch, only the human-readable output is available.
Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Agata Murawska [Wed, 20 Jun 2012 15:00:57 +0000 (17:00 +0200)]
Allowing rebalance to run silently
Part of hcheck's simulation required us to silently run hbal. For that
purpose we expose iterateDepth and allow it to run silently.
Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Agata Murawska [Thu, 21 Jun 2012 12:30:10 +0000 (14:30 +0200)]
Generalize functions used by both hspace and hcheck
As hspace and hcheck both use machine readable options, they require
similar functions - which are now generalized and moved to CLI and
Utils.
Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Agata Murawska [Thu, 14 Jun 2012 15:38:33 +0000 (17:38 +0200)]
Initial commit for introducting hcheck tool
Introduce infrastructure required to add Hcheck and build it
successfuly.
Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Michael Hanselmann [Fri, 22 Jun 2012 15:03:41 +0000 (17:03 +0200)]
NEWS: Improve formatting, wording
Clarify some things, use ```` where appropriate.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>
René Nussbaumer [Fri, 22 Jun 2012 08:56:28 +0000 (10:56 +0200)]
Prepare the update of the NEWS file
This updates the NEWS file for the upcoming rc1 release.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Tue, 19 Jun 2012 17:06:28 +0000 (19:06 +0200)]
Extend burnin to do NIC changes
This would have caught our previous issue, since QA otherwise doesn't
do add, remove or changes of NICs.
Signed-off-by: Iustin Pop <iustin@google.com>
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Tue, 19 Jun 2012 17:06:27 +0000 (19:06 +0200)]
Fix bug in instance net changes
_PrepareNicModification returns the invalid type, which triggers an
assert resulting in a mysterious error:
Failure: command execution error:
Without any explanation. We fix this by removing the return value from
_PrepareNicModification, and instead returning the expected type
(since it differs per create/modification) from the (existing)
wrappers for this function. We don't need to return actual changes
from this function as _ApplyNicMods is the function that
computes/returns the formatted changes.
Signed-off-by: Iustin Pop <iustin@google.com>
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Tue, 19 Jun 2012 14:24:21 +0000 (16:24 +0200)]
Update the hooks documentation
Also provide some extended unittests to catch those cases.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>
Michael Hanselmann [Tue, 19 Jun 2012 14:51:54 +0000 (16:51 +0200)]
QA: Fix modification of HV parameters via RAPI
This is basically another case of commit d488adb.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 19 Jun 2012 10:42:55 +0000 (12:42 +0200)]
bdev: Fix DRBD error reporting for syncer rate
The function is supposed to return a list, not a string. Without this
patch the error message ends up as “C, a, n, ', t, , c, h, a, n, g, e,
…”.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Iustin Pop [Mon, 18 Jun 2012 15:51:53 +0000 (17:51 +0200)]
Fix corner case in quick-check generated tests
Thanks to Agata Murawska, a random seed that generates bad test cases
was found ("seed was
1768143307 2118231514, test size 74"). This is
due to the fact that some nodes were generated with tMem=0, fMem=0,
which means that pMem was NaN and thus the node was not comparing
equal to itself.
Worked around by limiting the test case generation to nodes with
positive values; a better fix would be to compare nodes differently
(subset of properties or ignore NaN values).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Tue, 19 Jun 2012 08:05:03 +0000 (10:05 +0200)]
Change default for DRBD barriers
Commit
8a69b3a8 changed the DRBD barriers disabled by default if
“--disable-drbd-barriers” is used to “bfd”, where “d” stands for
disk-drain. DRBD's upstream updated their documentation[1] to
say disk drains should always be used.
[1] http://git.drbd.org/?p=drbd-8.3.git;a=commit;h=
f952dcfed57acf
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Iustin Pop [Fri, 15 Jun 2012 15:54:44 +0000 (17:54 +0200)]
Fix inconsistent punctuation in rapi docs and opcodes
While reviewing the RAPI docs (for commit
003306f9), I realised that
the punctuation used in RAPI is inconsistent, especially with regards
to definition lists.
This patch changes all such lists to not have punctuation, except for
one case (the ecode descriptions, which have multiple
paragraphs). Furthermore, it fixes the few opcodes which had docs
ending with punctuation to not do so anymore.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Fri, 15 Jun 2012 14:23:54 +0000 (16:23 +0200)]
Export more information in RAPI group queries
Sadly we don't have a way to test that, for example, all
(G|N|I)Q_CONFIG fields are exported in RAPI, so for now we don't test
this; but we should, in the future.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Fri, 15 Jun 2012 14:00:07 +0000 (16:00 +0200)]
QA: Fix breakage on cluster initialization
The hypervisors are a list and need to be comma-separated.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
René Nussbaumer [Fri, 15 Jun 2012 12:16:50 +0000 (14:16 +0200)]
Verify the options on diskparameters
This prevents from setting for example drbd options on the plain disk
template.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Fri, 15 Jun 2012 12:04:42 +0000 (14:04 +0200)]
Verify user supplied dicts against defaults
This verifies the user (especially in nested dicts) does not
provide a key which is not seen in the defaults dict for that dict.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Fri, 15 Jun 2012 13:14:47 +0000 (15:14 +0200)]
QA: Test some instance parameters depending on hypervisor
For example, the “initrd_path” parameter is only available with xen-pvm,
whereas “boot_order” is only available with xen-hvm.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Fri, 15 Jun 2012 13:14:57 +0000 (15:14 +0200)]
QA: Verify hypervisors, make available through functions
Some parts of QA should only be run with certain hypervisors (e.g.
testing instance HV parameters). To make that happen we always define
the cluster's hypervisors and provide a function to get the default
hypervisor.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Fri, 15 Jun 2012 11:21:52 +0000 (13:21 +0200)]
Fix cfgupgrade unittests
Sorry, I broke the cfgupgrade unittests via
904910c4, since that
commit added the requirement for the "instances" dict in the
configuration.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Thu, 14 Jun 2012 15:17:34 +0000 (17:17 +0200)]
Upgrade wrong iv_names at cfgupgrade time
Since Ganeti 2.6 does warn about disks with wrong iv_names, it would
be better to fix them when upgrading to 2.6.
Not sure if this is too brittle and whether we want to add more
safeguards on the contents of the config/instance/disks before
touching them.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Wed, 13 Jun 2012 16:35:13 +0000 (18:35 +0200)]
query2: Add <, >, <=, >= comparison operators
These can be used, for example, to get jobs submitted after a certain
timestamp.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Wed, 13 Jun 2012 10:35:35 +0000 (12:35 +0200)]
Fix creation of plain instances with --no-wait-for-sync
As reported on the devel mailing list by Christos Stavrakakis,
creation of plain instances is broken when the --no-wait-for-sync flag
is passed, because in that case WaitForSync is not called, hence
SetDiskID is not called at all, resulting in a None physical_id being
passed to backend.
We fix that by explicitly calling SetDiskID, which will cover the
pause/resume and os_add RPC calls.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Bernardo Dal Seno [Sat, 17 Mar 2012 22:08:15 +0000 (23:08 +0100)]
Fixed typos, formatting, etc and added a comment
This patch only touches comments and man pages.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Tue, 12 Jun 2012 12:38:00 +0000 (14:38 +0200)]
Fix daemon-util with non-root user models
Commit
4b42c3d6 broke non-root user mode since, while trying to do a
cleanup a move all local variable definitions to the start of the
function; however, the plain_name var is only defined later, so this
actually doesn't work.
Note that enabling set -u doesn't _directly_ work, since we rely on
some variables which are usually undefined (EXTRA_*_ARGS, etc.). It
can be fixed, but in a later patch.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Iustin Pop [Mon, 11 Jun 2012 15:03:41 +0000 (17:03 +0200)]
Bump version for beta 2 release
I've added the changes under beta1, not beta2, since it's easier to
keep it separate.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Mon, 11 Jun 2012 15:28:06 +0000 (17:28 +0200)]
Fix epydoc raises L{...} usage
For epydoc raise statement, it already expects an exception which will
be hyperlinked; if passing an L{…} construct, it will instead break
the formatting (the @raise will not be recognised, but merged into the
previous paragraph).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Mon, 11 Jun 2012 13:56:13 +0000 (15:56 +0200)]
Merge branch 'stable-2.5' into stable-2.6
* stable-2.5:
Fix race condition in test for *FileID functions
Move KVM keymap from GenerateRuntime to ExecuteRuntime
Add the keymap directory to the list of runtime KVM dirs
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Wed, 30 Nov 2011 11:49:09 +0000 (12:49 +0100)]
Fix race condition in test for *FileID functions
In this test the “file ID” of a temporary file is compared against the
file ID gathered via an open file descriptor to the same file. For
reasons unknown to me utime(2) is called in-between to update the
inode's a- and mtime. Depending on the file system's timestamp
resolution this can lead to a different file ID.
Found by chance during QA and reproduced by adding a delay before the
call to utime(2).
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
(cherry picked from commit
fbd554349825752a36c59c1598a512936a22d013)
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Mon, 11 Jun 2012 12:48:09 +0000 (14:48 +0200)]
Move KVM keymap from GenerateRuntime to ExecuteRuntime
Per issue 243, "side-effects" are GenerateRuntime are bad as they
execute only on the initial node of the instance. By moving the
write-out of the keymap file to ExecuteRuntime, it will be done both
at start and at migrate time.
Furthermore, we update the docstring of GenerateKVMRuntime to explain
this, and add a fixme related to the spice per-interface binding.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Mon, 11 Jun 2012 12:19:57 +0000 (14:19 +0200)]
Add the keymap directory to the list of runtime KVM dirs
Commit
4f580fef added the keymap support, but missed that this
directory needs to be ensured/created at hypervisor init time.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Mon, 11 Jun 2012 10:40:15 +0000 (12:40 +0200)]
Fix make -n use
Due to the way $(MAKE) behaves (it forces execution of the commands
that contain it), use of $(MAKE) in a command line together with
side-effects commands will break stuff. It's better to keep it either
on a separate line, or if not possible, move said commands to a
separate make target.
After this patch, make -n distcheck, make -n regen-vcs-version and
possibly other commands now work correctly.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Mon, 11 Jun 2012 09:15:59 +0000 (11:15 +0200)]
Enable hlint in lint and reorganise this target
Currently, the lint target does a sequential: pep8, pylint, pylint on
the QA sources. hlint is run only when explicitly requested.
This patch reorganises the lint target by:
- splitting the current lint target into separate pylint (slow),
pylint-qa (fast), pep8 (fast) targets
- making lint itself depend on the above plus hlint
- both pep8 and hlint are optional, based on whether the said binaries
were detected at configure time
make -j is slightly faster after this patch (1m18s → 1m7s).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Fri, 8 Jun 2012 14:23:16 +0000 (16:23 +0200)]
Improve error message for auto-promote/node modify
This has been reported internally 3-4 times already, and the current
version (from
8b437a6e) is still not good enough, it seems.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Fri, 8 Jun 2012 11:48:14 +0000 (13:48 +0200)]
Fix QA import of existing instances
Commit
f346a7d9 broke the TestInstanceImport test in QA, since it
dropped the "always generate" parameter for backup import. We add an
override mac parameter so that, no matter what is defined in the
config file, imported instances (can) have a different MAC.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Iustin Pop [Fri, 8 Jun 2012 09:44:34 +0000 (11:44 +0200)]
Remove one obsolete hlint override
During the preparations for 2.6, we cleaned up the codebase to use
newer exceptions (e.g. commits
30d25dd8,
79ac58fa), so we can now drop
this override.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Fri, 8 Jun 2012 09:40:43 +0000 (11:40 +0200)]
Fix prefix bug in Haskell ssconf implementation
This patch fixes a (brown-bag) bug in the ssconf implementation where
the looked-for filenames were not prefixed with the ssconf file
prefix.
Additionally, a test for this is added (which fails without the fix).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Fri, 8 Jun 2012 10:44:28 +0000 (12:44 +0200)]
Move the ssconf file prefix constant to constants.py
This way, it can be reused in the Haskell code too.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Wed, 6 Jun 2012 17:15:05 +0000 (19:15 +0200)]
QA: Add configuration options for static MAC address
In some QA environments static MAC addresses must be used.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 6 Jun 2012 10:54:32 +0000 (12:54 +0200)]
QA: Ignore tags using regular expression
In some QA environments external scripts may add tags. With this patch a
regular expression can be used to ignore them during QA runs.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Iustin Pop [Wed, 6 Jun 2012 10:54:56 +0000 (12:54 +0200)]
Merge branch 'stable-2.5' into stable-2.6
* stable-2.5:
Fix parallel build failures
QA: Add default setting for tests
Conflicts:
Makefile.am (expected, from the parallel build fixes)
qa/qa_config.py (due to cherry-pick, ignored, simply checkout out with --ours)
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Iustin Pop [Wed, 6 Jun 2012 09:34:33 +0000 (11:34 +0200)]
Fix parallel build failures
This is the 2.5 version of the "fix build failures":
- man/%.gen could be left over even in case of failure, due to
automake bug
- make man/%.gen runs RUN_IN_TEMPDIR, so let's depend on it, since
that target has the proper dependencies (create needed dirs)
- man/%.gen depends on a number of built sources, but the dependency
was not declared
Furthermore, wraps a long comment.
Tested with -j4/-j16, after `make maintainer-clean'.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Fri, 20 Apr 2012 18:53:42 +0000 (20:53 +0200)]
QA: Add default setting for tests
Commit
1010ec70b1 enabled all tests by default. In some scenarios where
the configuration is static one may not want newly added tests to be
run.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
(cherry picked from commit
59a8fe485e107df7fac3bfc85ff38b2bf006ab6c)
Iustin Pop [Tue, 5 Jun 2012 09:54:10 +0000 (11:54 +0200)]
QA: add toggle for fewer common instance tests
Currently, the "common" instance tests (shutdown, rapi stopped
console, stopped modify, startup, rapi shutdown, rapi startup, list,
info, modify, rapi modify , console, rapi console, reinstall, rename,
rapi rename, rename and back, rapi rename and back, grow disk, reboot,
tags, cluster verify, rapi test instance, node list, job list) are run
4 times:
- one time for plain instance created via RAPI, using client
- one time for plain instance created via RAPI, without client
- one time for plain instance created via gnt-instance
- one time for DRBD instance created via gnt-instance
This makes the QA long, and is over-doing it (for non-full QAs): an
instance created via RAPI (either client) and via gnt-instance should
have the same parameters, but our duplicate tests do not ensure that,
just that instances behave OK.
This patch adds a toggle so that we can skip the common tests for
RAPI-created instances; the creation/deletion is still performed, but
all the other operations are not. This reduces the time of a "quick"
QA by ~20% (1h:15m → 1h).
The common tests will still be run (unconditionally) for
gnt-instance-created instances.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Iustin Pop [Tue, 5 Jun 2012 09:31:22 +0000 (11:31 +0200)]
QA: stop logging SSH arguments for each invocation
Currently, this is how the QA log looks like:
Command: ssh -oEscapeChar=none -oBatchMode=yes -l root -t -oStrictHostKeyChecking=yes -oClearAllForwardings=yes -oForwardAgent=yes -oControlPath=/tmp/ganeti-qa-multiplexer.DMzkuH -oControlMaster=no node14 exit
Command: ssh -oEscapeChar=none -oBatchMode=yes -l root -t -oStrictHostKeyChecking=yes -oClearAllForwardings=yes -oForwardAgent=yes node8 exit
Command: ssh -oEscapeChar=none -oBatchMode=yes -l root -t -oStrictHostKeyChecking=yes -oClearAllForwardings=yes -oForwardAgent=yes node18 exit
And these arguments are repeated over and over. This patch proposes to
log once the arguments, at the beginning of the QA (so that the SSH
commands can be reproduced, if needed) and then drop them from the
log. The new output looks like:
SSH command for primary node: ssh -oEscapeChar=none -oBatchMode=yes -lroot -oStrictHostKeyChecking=yes -oClearAllForwardings=yes -oForwardAgent=yes -oControlPath=/tmp/ganeti-qa-multiplexer.24lgrK -oControlMaster=no node14
SSH command for other nodes: ssh -oEscapeChar=none -oBatchMode=yes -lroot -oStrictHostKeyChecking=yes -oClearAllForwardings=yes -oForwardAgent=yes NODE
(the above are the informational messages about parameters, then)
Command: ssh node14 exit
Command: ssh node8 exit
Command: ssh node18 exit
This makes the QA log much more readable, by dropping unneeded clutter
(look how long the original lines were), and hopefully also a bit
smaller (current QA log is > 100MB of text output).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Iustin Pop [Fri, 1 Jun 2012 15:41:22 +0000 (17:41 +0200)]
Switch QA to tty-less mode
This makes ssh generate much less noise when QA is run itself without
a tty, as otherwise we get thousands of lines of:
Pseudo-terminal will not be allocated because stdin is not a terminal.
in the QA logs (which are already big enough).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
Iustin Pop [Thu, 31 May 2012 15:00:37 +0000 (17:00 +0200)]
Fix a type issue and bad logic in cluster verification
Commit
2e04d454 introduced the new offline state for the instance
state, but being a big monolithic patch it sneaked in something that
doesn't make sense.
The checks for extra instances (either wrongly up or just unknown) are
done purely on a name-basis, not on objects, so the types there are
wrong. Furthermore, they have no relation to the admin state of the
instance, so we just drop the entire if block. We keep the increment
of the offline instance count, but move it to a different loop over
instances.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
René Nussbaumer [Fri, 1 Jun 2012 09:44:49 +0000 (11:44 +0200)]
Make the xen-cmd test more readable and portable
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Thu, 31 May 2012 14:54:10 +0000 (16:54 +0200)]
doc/hooks: Clarify hook directory structure
I was not able to find where the “.d” suffix is documented, so this
clarification should make it more obvious.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
René Nussbaumer [Thu, 31 May 2012 08:27:38 +0000 (10:27 +0200)]
Support xl as a xen interface command
xm and xl are mostly compatible, there is just a change in migrate,
which for now we simple bridge by comparing the command string.
Also XEN_CMD is now set during configure time. This will then be fixed
in Ganeti 2.7 when we make it an hvparams.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
René Nussbaumer [Thu, 31 May 2012 08:54:13 +0000 (10:54 +0200)]
Add XEN_CMD to _autoconf.py
This is needed so we can specify the xen command upon configure time
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
René Nussbaumer [Wed, 30 May 2012 09:17:39 +0000 (11:17 +0200)]
Fix GenericCurlConfig when pycurl is linked against nss
Redhat links its pycurl against NSS/ so this check fails and therefore
makes ganeti-watcher unusable.
Even though this seems to fix the problem and works, further testing on
this might be needed.
Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Wed, 30 May 2012 09:35:04 +0000 (11:35 +0200)]
Fix a tiny typo in a design doc
Reported by user ewoud, thanks!
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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)
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>