Guido Trotter [Fri, 18 Jan 2013 14:06:33 +0000 (15:06 +0100)]
kvm: remove last version-based feature detection
This was left behind because it required a different kvm invocation.
Now that we can add new ones cheaply (two constants) it's easy to get
rid of it. Differently than in other cases we support old version which
don't have the actual option, and error out when it's invoked.
This also removes two hardcoded strings, and brings them at constant
level. A lot more are present, but two is megl che one (cit).
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 18 Jan 2013 14:06:33 +0000 (15:06 +0100)]
kvm: extract a regexp matching out of a for loop
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 18 Jan 2013 13:54:08 +0000 (14:54 +0100)]
kvm: deduplicate 'get output' code
We had the same code twice, and were about to add a third time. Better
to collapse it into just one function.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Fri, 18 Jan 2013 12:57:50 +0000 (13:57 +0100)]
Make Xen config path a build-time option
Stop hardcoding the path in “hv_xen.py”.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Fri, 18 Jan 2013 13:00:04 +0000 (14:00 +0100)]
Makefile.am: Protect placeholders for sed
If the placeholder has exactly the same name as the variable used in
autoconf it would be replaced as well. In the case of
“@ENABLE_SPLIT_QUERY@” this led to the sed command “s#False#False#g”.
Inserting additional quotes after the first @ sign prevents this.
Since ENABLE_SPLIT_QUERY was not actually used it is removed.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michael Hanselmann [Fri, 18 Jan 2013 13:13:56 +0000 (14:13 +0100)]
burnin: Don't keep hypervisor class around
Just determine whether it can migrate and keep that value instead of the
full hypervisor class.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Yiannis Tsiouris [Wed, 16 Jan 2013 15:02:16 +0000 (17:02 +0200)]
Text wrap in Haskell code
This adds two functions in Utils.hs: 'wrap' and 'trim' along with some
simple tests. 'wrap' is used in Common.hs for wrapping command
descriptions to a fixed line length, e.g. useful for the "--help"
option.
Signed-off-by: Yiannis Tsiouris <gtsiour@softlab.ntua.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Constantinos Venetsanopoulos [Thu, 17 Jan 2013 15:49:13 +0000 (17:49 +0200)]
Run pre-migrate hooks on primary node too
Signed-off-by: Constantinos Venetsanopoulos <cven@grnet.gr>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Thu, 17 Jan 2013 14:41:09 +0000 (15:41 +0100)]
Makefile: Allow tarball creation when man-in-doc is active
Documentation with included man pages should not be distributed as it
contains fixed paths. Since the documentation with man pages is actually
written to a separate directory, tarball creation is still possible.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Dimitris Aragiorgis [Wed, 16 Jan 2013 17:24:44 +0000 (19:24 +0200)]
Check if KVM machine version is supported
If machine version is passed as an hv param, a check is made
in target node whether this version is included in the supported
ones derived from kvm -M ? command.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Wed, 16 Jan 2013 17:34:05 +0000 (18:34 +0100)]
Revert "run-in-tempdir: Improve speed"
This reverts commit
dd60179dfd8 as it broke coverage for Python.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Bernardo Dal Seno [Sun, 13 Jan 2013 17:47:27 +0000 (18:47 +0100)]
Verify that templates are compatible with exclusive storage
cluster-verify reports instances with disk templates not compatible with
exclusive storage but that are running on nodes with the exclusive storage
flag set.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Bernardo Dal Seno [Sun, 13 Jan 2013 15:37:11 +0000 (16:37 +0100)]
cluster-verify checks that PVs are not shared
When exclusive_storage is set, cluster-verify complains if PVs are shared
among unrelated LVs.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Bernardo Dal Seno [Sun, 13 Jan 2013 14:54:33 +0000 (15:54 +0100)]
bdev.GetPVInfo() returns list of LVs
This will be used for checks related to exclusive storage.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Bernardo Dal Seno [Fri, 11 Jan 2013 16:45:31 +0000 (17:45 +0100)]
Moved checks within LUClusterVerifyGroup
Almost all instance-specific checks have been moved from the Exec method to
the _VerifyInstance method. This cleans up Exec, which was becoming too big
even for pylint…
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Bernardo Dal Seno [Fri, 7 Dec 2012 18:19:02 +0000 (19:19 +0100)]
add-node checks PVs
add-node now performs a few checks on LVM before adding a node to the
cluster.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Bernardo Dal Seno [Mon, 10 Dec 2012 03:58:55 +0000 (04:58 +0100)]
New RPC call for node verify in dns-only RPC client
This will be used in node-add.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Bernardo Dal Seno [Thu, 6 Dec 2012 17:01:11 +0000 (18:01 +0100)]
cluster-verify checks uniformity of PV sizes
When exclusive_storage is set, cluster-verify complains if the size of PVs
is not uniform across a node group.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Bernardo Dal Seno [Tue, 8 Jan 2013 20:54:29 +0000 (21:54 +0100)]
utils.LvmExclusiveCheckNodePvs() returns more info
utils.LvmExclusiveCheckNodePvs() now returns the size of the smallest and
biggest PVs of a node. They will be used for cross-node consistency checks.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Bernardo Dal Seno [Sun, 13 Jan 2013 15:07:19 +0000 (16:07 +0100)]
cluster-verify checks uniformity of exclusive_storage flag
The value of the flag should be the same for nodes within the same group.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Bernardo Dal Seno [Mon, 7 Jan 2013 16:10:06 +0000 (17:10 +0100)]
Small cleanup in constants.py
- compat.UniqueFrozenset used in one more place, for consistency.
- The order of NV_XXX constants is fixed so that all values are now sorted
by name.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Wed, 16 Jan 2013 15:40:54 +0000 (16:40 +0100)]
run-in-tempdir: Improve speed
By creating symlinks instead of actually creating files we still get the
benefits of using a temporary directory, but the preparation is about
three times as fast. Test used:
$ time bash -c 'for ((i=0; i < 100; ++i)); do
autotools/run-in-tempdir true; done'
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Michael Hanselmann [Wed, 16 Jan 2013 15:16:35 +0000 (16:16 +0100)]
run-in-tempdir: Copy doc/* only if needed
To preserve disk space on copying all files to a temporary directory,
the “doc” directory is only copied when building documentation. A
comment describing the need is also added to Makefile.am, as well as a
superfluous direct invocation of Bash removed.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Tue, 8 Jan 2013 14:18:52 +0000 (15:18 +0100)]
Integrate DRBD with the report generation infrastructure
With this commit, the DRBD data collector does not only print the data
it extracts, but includes them in the proper JSON structure common to
all the data collectors, as prescribed by the design document.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michele Tartara [Tue, 8 Jan 2013 14:12:21 +0000 (14:12 +0000)]
Add reporting infrastructure for data collectors
This commit adds the part of the JSON report generation code that will be
common to all the data collectors, according to the format specified in the
design document.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michele Tartara [Wed, 16 Jan 2013 13:03:01 +0000 (13:03 +0000)]
Move getCurrentTime from Confd.Utils to Utils
The getCurrentTime function is of wide interest, so its moved to a more
appropriate position.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 15 Jan 2013 15:31:49 +0000 (16:31 +0100)]
burnin: Add unittest for supported disk templates
When new a new disk template is added, burnin should be updated.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Mon, 14 Jan 2013 08:54:08 +0000 (08:54 +0000)]
kvm: make kvm path configurable as an hv parameter
This fixes Issue 225.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Mon, 14 Jan 2013 08:45:41 +0000 (08:45 +0000)]
make _{Generate,Execute}KVMRuntime accept kvm help
Currently kvm --help is called twice at instance startup, this makes
sure it's called only once.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Mon, 14 Jan 2013 08:38:05 +0000 (08:38 +0000)]
kvm: make auxiliary functions accept a kvm path
This will be used to be able to customize the path in an hv parameter.
Also fix two comments that still mentioned version-based checking.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Dimitris Aragiorgis [Tue, 15 Jan 2013 01:56:48 +0000 (03:56 +0200)]
Add KVM machine version as hv param
This is needed in case an instance must be booted with an exact type of
machine version (due to e.g. outdated drivers). If this hv param
explicitly defined (during instance creation/modification) then the kvm
process will be started having this version for the -M option. Otherwise
the default (derived from _GetDefaultMachineVersion() will be used.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Tue, 15 Jan 2013 15:35:06 +0000 (16:35 +0100)]
Move burnin to ganeti.tools.burnin
Similar to other scripts, “tools/burnin” just becomes a wrapper script.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Tue, 15 Jan 2013 16:24:43 +0000 (17:24 +0100)]
Remove special-case of "0" in niceSort
Since now niceSort is more consistently behaved, we don't have the
special casing. This should have been removed in commit
a7f0953a, but
I didn't realise it.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Tue, 15 Jan 2013 15:31:38 +0000 (16:31 +0100)]
burnin: Enable DT_EXT/DT_RBD for single node clusters
As reported by Constantinos Venetsanopoulos, DT_RBD and DT_EXT work on
single node clusters.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Dato Simó [Tue, 15 Jan 2013 14:03:29 +0000 (14:03 +0000)]
test/Types.hs: add an HLint ANN for ignoring camelCase
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 8 Jan 2013 15:21:29 +0000 (16:21 +0100)]
Link man pages in documentation
This patch depends on “Option to include man pages in documentation”. In
the documentation build including man pages, all “:manpage:`…`”
references are converted to links. For man pages not provided by Ganeti,
Sphinx' standard formatting is used.
A small dance is necessary to hook into Sphinx' processing of man page
roles and to generate automatically resolved links. The code converts
“:manpage:`…`” for known man pages to the data structure equivalent of
“:doc:`$name($section) <man-$name>`”. Additionally it checks the section
numbers and formatting of references (in all builds).
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Mon, 14 Jan 2013 14:16:28 +0000 (15:16 +0100)]
Make niceSort a wrapper over niceSortKey id
Currently, niceSort behaves differently than niceSortKey in cases
where the parsed groups are equal but the original not, as it uses
both members of the tuple as opposed to just the first one. Both
niceSortKey and the Python code use only the first one, so in corner
cases we can have different behaviour of these functions.
To rectify this, we change niceSort to be a simple wrapper over
"niceSortKey id", so that we get consistent behaviour.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Mon, 14 Jan 2013 15:16:10 +0000 (16:16 +0100)]
Add version check for Sphinx
Sphinx 1.0 and above can check version by setting “needs_sphinx” in the
configuration.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Wed, 9 Jan 2013 11:10:57 +0000 (12:10 +0100)]
Option to include man pages in documentation
Before this patch, HTML versions of man pages (man/*.rst) were already
built. However, since they are separate from the normal documentation,
their content is not indexed for Sphinx' search functionality.
Additionally it would simply be nice to have everything in one place.
To this end a new configure-time option is added to enable the inclusion
of man pages into the documentation. A dedicated option is necessary to
still be able to provide a static documentation build in the tarball
(not including man pages) as man pages contain build-specific paths and
values. The documentation with man pages is written to the directory
“doc/man-html”.
A future patch will extend Sphinx to link occurences of “:manpage:`…`”
to these man pages.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Dato Simó [Mon, 14 Jan 2013 20:41:46 +0000 (20:41 +0000)]
design-autorepair.rst: separate list of jobs with plus sign
Commas are not valid characters in tags, hence they can't be use to
separate the different job IDs; plus signs (+) are available, and not too
bad.
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 15 Jan 2013 11:07:18 +0000 (12:07 +0100)]
burnin: Disk template option cleanup
Burnin doesn't support all disk templates (specifically it doesn't
support “blockdev”). The code, however, used manually composed lists in
some places, constants.DISK_TEMPLATES in others, and an internal list of
supported templates in some.
This patch changes burnin to only use its internal list of supported
disk templates.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Tue, 15 Jan 2013 10:59:16 +0000 (11:59 +0100)]
burnin: Factorize disk template lists
Keep the lists at the top instead of having them embedded in the code.
Use frozenset, too.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Thu, 10 Jan 2013 17:26:53 +0000 (18:26 +0100)]
Replace nodegroups' PartialNic by PartialNicParams
This fixes a bug that corrups the config when one adds a
network to a node group. I wil soon extend QA by some commands
that would have detected this.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Dato Simó [Wed, 9 Jan 2013 18:12:14 +0000 (18:12 +0000)]
Loader.hs: ignore expired ArSuspended policies
At the moment, because 'mergeData' is pure, it may set instance auto-repair
policies that are of the form `ArSuspended $ Until timestamp_in_the_past`.
If later on the auto-repair tool notices this, it has lost access to what
would be the next-in-line policy to use (and would have to re-parse all
tags again).
To avoid this, we pass the current time to 'mergeData' from ExtLoader.hs,
and we propagate it to Loader.getArPolicy. ExtLoader.loadExternalData is in
the IO monad, so it has ready access to getClockTime.
A few other places were calling 'mergeData' directly. For Hscan.hs and
IAlloc.hs, we add appropriate calls to getClockTime. For files under test/,
we use a current time of 0.
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Dato Simó [Wed, 12 Dec 2012 12:45:37 +0000 (12:45 +0000)]
Loader.hs: set instance auto-repair policy in mergeData
'getArPolicy' and 'setArPolicy' follow the precedence rules introduced in
b1eb71c: within an object, the most restrictive tag wins; across object,
the nearest tag wins.
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Dato Simó [Thu, 13 Dec 2012 19:29:14 +0000 (19:29 +0000)]
design-autorepair.rst: clarify tag precedence and conflict
This commit clarifies one particular point of the auto-repair workflow:
what to do when multiple, conflicting administrator-set tags exist in an
object; and how tags at different levels (cluster, node group and instance)
interact.
For conflict within an object, we choose to always let the most restrictive
tag win (i.e. the least destructive repair, and the longest suspension
time). For tags at different levels, we follow a simple "nearest tag wins"
rule.
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Dato Simó [Wed, 12 Dec 2012 12:42:15 +0000 (12:42 +0000)]
Loader.hs: rewrite extractExTags to use chompPrefix
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Dato Simó [Wed, 10 Oct 2012 20:08:03 +0000 (21:08 +0100)]
Utils.hs: function to chomp prefix + separator from a string
Some auto-repair tags are composed of a prefix and then an optional
argument; the new "chompPrefix" function in Utils.hs allows to strip a
prefix, allowing the last character (the separator) to be absent if there
is no argument.
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Dato Simó [Fri, 7 Dec 2012 10:56:35 +0000 (10:56 +0000)]
Utils.hs: add a clockTimeToString function
This function allows to easily convert a ClockTime object to a string
representation of its timestamp (seconds-only).
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Dato Simó [Fri, 7 Dec 2012 10:19:37 +0000 (10:19 +0000)]
Instance.hs: add an 'arPolicy' field for auto-repair policy
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Dato Simó [Fri, 14 Dec 2012 22:13:38 +0000 (22:13 +0000)]
design-autorepair.rst: add a graph with state transitions
The graph added here follows the data types introduced in 7ec2f76, by which
"Suspended" is not a state, but a possible value of the auto-repair policy.
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Dato Simó [Wed, 12 Dec 2012 12:45:27 +0000 (12:45 +0000)]
HTools/Types.hs: more auto-repair types
AutoRepairPolicy, AutoRepairStatus, and other auxiliary types are added.
These are used only internally by the auto-repair tool, and parsed from the
various object tags as defined in the design doc.
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Dato Simó [Fri, 16 Nov 2012 22:16:10 +0000 (22:16 +0000)]
Add initial constants and Haskell ADTs for auto repair
In this commit, the AutoRepairType and AutoRepairResult types are defined,
with the possible values specified in doc/design-autorepair.rst.
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Dato Simó [Thu, 6 Dec 2012 20:08:52 +0000 (20:08 +0000)]
design-autorepair.rst: use the same prefix everywhere
This commit changes the "ganeti:watcher:repair:pending" and
"ganeti:watcher:repair:result" tag prefixes to use
"ganeti:watcher:autorepair:{pending,result}", so that the same prefix is
used in all cases.
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Mon, 14 Jan 2013 14:21:52 +0000 (15:21 +0100)]
NEWS: Fix referenced man page's section number
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Guido Trotter [Mon, 14 Jan 2013 14:12:22 +0000 (15:12 +0100)]
kvm: add two help dump files
One is the --help output for kvm 1.1.2 and the second one is the same as
0.9.1 but with a fake option added between -drive and its boot=on|off
option: this tests that if boot=on|off appears in another option after
-drive it is not accepted by our regexp.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Mon, 14 Jan 2013 14:53:26 +0000 (15:53 +0100)]
Update copyright in documentation
Use range() instead of building the list manually. Keeps the code
shorter starting next year.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Reviewed-and-lolled-by: Iustin Pop <iustin@google.com>
Guido Trotter [Fri, 11 Jan 2013 18:11:13 +0000 (19:11 +0100)]
kvm: Add -vga option
As requested in Issue 69.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 11 Jan 2013 18:03:40 +0000 (19:03 +0100)]
kvm: Add kvm_extra parameter
As requested in Issue 261 and many other times.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 11 Jan 2013 17:47:09 +0000 (17:47 +0000)]
kvm: support usb devices
All in one go, comma separated usb devices of all types.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 11 Jan 2013 17:32:13 +0000 (17:32 +0000)]
Allow -soundhw option to kvm
For all of us that love to listen to music on our kvm virtual machines,
the -soundhw option is paramount.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 11 Jan 2013 16:47:47 +0000 (17:47 +0100)]
kvm: simplify _GetMachineVersion
Use a multiline regexp rather than a single line one, and then split
lines in the code.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 11 Jan 2013 16:41:58 +0000 (17:41 +0100)]
kvm: use help based feature detection
As discussed on the list some people backport features to different kvm
versions, making the version based detection system unreliable. We
change wherever we can to detection on the help output.
This also fixes Issue 250
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 11 Jan 2013 16:25:43 +0000 (16:25 +0000)]
kvm: abstract getting --help output
This will be used later, for now nothing changes.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 11 Jan 2013 15:55:48 +0000 (16:55 +0100)]
kvm: always pass -usb
This will be the default anyway and it was a mistake to pass it only if
the mouse was specified.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Mon, 14 Jan 2013 10:00:50 +0000 (10:00 +0000)]
Add a non negative int hypervisor parameter check
...and use it for a few parameters for which it makes sense.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 11 Jan 2013 15:49:11 +0000 (16:49 +0100)]
kvm: allow setting smp cores, threads, sockets
This was requested in Issue 322.
Note that maxcpus is not implemented yet, as it should be considered in
a cpu-hotplug global context.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Guido Trotter [Fri, 11 Jan 2013 15:13:11 +0000 (15:13 +0000)]
kvm: add serial console speed
The serial port speed changed between versions of qemu (what didn't?), so
the old hardcoded default doesn't do anymore. Upgrade it to a parameter.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Mon, 14 Jan 2013 08:30:07 +0000 (09:30 +0100)]
Merge branch 'devel-2.6'
* devel-2.6:
QA: Use instance name for rename test
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Fri, 11 Jan 2013 16:19:13 +0000 (17:19 +0100)]
Merge branch 'stable-2.6' into devel-2.6
* stable-2.6:
QA: Use instance name for rename test
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Fri, 11 Jan 2013 13:59:03 +0000 (14:59 +0100)]
QA: Use instance name for rename test
Reported in issue 341. In some setups the instance live in a different
netblock from the cluster. Therefore a the configuration-global “rename”
name shouldn't be used for them. Instead another instance name is used.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Dimitris Aragiorgis [Tue, 8 Jan 2013 15:35:54 +0000 (17:35 +0200)]
Add locking to _NetworkQuery
Make use of _GetNames() to get the final network UUIDs.
Get networks info after having aquired the locks. Refactor
the code to use new local variables:
- "network_uuids" returned from _GetNames()
- "all_networks" that are the latest network info
- "name_to_uuid" used for getting network UUID out of NIC's network
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Fri, 11 Jan 2013 14:37:05 +0000 (15:37 +0100)]
QA: Factorize retrieving non-existent groups from config
Also add a check to make sure there are enough groups defined.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Wed, 9 Jan 2013 15:22:26 +0000 (16:22 +0100)]
Generate documentation from build directory
When man pages should be included they need to be copied from man/*.rst.
This means documentation can no longer be built from the static reST
files alone (which are referenced using “abs_top_srcdir”). Similar to
Python files, automake doesn't copy or link the input files for
documentation into the build tree.
This patch adds all files required to build the documentation to
“srclink_files”, renames the “docrst" variable to “docinput”, and then
references the files in the build tree using “abs_top_builddir”.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Dimitris Aragiorgis [Tue, 8 Jan 2013 17:38:16 +0000 (19:38 +0200)]
Add machine version in kvm runtime file
kvm -M ? returns the supported machines (e.g. pc-1.1).
Add _GetDefaultMachineVersion() function to get the default value.
Upon kvm runtime file creation (this is in _GenerateKVMRuntime() invoked
only in StartInstance()) append this info in kvm_cmd. During
live migration the -incoming kvm process is started based on this file.
In case of different KVM versions between source and target nodes
there is a possibility (e.g. due to a kvm bug) for migration to fail silently.
This patch forces the target node to emulate the same machine version
used by running process. If KVM on target node does not support it
the -incoming kvm process will crash and migration will be aborted.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Thu, 10 Jan 2013 11:29:13 +0000 (11:29 +0000)]
Fix typo in the DRBD parser types file
A missing letter has been added to a docstring.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michael Hanselmann [Mon, 7 Jan 2013 18:53:31 +0000 (19:53 +0100)]
Add script to check man page references
This script checks for some of the most obvious mistakes when formatting
man page references (which should have the form “**ganeti**\(7)”). While
this works now, it is very hard to avoid ambiguities (e.g. references
within verbatim blocks) when using regular expressions.
Also fixes a typo in Makefile.am by replacing “harcoded” with
“hardcoded”.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Mon, 7 Jan 2013 18:44:58 +0000 (19:44 +0100)]
man: Man page reference cleanup
Sphinx is stricter than pandoc when parsing reST and does not allow an
opening parenthesis to directly follow inline markup. [1] describes the
rules. A backslash, as described in [2], can be used to separate the
two.
Additionally, there were different forms for referring to man pages.
Sometimes it was a plain “ganeti(7)”, sometimes “**ganeti**(7)” and
other times “**ganeti(7)**” (of course with different names and
numbers).
Commit
7acbda7b added a new paragraph and used the Sphinx-specific
“:manpage:…” markup, which isn't supported by pandoc. It is replaced
with a standard reference.
[1]
http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#
inline-markup-recognition-rules
[2]
http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#
character-level-inline-markup
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Dato Simó [Wed, 9 Jan 2013 17:04:31 +0000 (17:04 +0000)]
test/Utils.hs: fix capitalization in docstring comment
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Wed, 9 Jan 2013 16:31:39 +0000 (17:31 +0100)]
Merge branch 'devel-2.6'
* devel-2.6:
Add utility to format dictionary as key=value strings
Remove fixed FIXME
QA: Support master-netdev and default NIC parameters
QA: Do not pass "--bridge" to "gnt-cluster init"
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Wed, 9 Jan 2013 16:12:16 +0000 (17:12 +0100)]
Merge branch 'stable-2.6' into devel-2.6
* stable-2.6:
Add utility to format dictionary as key=value strings
Remove fixed FIXME
QA: Support master-netdev and default NIC parameters
QA: Do not pass "--bridge" to "gnt-cluster init"
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Thu, 20 Dec 2012 14:40:47 +0000 (15:40 +0100)]
Add utility to format dictionary as key=value strings
This will be used in QA to format network interface parameters.
This is a cherry-pick of master commit
eac9b7b8
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Tue, 8 Jan 2013 15:21:02 +0000 (16:21 +0100)]
More documentation and man page fixes
- Include numbers in man page references
- Use “:manpage:” where appropriate
- Don't escape underscore in verbatim text (e.g. “``always_failover``)
as it would show up in the generated man page
- Quote whole paths, not just build-time part
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Guido Trotter [Wed, 9 Jan 2013 15:15:40 +0000 (16:15 +0100)]
Remove fixed FIXME
This was fixed in stable-2.6, commit 053c356
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Guido Trotter [Wed, 9 Jan 2013 15:15:40 +0000 (16:15 +0100)]
Remove fixed FIXME
This was fixed in stable-2.6, commit 053c356
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Thu, 20 Dec 2012 14:46:06 +0000 (15:46 +0100)]
QA: Support master-netdev and default NIC parameters
Requested in issue 337.
The parameter “bridge” was not documented and is therefore silently
replaced with “master-netdev”. A note is added to “qa-sample.json”
describing how comments work.
This is a cherry-pick of master commit
3601d488464d85531a5a42c263ae2c021a8023c1
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Thu, 20 Dec 2012 14:21:39 +0000 (15:21 +0100)]
QA: Do not pass "--bridge" to "gnt-cluster init"
Commit ec0652a (June 2009) removed the option.
This is a cherry-pick of master commit
784537390cd5b1c4f5f8fb9401a62eb23acce39b
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Wed, 9 Jan 2013 11:56:06 +0000 (12:56 +0100)]
Makefile: Fix list of directories
Commit dbee5c9 had a wrong path.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michael Hanselmann [Tue, 8 Jan 2013 13:26:26 +0000 (14:26 +0100)]
Highlight external links in HTML documentation
Based on MediaWiki's monobook skin.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Bernardo Dal Seno [Fri, 14 Dec 2012 01:30:19 +0000 (02:30 +0100)]
Unit tests for bdev and utils.lvm
Also amended a comment of a tested method.
The tests are for methods introduced in commit
63c73073 (LVM disk creation
uses dedicated PVs).
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Michele Tartara [Fri, 4 Jan 2013 16:48:35 +0000 (17:48 +0100)]
Update the monitoring agent design document
This commit updates the design document of the monitoring agent according
to what has already been discussed in various meetings and email threads.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michele Tartara [Tue, 8 Jan 2013 12:45:08 +0000 (12:45 +0000)]
Support instance-minor pairing in the DRBD collector
This commits enables the DRBD data collector to use the Confd client to
gather information about the pairing between DRBD minors and instances.
For testing purposes, the DRBD data collector now requires either zero
or two parameters: one is the DRBD file, one is the pairings file.
When no parameter is passed, the collector is in "production mode" and takes
the data from /proc/drbd and from the Confd client.
The shell tests of mon-collector are updated accordingly.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michele Tartara [Thu, 3 Jan 2013 15:49:01 +0000 (15:49 +0000)]
Support integrating instance information in the DRBD parser
This commit modifies the DRBD parser and its data structures to include
information about the instance a DRBD minor belongs to.
Test files have been updated as well, to support the new field in the data
structures.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Tue, 8 Jan 2013 14:24:20 +0000 (15:24 +0100)]
NEWS: Add missing parenthesis
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michael Hanselmann [Tue, 8 Jan 2013 10:53:39 +0000 (11:53 +0100)]
Add footer.rst as a dependency for all man pages
Commit 6aff051 removed an intermediate step, but forgot to add
“footer.rst” as a direct dependency.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Yiannis Tsiouris [Sun, 30 Dec 2012 15:36:44 +0000 (17:36 +0200)]
Update name of test/htest in doc/devnotes.rst
Update the docs after the rename of 'test/hs/test' to
'test/hs/htest'. This must have been forgotten in
3e16567e.
Signed-off-by: Yiannis Tsiouris <gtsiour@softlab.ntua.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Sun, 30 Dec 2012 15:50:36 +0000 (16:50 +0100)]
Remove some obsolete entries from .gitignore
Found while doing the previous .dot file changes and wondering what's
this "doc/*.in" stuff… it looks like these were obsoleted over the
years by not paying attention on cleanup patches:
- doc/build: obsoleted by commit
13de7d59
- doc/*.in: obsoleted by commit
2ab2b9f5
- doc/html: was always a directory since its introduction in commit
d17e74b, mark it as so
- devel/clean-cluster: was introduced with initial .gitignore addition
(commit 7a47c58), but we don't actually generate it
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Mon, 31 Dec 2012 12:37:56 +0000 (13:37 +0100)]
Inline the standalone dot files
This removes entirely the standalone dot files by inlining them in the
RST documents - as they weren't referenced from more than one document
either way.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Sun, 30 Dec 2012 15:42:07 +0000 (16:42 +0100)]
Stop manually building images out of dot files
The first dot files we added way back in the 2.0 release are managed
manually: we build the .pngs ourselves, track them in .gitingore,
etc. Since then, we have switched to allow sphinx to build/manage them
itself, so it makes sense to cleanup the build system and covert
everything to this simpler method.
This patch simply converts from "image: x.png" to "graphviz: x.dot",
as an externally-referenced dot file, and removes all the custom
makefile rules for png conversion. The next patch will bring the
conversion further (by inlining then).
Additionally, while checking that the patch doesn't change the html
output, I saw that the use of "shape=diamond" with non-trivial labels
results in very ugly diagrams; so we split the question in such
decision boxes to make them more reasonably looking.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Sun, 30 Dec 2012 15:27:58 +0000 (16:27 +0100)]
Rearrange tags in gnt-cluster/gnt-node
This patch makes the gnt-cluster and gnt-node man page more consistent
with the other man pages, where the tag commands are listed in a
separate section at the end.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>