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>
Iustin Pop [Sun, 30 Dec 2012 15:19:47 +0000 (16:19 +0100)]
Enable a table of contents for the html version of man pages
This makes the (very dull) html version of the man pages a bit more
readable, until such a time that we can switch over to sphinx fully.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Sun, 30 Dec 2012 15:06:08 +0000 (16:06 +0100)]
Remove intermediate footer.man/footer.html files
I don't remember why I introduced these when switching to pandoc, but
they are not absolutely needed. Instead of pre-generating them (which
might save some trivial cpu time), we can simply pass footer.rst as an
additional input file to pandoc.
The advantage in doing so is that semantic information is preserved;
when pre-generating and including them as-is, the entire structure is
lost, as pandoc won't reinterpret them, so things like a potential
table of contents will simply ignore the footer.
The patch also adds a new target to rebuild all man pages (both groff
and html formats), for testing changes to the pages easier.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Sun, 30 Dec 2012 02:18:48 +0000 (03:18 +0100)]
Improve a bit Haskell library recommended versions
The hinotify library was missing any versions, and finding one that
works with ghc 6.12 (base 4.2.x) was not obvious. The
test-framework-quickcheck2 recommended version didn't actually work
with the test-framework version, so fix that as well.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Sat, 29 Dec 2012 17:59:24 +0000 (18:59 +0100)]
Convert gnt-os man page to sections
As Constantinos observed, the gnt-os man page is not consistent with the
others. This patch adds the missing sections.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Sat, 29 Dec 2012 11:09:31 +0000 (12:09 +0100)]
Fix "Tags" section capitalisation in the man pages
"Tags" is a section, not a command, so let's title-case it (as opposed
to all upper-case). Furthermore, the RST markup was wrong for the
gnt-network man page.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Sat, 29 Dec 2012 11:02:10 +0000 (12:02 +0100)]
Fix a couple of bugs in the gnt-instance man page
The "list-fields" and "change-group" commands were mistakenly listed
as sections; we also rename the "Recovery" section to match better its
content.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Tue, 8 Jan 2013 08:49:08 +0000 (08:49 +0000)]
Fix a bug in the generation of completion information
Completion information for multi-command binaries were not generated in
the correct way, so the build-bash-complation script failed when such a
binary was actually found.
This commit fixes this issue, and a related docstring typo as well.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Michael Hanselmann [Mon, 7 Jan 2013 16:59:12 +0000 (17:59 +0100)]
Add small webserver for development
When working on documentation it can be helpful to use a browser. In
some environments it's not possible to access the files directly from a
graphical browser. This trivial webserver exports all files in the
current directory and unlike alternatives such as thttpd, doesn't check
for world-readable permissions.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Mon, 7 Jan 2013 16:48:39 +0000 (17:48 +0100)]
man pages: Lowercase name for syntax highlighting
When the man pages' reST is built using Sphinx, “bash” must be used
instead of “Bash”. Pandoc works with both.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Mon, 7 Jan 2013 15:03:05 +0000 (16:03 +0100)]
Add "use_locking" parameter to network query opcode
This was extracted from a patch by Dimitris Aragiorgis with the subject
“Add locking to _NetworkQuery”. The rest of the patch did no longer
apply and will require more work.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michael Hanselmann [Mon, 7 Jan 2013 13:56:24 +0000 (14:56 +0100)]
Makefile.am: Add missing space
Commit acaf3ca missed this space before a backslash.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Fri, 4 Jan 2013 09:45:51 +0000 (09:45 +0000)]
Fix the installation location of mon-collector
The mon-collector binary was erroneously installed twice: once in
/usr/bin/ and once in /usr/lib/ganeti/.
With this modification, it is now installed in /usr/lib/ganeti/ only,
as intended.
In order to do this in a proper way, some parts of the Makefile.am where
refactored.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Thu, 3 Jan 2013 15:36:56 +0000 (16:36 +0100)]
Improve the reception of replies in the confd client
If a received reply is valid and there is still no valid reply,
keep it, no matter how new it is.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Constantinos Venetsanopoulos [Fri, 28 Dec 2012 14:19:00 +0000 (16:19 +0200)]
Document the ExtStorage `SetInfo' functionality
Small updates to the extstorage design document and interface.
Signed-off-by: Constantinos Venetsanopoulos <cven@grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Constantinos Venetsanopoulos [Fri, 28 Dec 2012 14:29:43 +0000 (16:29 +0200)]
gnt-storage man page: make commands sub-sections
This makes the man page more consistent with the others (except
gnt-os, that is).
Signed-off-by: Constantinos Venetsanopoulos <cven@grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Thu, 27 Dec 2012 14:59:38 +0000 (15:59 +0100)]
Fix a bad data type in Hcheck.hs
While trying to understand why some code was not being tested, I
realised that we have a bad data type in Hcheck.hs.
We have "data Level = GroupLvl | ClusterLvl", but then we need to pass
the group name/index as well, so we have functions that look like the
following:
f :: Level -> Maybe String -> …
f GroupLvl (Just gname) = …
f GroupLvl Nothing = … -- never used
f ClusterLvl _ = … -- wrong, since a (Just x) could be passed
It's clear that we just need to move the group name in the "GroupLvl"
constructor, and simplify the call chain.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Thu, 27 Dec 2012 14:06:11 +0000 (15:06 +0100)]
Move src/Ganeti/HTools/Program.hs to Program/Main.hs
This removes one more tab conflict; this is the last module in our
code where we have both x.hs and x/.
Furthermore, we collapse all actual code into the new Main.hs module,
leaving the htools.hs basically empty (will allow better testing in
the future).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Wed, 26 Dec 2012 14:01:21 +0000 (15:01 +0100)]
A bit more name cleanup
- gen-coverage → gen-py-coverage
- coverage-htools.tix → coverage-hs.tix
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Wed, 26 Dec 2012 13:19:54 +0000 (14:19 +0100)]
Split the hs-check test rule
Currently, both the unit test and the shell tests are run (manually)
from this rule. This has two downsides: you can't (compile and) run
just one of them easily, and make can't run them in parallel.
By splitting the rules, we can both of the above easily.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Wed, 26 Dec 2012 12:52:24 +0000 (13:52 +0100)]
Remove duplicate test file functions
This patch unifies the functions that generated the tree
reorganisation discussion in the first place :)
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Wed, 26 Dec 2012 12:43:30 +0000 (13:43 +0100)]
Rename test/hs/test to htest
The current base name of 'test' means that this binary will generate
profiling, coverage, etc. files with the name 'test.*', result in
tab-completion conflicts with the test directory. Let's slightly
change its base name for typing easiness.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Wed, 26 Dec 2012 12:36:03 +0000 (13:36 +0100)]
Move htest/ files under the test/ tree
htest/data becomes test/data/htools (basically reverting commit
8feabc89), and htest/* becomes test/hs/*.
Most changes beside the rename are trivial s/…/…, with the exception
of autotools/run-in-tempdir, which needed some more changes now that
test/ is not just Python files:
- test/py is still being copied
- test/hs moves from individual symlinks to entire dir symlink
- test/data is symlinked in its entirety
Checked with make distcheck, pep8 and pylint, so at least VPATH builds
are OK.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Tue, 25 Dec 2012 23:15:05 +0000 (00:15 +0100)]
Move python test files to test/py
This is the first step of the test files reorganisation: moving test/*
(except test/data) to new directory test/py/.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Wed, 26 Dec 2012 12:10:23 +0000 (13:10 +0100)]
Return master ip script output in case of failure
Currently only the exit code is returned, which is somewhat pointless:
for failures, we already know it's ≠ 0, so we don't have enough
information (reported on the mailing list). By logging the output as
well (if any), the user will have more information available for
debugging.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Tue, 25 Dec 2012 19:18:14 +0000 (20:18 +0100)]
Replace htools→hs in configure/makefile rules
This continues the cleanup of the 'htools' name, by replacing 'htools'
with 'hs' in configure and makefile rules.
There is still 'WANT_HTOOLS' left as it is correct, but some of the
conditionals in Makefile.am will need some cleanup (in a different
patch).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Mon, 24 Dec 2012 22:16:05 +0000 (23:16 +0100)]
Fix LUInstanceRecreateDisks with iallocator
Recent iallocator changes (commit
fb60bc6a, “iallocator: Add node
whitelist”) broke the parameter validation for LUInstanceRecreateDisks
(the other LUs were manually fixed already):
$ gnt-instance recreate-disks -I hail --dry-run instance3
Failure: prerequisites not met for this operation:
error type: wrong_input, error details:
Request is missing 'node_whitelist' parameter
By just defining the new parameter, the LU works normally (“INFO:
Selected nodes for instance instance3 via iallocator hail: node2”).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Mon, 24 Dec 2012 21:56:09 +0000 (22:56 +0100)]
Fix dependency on built python sources for hs-check
Since we call into Python for opcodes and other type compatibility
checks, we need to ensure that the python sources are
built. Otherwise, full parallel make might or might not break,
depending on timing.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Mon, 24 Dec 2012 16:51:17 +0000 (17:51 +0100)]
Rename htools/ to src/
Per offline discussions, this is the first patch of the
renames. Tested with "make distcheck", seems to work fine.
The only change outside of the renaming is a bit of simplification in
the .gitignore rules; otherwise, simply s/htools/src/.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Sat, 22 Dec 2012 00:19:37 +0000 (01:19 +0100)]
Optimise autotools/run-in-tempdir
I made a mistake when adding support for htools to run-in-tempdir, by
needlessly copying the htools binaries, when it's enough to link
them. The copying is only really needed for python code, so we change
the Haskell binaries to linking and also a few other directories.
Difference:
- before: 0.8s, 95MB copied
- after: 0.6s, 6.2MB copied
And, by the way, can't wait for Python 2.6 as minimum supported
version…
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Sat, 22 Dec 2012 16:52:15 +0000 (17:52 +0100)]
Fix building of Constants.hs w.r.t .pyc files
Unless this is run under run-in-tempdir, it will create as usual the
.pyc files.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Constantinos Venetsanopoulos [Fri, 30 Mar 2012 08:41:37 +0000 (11:41 +0300)]
Add ExtStorage related man pages
* ganeti-extstorage-interface man page
* gnt-storage man page
Signed-off-by: Constantinos Venetsanopoulos <cven@grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Constantinos Venetsanopoulos [Wed, 28 Mar 2012 09:32:56 +0000 (12:32 +0300)]
Add the gnt-storage client
Add a new client called 'gnt-storage'.
The client interacts with the ExtStorage interface, similarly to
the way gnt-os interacts with the OS interface.
For now, only two commands are supported: 'info' and 'diagnose'.
'diagnose' calculates the node status of each provider on each node,
similarly to gnt-os diagnose. Furthermore, for every provider, it
calculates it's nodegroup validity for each nodegroup. This is done
inside the LU and not the client (marked as 'TODO' for the global
validity of gnt-os diagnose).
In the future, gnt-storage can be used to manage storage pools,
or even be extended to diagnose other storage types supported by
Ganeti, such as lvm, drbd (INT_MIRROR) or rbd (EXT_MIRROR).
Signed-off-by: Constantinos Venetsanopoulos <cven@grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
[iustin@google.com: fixed Haskell compatibility and style fixes]
Reviewed-by: Iustin Pop <iustin@google.com>
Iustin Pop [Fri, 21 Dec 2012 16:34:17 +0000 (17:34 +0100)]
Extend the hcheck shell tests
This adds a few new hcheck tests, to extend the coverage.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Fri, 21 Dec 2012 16:14:20 +0000 (17:14 +0100)]
Extend the hbal shell tests
After this patch, almost all of hbal except the actual Luxi execution
is being covered by unit- or shelltests.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Iustin Pop [Fri, 21 Dec 2012 19:25:13 +0000 (20:25 +0100)]
Merge branch 'devel-2.6'
* devel-2.6:
Final update of NEWS file for 2.6.2 and version bump
Fix job completion with big job queues
confd: reduce noise during normal config reload
Change hbal handling of !auto_balance instances
Small corrections in man pages
Fix gnt-instance(8) w.r.t. growable disk templates
Stop verifying opcode results in dry_run mode
Update NEWS for 2.6.2
Fix TypeError when unsetting OS parameters
cmdlib.py: don't use GetHypervisor
Conflicts:
NEWS (trivial, integrated the 2.6.2 news)
autotools/build-bash-completion (trivial: pathutils)
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Iustin Pop [Fri, 21 Dec 2012 18:25:46 +0000 (19:25 +0100)]
Fix build breakage after exclusive storage commits
This fixes:
htest/Test/Ganeti/Rpc.hs:50:14:
Couldn't match expected type `Rpc.RpcCallNodeInfo'
against inferred type `Data.Map.Map String Bool
-> Rpc.RpcCallNodeInfo'
In the first argument of `(<$>)', namely `Rpc.RpcCallNodeInfo'
In the first argument of `(<*>)', namely
`Rpc.RpcCallNodeInfo <$> arbitrary'
by adding the new parameter (empty map for now), and also:
ganeti/constants.py:432:5: E123 closing bracket does not match
indentation of opening bracket's line
By switching to 2-char indentation and (for consistency) also replaces
frozenset(…) with our unique checker (UniqueFrozenset).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
Iustin Pop [Fri, 21 Dec 2012 17:50:21 +0000 (18:50 +0100)]
Merge branch 'stable-2.6' into devel-2.6
No conflicts, really trivial.
* stable-2.6:
Final update of NEWS file for 2.6.2 and version bump
Fix job completion with big job queues
confd: reduce noise during normal config reload
Change hbal handling of !auto_balance instances
Small corrections in man pages
Fix gnt-instance(8) w.r.t. growable disk templates
Stop verifying opcode results in dry_run mode
Update NEWS for 2.6.2
Fix TypeError when unsetting OS parameters
cmdlib.py: don't use GetHypervisor
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Bernardo Dal Seno [Thu, 29 Nov 2012 18:35:31 +0000 (19:35 +0100)]
LUs raise an error if they cannot handle exclusive_storage
This happens when the exclusive_storage flag is set, and the requested
operation is incompatible with the flag or not yet supported.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Bernardo Dal Seno [Fri, 7 Dec 2012 18:17:00 +0000 (19:17 +0100)]
Refactor checks for a new template in LUInstanceSetParams
All the checks have been moved to a private method, so as to make
CheckPrereq() smaller and more readable (pylint was complaining about it).
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Bernardo Dal Seno [Wed, 28 Nov 2012 12:47:41 +0000 (13:47 +0100)]
Free disk space reporting follows exclusive storage rules
When exclusive_storage is set, nodes report only the space that could be
used to create new disk according to the rules set in the
design-partitioned doc (i.e., non-empty disks are ignored and the space
reserved for rounding/overhead is not reported).
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Bernardo Dal Seno [Mon, 10 Dec 2012 22:27:03 +0000 (23:27 +0100)]
Call node_info RPCs with the exclusive_storage flag
The flag is read from the configuration and passed to the RPC.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>