Jose A. Lopes [Mon, 5 Aug 2013 09:17:40 +0000 (11:17 +0200)]
Remove "missing result" check in opcode tests
Some opcodes used 'None', others used 'ht.TNone', as a way to
represent the absence of a return type. This no longer applies,
therefore, this patch updates the corresponding Python tests.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Fri, 2 Aug 2013 12:29:01 +0000 (14:29 +0200)]
Remove Python type predicate 'NoType'
Type predicate 'NoType' is no longer necessary.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Tue, 30 Jul 2013 14:18:22 +0000 (16:18 +0200)]
Update .gitignore with opcode generated files
Python opcode generation produces 'opcodes.py' and there is also the
program 'hs2py' which must go in .gitignore.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Mon, 5 Aug 2013 12:09:53 +0000 (14:09 +0200)]
Hook h2spy in Makefile.am
* add rules to Makefile.am to use hs2py to generate the Python opcodes
from Haskell and update tests to check that Haskell and Python contain
the same opcodes.
* split 'opcodes.py' in 'opcodes.py.in_after' and 'opcodes_base.py',
moving as much code as possible to 'opcodes_base.py' without
creating a circular dependency
* update reference in the remaining Python modules
* remove lib/opcodes.py dependency from documentation target in order
to prevent recompilation of documentation in the distributed source
tarball, in particular because 'sphinx-build' is an optional
dependency (issue 547)
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Thu, 1 Aug 2013 12:35:16 +0000 (14:35 +0200)]
Add hs2py program that generates Python opcodes
Add hs2py which is a Haskell program that uses the 'Hs2Py' module to
output the actual Python opcode strings.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Thu, 1 Aug 2013 12:32:13 +0000 (14:32 +0200)]
Generate Python opcodes from opcode descriptors
Add Haskell module Hs2Py which contains the helper functions that
generate the Python opcodes as strings from the Haskell opcode
descriptors produced by Template Haskell.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Thu, 1 Aug 2013 13:42:19 +0000 (15:42 +0200)]
Remove TagType
By removing 'TagObject' in the previous patch, 'TagType' also became
useless, since it was only used by 'TagObject'. This patch removes 'TagType'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Thu, 1 Aug 2013 13:56:14 +0000 (15:56 +0200)]
Remove TagObject
The 'TagObject' datatype became useless because it was replaced by
'TagKind'. This patch removes 'TagObject', its 'Arbitrary' instance,
and related functions.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Thu, 1 Aug 2013 13:37:36 +0000 (15:37 +0200)]
Update Harep, Query server, and tests
Update Harep, Haskell query server, and tests concerning Luxi and
opcodes to reflect the changes to Haskell to Python opcode
generation. This change is necessary because TagObject is replaced by
TagKind and some types in opcodes and parameters changed to be
consistent with Python, for example, 'String' became 'NonEmptyString'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Wed, 31 Jul 2013 14:30:34 +0000 (16:30 +0200)]
Add Python opcode generation
* add Python opcode generation to Template Haskell
* fix all the opcodes and parameters, including their types and
documentation
* update Luxi to reflect the other changes.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Thu, 1 Aug 2013 12:08:09 +0000 (14:08 +0200)]
Fix spacing in opcode documentation generation
Opcode documentation is automatically generated from the Python
opcodes in the reStructuredText format. This patch fixes the ill RST
definitions by adding the missing blank line.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Tue, 30 Jul 2013 12:34:42 +0000 (14:34 +0200)]
Eliminate Haskell constant for opcode names
Modify 'autotools/convert-constants' not to generate the Haskell
constant that holds all opcode names. By having Haskell generate the
Python opcopdes, it becomes impossible to generate this constant due
to a cyclic dependency. However, this constant is used only in tests,
therefore, it can be generated from Template Haskell. This patch also
updates the test to execute a Python program to fetch the generated
opcode names instead of relying on the beforementioned constant.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Tue, 30 Jul 2013 13:10:20 +0000 (15:10 +0200)]
Add opcode documentation
Add Haskell module containing opcode documentation for all the
opcodes.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Tue, 30 Jul 2013 16:43:53 +0000 (18:43 +0200)]
Add Haskell types for opcodes and parameters
Add Haskell types for IP addresses (version 4 and 6), IP network
addresses, tag kind, and query result code.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Wed, 31 Jul 2013 09:14:43 +0000 (11:14 +0200)]
Move constants to the appropriate module
Move constants ALLOCATABLE_KEY and FAILED_KEY to the constants module.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Tue, 30 Jul 2013 16:54:58 +0000 (18:54 +0200)]
Add predicates to test Python types in opcodes
Add helper functions to test Python types, which are used by opcode
parameters and return values.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Tue, 30 Jul 2013 12:24:08 +0000 (14:24 +0200)]
Fix missing constant from Python constants
Add INIC_BRIDGE constant which is present in Haskell opcodes but not
in Python opcodes.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Wed, 31 Jul 2013 14:08:30 +0000 (16:08 +0200)]
Update version in TODO deprecation comment
Update comment containing a TODO for a future release.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Spyros Trigazis [Fri, 2 Aug 2013 11:59:00 +0000 (14:59 +0300)]
mond: Introduce a new threading mechanism
Change mond's interface in order to be able to call periodically the
collection functions of the data collectors that support such
functionality. The data of such a collector is stored in a map with the
data collector's name as the key.
Currently, only the CPUload data collector provides this kind of
functionality.
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Spyros Trigazis [Fri, 2 Aug 2013 11:56:35 +0000 (14:56 +0300)]
Add CPUload collector
Introduce CPUload data collector as described in the corresponding
design document. Add two data types in Datacollectors's Types.
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Spyros Trigazis [Wed, 31 Jul 2013 15:47:19 +0000 (18:47 +0300)]
Introduce LoadParser and Types for a new Collector
Introduce the Parser and Types for a new Data Collector.
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Spyros Trigazis [Wed, 31 Jul 2013 15:47:18 +0000 (18:47 +0300)]
Factor out utility functions from DiskstatsP
Remove the utility functions from DiskstatsP and import them from
Parsers. Also modify the parser implementation to a more readable form.
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Spyros Trigazis [Wed, 31 Jul 2013 15:47:17 +0000 (18:47 +0300)]
Add generic Parsers file
Extract the utility functions of Diskstats's collector
Parser so other collector Parsers can be able to use them.
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Spyros Trigazis [Wed, 31 Jul 2013 15:47:16 +0000 (18:47 +0300)]
Update mond's design document
Update mond's design document to describe the data collectors as
stateless or stateful.
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Jose A. Lopes [Mon, 29 Jul 2013 15:22:12 +0000 (17:22 +0200)]
Fix Makefile.am dependency on 2 documentation targets
Makefile.am rule for doc/html/index.html and doc/man-html/index.html
requires executing sphinx-wrapper. However, sphinx-wrapper was not in
the dependency list for this rule.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Pulkit Singhal [Thu, 25 Jul 2013 20:51:13 +0000 (02:21 +0530)]
Design Document for Ceph/RBD support in Ganeti
Add design document for the Ceph/RBD support in Ganeti, as it will be
implemented during a GSoC project.
Signed-off-by: Pulkit Singhal <pulkitatiiit@gmail.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Guido Trotter [Thu, 25 Jul 2013 14:27:46 +0000 (16:27 +0200)]
Merge branch 'stable-2.9'
* stable-2.9:
Update NEWS and version for Ganeti 2.7.1
Add hvparam to disable VNET_HDR on tap devices
daemon-util: pass --oknodo at rotate_logs
Fix another missing renaming
Add logrotate example
daemon-util: provide rotate_logs and rotate_all_logs actions
Fix usage of mapping from disk templates to storage types
Rename VALID_STORAGE_TYPES to STORAGE_TYPES
Unit tests for constants consistency
Rename disk_template/storage_type map + cleanup
Move space reporting constant to constants.py
Update hroller manpage
Update NEWS file wrt to file storage dir
Update man page of gnt-cluster regarding file-storage-dir
gnt-cluster {init, modify} --file-storage-dir
Always return tuples in Expand*Name
Prepare QA for shared file storage
Fix permission errors for split users
Make RAPI export device names and UUIDs
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Guido Trotter [Thu, 25 Jul 2013 13:40:32 +0000 (15:40 +0200)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8:
Update NEWS and version for Ganeti 2.7.1
Add hvparam to disable VNET_HDR on tap devices
daemon-util: pass --oknodo at rotate_logs
Add logrotate example
daemon-util: provide rotate_logs and rotate_all_logs actions
Fix permission errors for split users
Make RAPI export device names and UUIDs
Conflicts:
lib/constants.py: trivial
lib/rapi/rlib2.py: trivial
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Guido Trotter [Thu, 25 Jul 2013 12:38:24 +0000 (14:38 +0200)]
Merge branch 'stable-2.7' into stable-2.8
* stable-2.7:
Update NEWS and version for Ganeti 2.7.1
daemon-util: pass --oknodo at rotate_logs
Add logrotate example
daemon-util: provide rotate_logs and rotate_all_logs actions
Conflicts:
NEWS: trivial
configure.ac: trivial (keep 2.8 version)
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Guido Trotter [Thu, 25 Jul 2013 10:36:54 +0000 (12:36 +0200)]
Update NEWS and version for Ganeti 2.7.1
Release 2.7.1 with a handful of minor fixes.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Stratos Psomdakis [Wed, 24 Jul 2013 11:52:55 +0000 (14:52 +0300)]
Add hvparam to disable VNET_HDR on tap devices
IFF_VNET_HDR allows tap devices to extract a VIRTIO_NET_HDR from pkts
going through the tap iface, enabling segmentation offload for the
virtio nics.
Current (Debian) kernels (3.2 for Debian Squeeze backrports / Wheezy)
don't seem able to handle well VMs with 'broken' virtio ifaces (e.g.
FreeBSD virtio-net driver), using GSO. Broken or malicious virtio-net
drivers can cause the host kernel to flood the logs with WARNs(),
effectively live-locking the system and affecting its overall stabitlity
(eg DRBD disconnects).
The WARN() flooding has been fixed / ratelimited in Linus' tree, but it
hasn't been backported to -stable.
This patch adds the vnet_hdr hvparam for KVM, to select whether the tap
devices used for KVM virtio ifaces will get created with VNET_HDR
support (IFF_VNET_HDR), even when the underlying kernel supports it, in
order to avoid this issue.
Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Thu, 4 Jul 2013 11:25:23 +0000 (13:25 +0200)]
Add a high-level design for the proposed Opcode filtering
This is a design document detailing the semantics of the
fine-grained control of jobs in Ganeti.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Dimitris Aragiorgis [Mon, 22 Jul 2013 14:06:18 +0000 (17:06 +0300)]
Add hotplug design doc
This is a design document detailing the implementation of device
hotplugging in Ganeti.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Sebastian Gebhard [Wed, 24 Jul 2013 09:22:17 +0000 (09:22 +0000)]
Extend gnt-instance show to show vlan parameter
Extensions for "gnt-instance show" to output the vlan parameter which
was introduced by my recent patch series.
This is done by extending the nic object that is used to output the
info. Every other occurrence of this object is adopted as well.
This should fix the errors during make commit-check and lint errors
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Apollon Oikonomopoulos [Wed, 24 Jul 2013 06:22:00 +0000 (09:22 +0300)]
daemon-util: pass --oknodo at rotate_logs
daemon-util's rotate_logs() did not pass --oknodo to start-stop-daemon while
HUPing the daemon processes. As a result, rotate_logs would fail for a
non-running daemon causing rotate_all_logs to exit prematurely.
We can fix this by either passing --oknodo to start-stop-daemon, or have
rotate_all_logs ignore any errors. The former is probably a safer approach - as
it doesn't mask any potential coding errors in rotate_logs - and is also
semantically correct (we only care about log rotation if a daemon is actually
running).
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Tue, 23 Jul 2013 15:08:00 +0000 (17:08 +0200)]
Fix another missing renaming
This fixes a (due to a merge) slipped occurence of
VALID_STORAGE_TYPES which was renamed to STORAGE_TYPES.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Apollon Oikonomopoulos [Tue, 23 Jul 2013 14:22:24 +0000 (17:22 +0300)]
Add logrotate example
Add an example logrotate snippet, along with the relevant documentation.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Apollon Oikonomopoulos [Tue, 23 Jul 2013 14:21:31 +0000 (17:21 +0300)]
daemon-util: provide rotate_logs and rotate_all_logs actions
Modify daemon-util to allow sending SIGHUP to one or all daemons. This is meant
as a utility function to be used in logrotate definitions.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Tue, 23 Jul 2013 14:22:42 +0000 (16:22 +0200)]
Fix usage of mapping from disk templates to storage types
This fixes the currently broken tests due to a slipped
occurrence of the mapping from disk templates to storage
types due to a merge.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Tue, 23 Jul 2013 12:13:21 +0000 (14:13 +0200)]
Rename VALID_STORAGE_TYPES to STORAGE_TYPES
For consistency, this patch renames 'VALID_STORAGE_TYPES'
to 'STORAGE_TYPES', because the set of valid disk
templates is also just names 'DISK_TEMPLATES'.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Tue, 23 Jul 2013 11:41:49 +0000 (13:41 +0200)]
Unit tests for constants consistency
This patch adds some unit tests to ensure the consistency
of various constants regarding disk templates.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Tue, 23 Jul 2013 11:41:34 +0000 (13:41 +0200)]
Rename disk_template/storage_type map + cleanup
This patch renames the mapping of disk templates to storage
types to MAP_DISK_TEMPLATE_STORAGE_TYPE, which is a more
expressive name since it indicates that it is a mapping and
does not have the inconsistent usage of singular and plural
anymore.
Additionally, this patch sorts the disk templates
alphabetically in the constants file.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Tue, 23 Jul 2013 11:19:28 +0000 (13:19 +0200)]
Move space reporting constant to constants.py
This patch moves the constant which is used to determine
whether a storage type provides storage space reporting
from the utils package to the constants. This way, we
can also use it in haskell and it fits there semantically
better anyway.
Additionally, I added unit tests that make sure that the
constant is in sync with the actual implementation in the
backend. This will make sure that when new storage types
provide space reporting, those functions are actually used
in the backend.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Tue, 23 Jul 2013 12:33:56 +0000 (14:33 +0200)]
Update hroller manpage
Offline nodes are properly ignored and support for online rolling
reboots is added, so this should no longer be mentioned under bugs.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Helga Velroyen [Mon, 22 Jul 2013 17:09:04 +0000 (19:09 +0200)]
Update NEWS file wrt to file storage dir
This updates the NEWS file in a way that it mentions now
that 'gnt-cluster init' got the new option
'--file-storage-dir'.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Mon, 22 Jul 2013 16:57:23 +0000 (18:57 +0200)]
Update man page of gnt-cluster regarding file-storage-dir
This extends the description of 'gnt-cluster init' and
'gnt-cluster modify' with respect to the file storage
directory.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Mon, 22 Jul 2013 11:06:22 +0000 (13:06 +0200)]
gnt-cluster {init, modify} --file-storage-dir
This patch implements consistent usage and behavior of
the --file-storage-dir option in 'gnt-cluster init'
and 'gnt-cluster modify'. It includes a bunch of unit
tests as well.
Additionally, it enables the previously written unit
tests for 'instance_storage', which were forgotten to
be included in the Makefile so far.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Thomas Thrainer [Mon, 22 Jul 2013 15:43:01 +0000 (17:43 +0200)]
Always return tuples in Expand*Name
ExpandNodeName and ExpandInstanceName now always return a tuple. If the
node/instance was not found, (None, None) is returned. This fixes bugs
where callers blindly assign the return value of those methods to
multiple variables without checking if it was None.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Mon, 22 Jul 2013 13:00:35 +0000 (15:00 +0200)]
Warn instead of crashing on preexisting wrong data type
Using None in a VTYPE_MAYBE_STRING is wrong, because it cannot really
be serialized to a Haskel Nothing, but given that this can (and does)
influence external components already using None, it is turned to a
warning in order not to break the existing behavior.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Mon, 22 Jul 2013 10:57:00 +0000 (10:57 +0000)]
Fix bug in NIC default configuration
The NIC configuration used the python "None" instead of a proper Nothing.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Mon, 22 Jul 2013 10:54:40 +0000 (10:54 +0000)]
Support proper encoding of Nothing in constants file
The Nothing value of a Haskell Maybe needs to be properly encoded.
If a Python "None" is used, it is not going to be handled properly when the
resulting JSON is decoded by Haskell.
This patch adds support for proper "Nothing" encoding.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Mon, 22 Jul 2013 10:53:48 +0000 (10:53 +0000)]
Remove extra whitespace
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Sebastian Gebhard [Sun, 21 Jul 2013 21:10:28 +0000 (23:10 +0200)]
Fix KeyErrors with network mode and vlan
This patch fixes some KeyErrors that were introduced by the vlan implementation
and showed up when certain parameters were missing:
gnt-cluster init without network mode
gnt-isntance add without vlan
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Wed, 17 Jul 2013 09:28:06 +0000 (11:28 +0200)]
Prepare QA for shared file storage
This prepares the QA for running tests regarding
shared file storage.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Thomas Thrainer [Mon, 22 Jul 2013 10:20:25 +0000 (12:20 +0200)]
Fix permission errors for split users
Correctly set ownership and permissions for daemon log files, correct
the name of the luxid logfile and set the ownership of the query socket
correctly.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 17 Jul 2013 13:44:59 +0000 (15:44 +0200)]
Design document for cmdlib unit tests
This design document describes the plan to create a test framework and
actual unit tests for the cmdlib module.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Fri, 19 Jul 2013 16:23:18 +0000 (16:23 +0000)]
Update the lists of users and groups for LuxiD
After adding LuxiD, the list of daemons has to be updated in the tests as
well.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Fri, 19 Jul 2013 16:22:16 +0000 (16:22 +0000)]
Cluster upgrade for 2.10 must be run against 2.9
Add a 2.9 configuration file and modify the test to use it.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Fri, 19 Jul 2013 16:19:50 +0000 (16:19 +0000)]
Upgrade minimal cluster configuration
The minimal cluster config has changed, but the sample in the tests had not
been updated yet.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Fri, 19 Jul 2013 12:56:01 +0000 (12:56 +0000)]
Merge branch 'stable-2.9' into master
* stable-2.9
Fix parsing of drbdsetup show output for DRBD 8.4
Revert "Disable failing QA test"
Add unit test for drbdsetup show parsing
GenerateDiskTemplate: Proper check for valid disk templates
Fix iallocator unit tests
Move bdev unit tests to filestorage unit tests
Fix deprecation warning about exception
Add debug logging to Confd
Add documentation line to getNodeInstances
Let ReqNodeInstances work with node UUIDs
Update Gluster Ganeti Support doc
* stable-2.8
Add timestamps to haskell network query fields
Extract ConfigReader from Confd/Server.hs
Add queryd daemon (split from confd)
Add ganeti-queryd to QA env test
Document ganeti-queryd
Enable unit tests again
Document the rapi client not to have a QueryNetworks method
Rename queryd to luxid
Add hs function to easily change file ownership
Fix permission problem related to Issue 477
No conflicts.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Christos Stavrakakis [Fri, 19 Jul 2013 08:19:25 +0000 (11:19 +0300)]
Make RAPI export device names and UUIDs
Add UUIDs and names of instance's disks and NICs to the list of instance
fields that are returned from RAPI.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>
Reviewed-by: Helga Velroyen <helgav@google.com>
Weiwei Jia [Tue, 16 Jul 2013 17:36:17 +0000 (13:36 -0400)]
Update Gluster Ganeti Support doc
Update the document as agreed on the mailing list: the project
should be realized in two parts: one is for supporting Xen VMs
(similarly to the sharedfile template) and the other one for
QEMU/KVM VMs.
Signed-off-by: Weiwei Jia <harryxiyou@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Thu, 18 Jul 2013 15:21:38 +0000 (17:21 +0200)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8
Fix permission problem related to Issue 477
Add hs function to easily change file ownership
Conflicts:
src/Ganeti/Utils.hs (trivial)
trivial
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michele Tartara [Thu, 18 Jul 2013 13:50:59 +0000 (13:50 +0000)]
Let ReqNodeInstances work with node UUIDs
The "primaryNode" and "secondaryNode" fields of "Instance" entities in the
cluster configuration where changed to use UUIDs instead of names. The
ReqNodeInstances query inside Confd was not upgraded yet, and was thus
not working anymore.
This commit fixes it.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 18 Jul 2013 13:54:28 +0000 (13:54 +0000)]
Add documentation line to getNodeInstances
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 18 Jul 2013 13:03:51 +0000 (13:03 +0000)]
Add debug logging to Confd
Knowing the replies actually sent helps tracking down problems much more
efficiently.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Sebastian Gebhard [Thu, 18 Jul 2013 09:42:52 +0000 (11:42 +0200)]
Set default OVS in cluster init
This commit adds functionality to gnt_cluster to set the default
master-netdev for openvswitch, when openvswitch mode is configured,
instead of DEFAULT_BRIDGE.
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Sebastian Gebhard [Thu, 18 Jul 2013 09:42:51 +0000 (11:42 +0200)]
Adopt cfgupgrade to support vlan parameter
This patch updates cfgupgrade to support vlans.
Downgrade will remove the vlan information and give a warning.
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Sebastian Gebhard [Thu, 18 Jul 2013 10:21:39 +0000 (12:21 +0200)]
Add VLAN functionality to gnt-instance man page
This patch adds the description of OpenvSwitch VLAN functionality
to the man page of gnt-instance.
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Sebastian Gebhard [Thu, 18 Jul 2013 09:42:50 +0000 (11:42 +0200)]
Support VLAN parameter during instance creation
If VLAN parameter is present, check its format:
either .<id>[:id], :id[:id...], or just id.
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Sebastian Gebhard [Thu, 18 Jul 2013 09:42:49 +0000 (11:42 +0200)]
Add VLAN-capabilities for Xen Hypervisor
This implementation depends on vif-openvswitch provided by Xen 4.3
and provides Xen with switch name and vlan as "link".
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Sebastian Gebhard [Thu, 18 Jul 2013 09:42:48 +0000 (11:42 +0200)]
Extending nicparams to support vlan parameter
This parameter is used to store the vlans each nic is connected to.
It is only used if the network is in openvswitch mode.
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Sebastian Gebhard [Thu, 18 Jul 2013 09:42:48 +0000 (11:42 +0200)]
Improvement of design-openvswitch.rst
Some improvements / fixes that came up during implementation.
Signed-off-by: Sebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Fri, 12 Jul 2013 16:12:24 +0000 (16:12 +0000)]
Fix permission problem related to Issue 477
Commit
91525dee856951ace940c78b6254a1c7344b4803 fixed Issue 477 but broke
"gnt-cluster info".
This commit offers a solution to both problems, by changing the permission
of the socket instead of changing the permission the confd process is run
with.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Fri, 12 Jul 2013 16:10:47 +0000 (16:10 +0000)]
Add hs function to easily change file ownership
The Haskell library functions only allow to change file ownership using
uid/gid. A function for doing that with explicit names is added by this
commit.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Klaus Aehlig [Wed, 17 Jul 2013 15:09:34 +0000 (17:09 +0200)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8
Rename queryd to luxid
Document the rapi client not to have a QueryNetworks method
Enable unit tests again
Document ganeti-queryd
Add ganeti-queryd to QA env test
Add queryd daemon (split from confd)
Extract ConfigReader from Confd/Server.hs
Add timestamps to haskell network query fields
Conflicts:
src/Ganeti/Confd/Server.hs (trivial)
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 17 Jul 2013 14:02:46 +0000 (16:02 +0200)]
Rename queryd to luxid
As queryd will, in the future, handle all LUXI request, queue jobs and
most likely perform various other tasks, it is renamed to luxid already.
This will safe some headache when upgrading Ganeti installations, as we
don't have to deal with a daemon rename.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 17 Jul 2013 13:52:25 +0000 (15:52 +0200)]
Fix deprecation warning about exception
This fixes a deprecation warning regarding the retrieval
of the error message from an exception.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 17 Jul 2013 13:47:22 +0000 (15:47 +0200)]
Move bdev unit tests to filestorage unit tests
Some code was moved from bdev to file storage in
previous patches, but the related unit tests were
accidentally left in bdev. Moving and adjusting
them now.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 17 Jul 2013 12:41:47 +0000 (14:41 +0200)]
Fix iallocator unit tests
This fixes the unit test for the iallocator. The fix
is necessary, because a renamed functions was not properly
renamed in the tests as well.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 17 Jul 2013 12:36:18 +0000 (14:36 +0200)]
GenerateDiskTemplate: Proper check for valid disk templates
This patch makes an FileStorageError to be risen with a
proper error message instead of just an assertion in case
the given disk template is not a valid disk template at
all.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Wed, 17 Jul 2013 13:44:29 +0000 (15:44 +0200)]
Document the rapi client not to have a QueryNetworks method
While there is a luxi query QueryNetworks, the rapi client does not
provide such a method. Document this by declaring it in the
KNOWN_UNUSED_LUXI calls.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Helga Velroyen [Wed, 17 Jul 2013 11:54:42 +0000 (13:54 +0200)]
Enable unit tests again
A while ago, the execution of python unit tests was
accidentally disabled for distcheck. This patch
enables them again. This will lead to a couple of
tests failing, but we decided to submit this first
and then fix the broken tests in separate patches.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Thomas Thrainer [Tue, 16 Jul 2013 07:34:57 +0000 (09:34 +0200)]
Document ganeti-queryd
Add a man page for ganeti-queryd and update the documentation for
ganeti-confd in various places.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Tue, 16 Jul 2013 07:17:07 +0000 (09:17 +0200)]
Add ganeti-queryd to QA env test
Test for the newly introduces ganeti-queryd in the environment test of
QA.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Thu, 4 Jul 2013 15:10:35 +0000 (17:10 +0200)]
Add queryd daemon (split from confd)
queryd is added as a new daemon which handles configuration queries over
LUXI. This functionality was removed from confd, which now only queries
over the network.
The queryd user is added to the master group such that it can access
server.pem. The confd user no longer needs to be in the master group.
This fixes issue 292.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Wed, 3 Jul 2013 14:22:58 +0000 (16:22 +0200)]
Extract ConfigReader from Confd/Server.hs
Confd's functionality to watch the Ganeti configuration file is
extracted to the ConfigReader module. No functional changes are
introduced.
This extraction makes will enable us to split queryd from confd, as
queryd will have to use the same functionality.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Izhar [Fri, 12 Jul 2013 11:34:28 +0000 (13:34 +0200)]
Design Doc for HugePages Support
Add design document for the "HugePages support" GSoC project.
Signed-off-by: Izhar ul Hassan <ezhaar@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Thomas Thrainer [Wed, 17 Jul 2013 07:13:40 +0000 (09:13 +0200)]
Add unit test for drbdsetup show parsing
This unit test checks for proper parsing of the output from `drbdsetup
show` when re-attaching the local disk. In this case, disk parameters
are not (yet) set, so the corresponding dict is empty.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Tue, 16 Jul 2013 13:50:39 +0000 (15:50 +0200)]
Revert "Disable failing QA test"
This reverts commit
b2525349f0da75c74432f2dd85abbcad56e56fed.
Issue 516 was fixed, so now the QA test can be re-enabled again.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Tue, 16 Jul 2013 13:47:44 +0000 (15:47 +0200)]
Fix parsing of drbdsetup show output for DRBD 8.4
DRBD 8.4 contains two `disk` entries under the `volume` section. In some
circumstances, the parsing code could wrongly use the empty one which
causes DRBD8Dev._SlowAssemble() to fail. This fixes issue 516.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Tue, 16 Jul 2013 08:54:37 +0000 (10:54 +0200)]
Reset cfgupgrade --downgrade to be a no-op
In version 2.10 cfgupgrade --downgrade is supposed to downgrade
the configuration to version 2.9 which, at the moment, is still
the same as 2.10.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Tue, 16 Jul 2013 08:51:54 +0000 (10:51 +0200)]
Improve debugging output of DRBD8 status
Signed-off-by: Brian Candler <b.candler@pobox.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Christos Stavrakakis [Tue, 16 Jul 2013 08:07:03 +0000 (11:07 +0300)]
Add timestamps to haskell network query fields
Add timestamp fields to the list of available network query fields in
the Haskell code.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Tue, 16 Jul 2013 08:03:14 +0000 (10:03 +0200)]
Bump version number after forking off 2.9
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Dimitris Aragiorgis [Mon, 15 Jul 2013 17:25:03 +0000 (20:25 +0300)]
Fix conflicts check in LUNetworkDisconnect
The function _NetworkConflictCheck expects a list of instances as
last argument, not a list of pairs of instance names and instances.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Mon, 15 Jul 2013 14:30:15 +0000 (16:30 +0200)]
Merge branch 'stable-2.8' into master
* stable-2.8
Change method dispatch in ClientOps to enforce luxi.REQ_ALL
Allow modify_etc_hosts to be changed
Add --modify-etc-hosts option for CLI tools
Add luxiReqQueryNetworks to LuxiOp
Log received message at debug level
Set the correct group for confd
Log RPC errors from inside executeRpcCall
Factor out the logRpcErrors function
Expose bulk parameter for GetJobs in RAPI client
Add git send-email to the chroot
Add tests for CanRead
Only generate node lists with nodes having different names
Cluster verify checks server.pem permissions
Add function for checking file access permissions
Prevent silent failure in case of connection problems
Fix apt-get invocation in chroot_builder
* merged from stable-2.7
Fix RAPI to include missing network fields
Add support for querying network timestamps
In the crontab example, look for the correct binary
Fix wrong numbering in UPGRADE documentation
Conflicts:
devel/build_chroot
lib/client/gnt_cluster.py
Resolved by taking both additions.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Mon, 15 Jul 2013 14:10:58 +0000 (16:10 +0200)]
Merge branch 'stable-2.7' into stable-2.8
* stable-2.7
Fix RAPI to include missing network fields
Add support for querying network timestamps
In the crontab example, look for the correct binary
Fix wrong numbering in UPGRADE documentation
Conflicts:
src/Ganeti/Objects.hs
test/hs/Test/Ganeti/Objects.hs
Resolved by taking both additions.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Mon, 15 Jul 2013 09:24:28 +0000 (11:24 +0200)]
Change method dispatch in ClientOps to enforce luxi.REQ_ALL
ClientOps' handle_request dispatches on the luxi request received. Change
this to first verify if the request is luxi.REQ_ALL. In this way, we catch
programming errors introducing "secret" luxi requests earlier. This is relevant,
as our other checks for internal consistency compare against luxi.REQ_ALL.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Thu, 11 Jul 2013 14:22:31 +0000 (16:22 +0200)]
Update documentation and NEWS wrt to file storage dir
This patch updates the 'gnt-cluster' man page and the NEWS
file regarding the changes related to the file storage
en/disabling and the configuration of the file storage
directory.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>