Thomas Thrainer [Tue, 30 Jul 2013 09:12:58 +0000 (11:12 +0200)]
Add unit test for LUClusterRepairDiskSizes
Also add build method for easy building of disk objects to the test
framework.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Jul 2013 14:49:40 +0000 (16:49 +0200)]
Add unit test for LUClusterRename
Also mock the netutils and ssh module in order to test all code paths.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 24 Jul 2013 12:52:23 +0000 (14:52 +0200)]
Use ConfigWriter.GetMasterNodeInfo() consistently
This shortcut method to get the node object of the master node directly
makes the code more readable and concise. Therefore, use it everywhere
where appropriate.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 24 Jul 2013 12:50:04 +0000 (14:50 +0200)]
Add unit test for LUClusterRedistConf
Unit-test LUClusterRedistConf. Given the simplicity of the LU, this unit
test only exercises the LU code.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 24 Jul 2013 12:40:18 +0000 (14:40 +0200)]
Add unit test for LUClusterQuery
Unit-test LUClusterQuery. Some changes in the mocked cluster
configuration are made, because the configuration was not completely
valid before.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 24 Jul 2013 12:16:31 +0000 (14:16 +0200)]
Add unit test for LUClusterPostInit
Also extract common assertion logic for hook invocations to
CmdlibTestCase.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 24 Jul 2013 11:58:14 +0000 (13:58 +0200)]
Add unit tests for LUClusterDestroy
This patch adds unit test for the LUClusterDestroy Logical Unit.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 24 Jul 2013 11:57:48 +0000 (13:57 +0200)]
Add unit tests for LUClusterConfigQuery
Also, proper initialization of the runtime architecture information was
added.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 24 Jul 2013 09:38:27 +0000 (11:38 +0200)]
Move cluster-related unittest to cluster_unittest
cmdlib_unittest should still be split further, but at least the cluster
related tests are moved to the proper file yet.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 24 Jul 2013 09:15:16 +0000 (11:15 +0200)]
Move cmdlib-related unittests to cmdlib/
ganeti.cmdlib_unittest.py and
ganeti.cmdlib.instance_storage_unittest.py are moved to the
test/py/cmdlib directory. Also, they are renamed to match the names in
this module.
Additionally, instance_storage_unittest.py was added to the makefile, so
it's executed automatically during builds.
cmdlib_unittest.py now still contains tests from various cmdlib modules.
As soon as individual test files for those modules are added, those
tests should be move there.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 24 Jul 2013 08:57:17 +0000 (10:57 +0200)]
Add unit test for LUClusterDeactivateMasterIp
This patch adds unit tests for the LUClusterDeactivateMasterIp Logical
Unit.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 24 Jul 2013 08:49:25 +0000 (10:49 +0200)]
Add unit test for LUClusterActivateMasterIp
In order to properly assert the called RPC method, __eq__ is implemented
on ConfigObject as well.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 22 Jul 2013 15:14:13 +0000 (17:14 +0200)]
Add unit test for LUTestAllocator
Additionally to adding unit tests for LUTestAllocator, the test
framework was adapted for its requirements.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 22 Jul 2013 15:56:12 +0000 (17:56 +0200)]
Remove unneeded checks
Those checks are already covered by the "types" in the opcodes, so
remove them.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 29 Jul 2013 09:38:15 +0000 (11:38 +0200)]
Enable pylint and PEP8 for test support code
The test support code is mainly written from scratch, so in order to
ensure to keep the code quality high, enable pylint and PEP8 checks
for it.
Due to some specialities of the test code, a dedicate pylintrc-test file
is created which configures pylint for test code.
Those differences include:
- lowercase functions are allowed if the first word is test, assert or
main
- lowercase methods are allowed if the first word(s) is test, assert,
runTests, setUp or tearDown
- R0201 (method could be a function) is disabled
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Tue, 23 Jul 2013 12:03:02 +0000 (14:03 +0200)]
Initial version of cmdlib test framework
The initial version of the cmdlib test framework is able to execute LU's
with the following components mocked:
* Configuration
* IAllocator interface
* Lock manager
* MCPU processor
* RPC runner
A base test class is provided which makes it easy to execute opcodes and
to perform asserts on the output.
Tests for the LUTestDelay logical unit demonstrate the functionality of
the test framework.
The framework is not yet fully complete, further work will be done as
the tests are written.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Tue, 23 Jul 2013 11:59:03 +0000 (13:59 +0200)]
Install python mock using easy_install in chroot
We require a newer mock library, so install it using easy_install in
chroot.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Tue, 23 Jul 2013 12:00:39 +0000 (14:00 +0200)]
Require newer python mock library
Older Python mock libraries do not provide MagicMock, which eases
mocking of complex objects quite a bit. As this is a build/test
dependency only, requiring a new version is OK (it's available via
easy_install).
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Fri, 19 Jul 2013 07:00:24 +0000 (09:00 +0200)]
Remove Python < 2.6 compatibility code
This code was used for Python versions < 2.6 which we don't support any
more.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Wed, 7 Aug 2013 15:02:52 +0000 (17:02 +0200)]
Merge branch 'stable-2.9'
* stable-2.9
Fix batch creation of instances
Fix documentation of gnt-instance batch-create
Support multi instance allocs without iallocator
Support DSA SSH keys in bootstrap
Include VCS version in `gnt-cluster version`
Document 'viridian' hypervisor parameter
Support 'viridian' parameter in Xen HVM
Fix formatting of instance names in config verify
Document --no-conflicts-check for gnt-network
Fix verify config if a node has no instances
Version bump for 2.8.0 rc1
Add Make to the list of dependencies
Check for luxid permission during verify config
Add monitoring-query-format.rst to $(docinput)
Fix documentation building rules
Check disk template in right dict when copying
Check disk template in right dict when copying
ganeti.backend_unittest: chmod restricted cmd dir
Fix formatting of tuple in error message
Mark the UUID design doc as implemented
Clarify that cmdlib/ must be removed downgrading
Fix formatting error in the UPGRADE document
Make build_chroot compatible with Squeeze
Update security doc and NEWS for luxid
Add --cleanup to instance failover manpage
Update NEWS with failover cleanup
Add cleanup parameter to instance failover
Fix 'prcre' typo in INSTALL
Update NEWS file for 2.8 wrt vnet_hdr KVM hvparam
Document the vnet_hdr HV parameter for KVM
Format gnt-network info group output
Add 2.7.2 NEWS entry
Typos in ganeti-os-interface.rst
Use exact option name --enabled-disk-templates consistently
Update NEWS file wrt shared file storage
Update manpage of gnt-cluster wrt shared file storage
QA: skip lvm-based tests if lvm disabled
QA: test for --{shared,}-file-storage-dir
gnt-cluster verify: consider shared file storage
gnt-cluster modify --shared-file-storage-dir
Remove obsolete autoconf variable from remaining files
objects.py: remove fallback to autoconf
Cluster-merge: determine shared file storage use from config
Opcodes: remove obsolete RequireSharedFileStorage function
Bootstrap: factor out and prepare shared-file-storage
Move default shared file storage directory to pathutils
Prepare NEWS for 2.8.0 beta2
Add Ganeti 2.9 design document
Update NEWS for version 2.9
Fix the downgrade function of cfgupgrade
Increase maximum HTTP message size
Clarify hbal man page
Properly add the UUID to all the disks
Conflicts:
lib/cmdlib/instance.py
lib/opcodes.py
src/Ganeti/OpCodes.hs
All trivially resolved.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Wed, 7 Aug 2013 11:21:55 +0000 (13:21 +0200)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8
Fix batch creation of instances
Fix documentation of gnt-instance batch-create
Support multi instance allocs without iallocator
Support DSA SSH keys in bootstrap
Include VCS version in `gnt-cluster version`
Document 'viridian' hypervisor parameter
Support 'viridian' parameter in Xen HVM
Document --no-conflicts-check for gnt-network
Version bump for 2.8.0 rc1
Add Make to the list of dependencies
Check for luxid permission during verify config
Add monitoring-query-format.rst to $(docinput)
Fix documentation building rules
Check disk template in right dict when copying
Check disk template in right dict when copying
ganeti.backend_unittest: chmod restricted cmd dir
Fix formatting of tuple in error message
Mark the UUID design doc as implemented
Clarify that cmdlib/ must be removed downgrading
Fix formatting error in the UPGRADE document
Make build_chroot compatible with Squeeze
Update security doc and NEWS for luxid
Add --cleanup to instance failover manpage
Update NEWS with failover cleanup
Add cleanup parameter to instance failover
Fix 'prcre' typo in INSTALL
Update NEWS file for 2.8 wrt vnet_hdr KVM hvparam
Document the vnet_hdr HV parameter for KVM
Format gnt-network info group output
Add 2.7.2 NEWS entry
Prepare NEWS for 2.8.0 beta2
Fix the downgrade function of cfgupgrade
Increase maximum HTTP message size
Clarify hbal man page
Properly add the UUID to all the disks
Conflicts:
NEWS
configure.ac
doc/design-draft.rst
doc/index.rst
lib/cmdlib/instance.py
lib/cmdlib/instance_migration.py
lib/constants.py
lib/hypervisor/hv_xen.py
man/gnt-instance.rst
man/gnt-network.rst
test/hs/Test/Ganeti/OpCodes.hs
tools/cfgupgrade
All trivially merged.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Thomas Thrainer [Wed, 7 Aug 2013 09:43:44 +0000 (11:43 +0200)]
Merge branch 'stable-2.7' into stable-2.8
* stable-2.7
Fix documentation of gnt-instance batch-create
Support multi instance allocs without iallocator
Document --no-conflicts-check for gnt-network
Check disk template in right dict when copying
ganeti.backend_unittest: chmod restricted cmd dir
Fix formatting of tuple in error message
Fix 'prcre' typo in INSTALL
Format gnt-network info group output
Add 2.7.2 NEWS entry
Conflicts:
INSTALL
(trivial)
NEWS
(added entry to unreleased 2.8 section with remark that it was
merged from 2.7)
lib/cmdlib.py
(followed cmdlib split)
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Thomas Thrainer [Mon, 5 Aug 2013 09:06:13 +0000 (11:06 +0200)]
Fix batch creation of instances
During batch creation of instances the 'reason' field in opcodes is set
to None (but the field is present). This caused problems when adding a
reasons to the reason trail.
Setting the default value for the 'reason' field to the empty list fixes
this issue.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 5 Aug 2013 10:50:37 +0000 (12:50 +0200)]
Fix documentation of gnt-instance batch-create
The documentation of gnt-instance batch-create was outdated and
contained invalid examples. This patch corrects the man page and
includes working example inputs.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 5 Aug 2013 10:11:21 +0000 (12:11 +0200)]
Support multi instance allocs without iallocator
If all instances in the multi allocation request have already their
primary and secondary node set, there is no need for an iallocator. Thus
don't require it in this case and omit the call to it all together.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Jose A. Lopes [Fri, 2 Aug 2013 12:53:55 +0000 (14:53 +0200)]
Update parameter variables
Because opcodes are generated, parameter variables no longer
exist. This patch fixes the Python opcode tests not to refer to these
variables.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Fri, 2 Aug 2013 12:50:24 +0000 (14:50 +0200)]
Remove test for mutable default parameter values
Opcode parameters contain default values which can be, for example, a
list, dict, or set. Because these values are mutable, 'Validate'
performs a deepcopy before constructing the opcode dict and,
therefore, changing these values will not affect the default value
stored in the opcode description. As a result, the default value can
be reused in several calls to 'Validate' without a problem. The test
to ensure immutable default values can thus be removed.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Fri, 2 Aug 2013 12:48:50 +0000 (14:48 +0200)]
Remove Python opcode test 'TestClusterOsList'
Python opcode generation produces also calls to Python type predicates
in a more composable way compared to the previous hand-written type
predicates. As a result, some predicates, such as,
'TestClusterOsList', became unused because they are achieved through a
combination of other predicates.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
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>
Thomas Thrainer [Tue, 6 Aug 2013 15:10:15 +0000 (17:10 +0200)]
Support DSA SSH keys in bootstrap
As outlined in issue 338, Ganeti failed to initialize a cluster if no
RSA SSH key is present on the master node. This patch extends Ganetis
support to DSA keys, so clusters with only DSA keys are possible now.
This fixes issue 338.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Tue, 6 Aug 2013 10:54:15 +0000 (12:54 +0200)]
Include VCS version in `gnt-cluster version`
Also print the VCS version in the output of `gnt-cluster version`. This
makes the VCS version also available over RAPI, etc.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Tue, 6 Aug 2013 08:09:10 +0000 (10:09 +0200)]
Document 'viridian' hypervisor parameter
List the 'viridian' hypervisor parameter (valid for Xen HVM) in the
gnt-instance manpage.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Thomas Thrainer [Tue, 6 Aug 2013 08:04:58 +0000 (10:04 +0200)]
Support 'viridian' parameter in Xen HVM
This parameter is required to prevent bluescreens in Windows instances.
This fixes issue 233.
Signed-off-by: Heiko Baumann <heibau@googlemail.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@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>
Thomas Thrainer [Fri, 2 Aug 2013 13:11:45 +0000 (15:11 +0200)]
Fix formatting of instance names in config verify
Instance object were incorrectly treated as instance UUID's which caused
an exception to be raised. Using the names of the instance objects
directly fixes this problem.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Mon, 5 Aug 2013 07:46:30 +0000 (09:46 +0200)]
Document --no-conflicts-check for gnt-network
gnt-network add and connect do support the --no-conflicts-check option.
This is now also documented in the man pages.
This fixes issue 526.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Thomas Thrainer [Fri, 2 Aug 2013 05:29:45 +0000 (07:29 +0200)]
Fix verify config if a node has no instances
Do not try to provide a fake instance UUID called "no instances", as
trying to get the name for would fail and raise an exception.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michele Tartara [Wed, 31 Jul 2013 13:21:28 +0000 (13:21 +0000)]
Version bump for 2.8.0 rc1
Update NEWS file and version number.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Fri, 2 Aug 2013 07:40:44 +0000 (07:40 +0000)]
Add Make to the list of dependencies
Make is a required dependency, but it was not specified in the install guide.
This commit adds it.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Thomas Thrainer [Thu, 1 Aug 2013 14:43:40 +0000 (16:43 +0200)]
Check for luxid permission during verify config
confd no longer needs access to the noded certificate file, but luxid
does. Change the check to use the right user.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Apollon Oikonomopoulos [Thu, 1 Aug 2013 09:45:20 +0000 (12:45 +0300)]
Add monitoring-query-format.rst to $(docinput)
Commit
431ff2c10 split the monitoring system documentation in two parts but did
not include the new monitoring-query-format.rst to $(docinput). As a result,
current tarballs of 2.8 do not ship doc/monitoring-query-format.rst.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michele Tartara [Thu, 1 Aug 2013 08:41:04 +0000 (10:41 +0200)]
Fix documentation building rules
Implement the correct behavior to be kept when sphinx-build is not installed.
It was already correctly checked, but instead of just disabling the
documentation generation, an error message was printed, having "make" fail.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Thomas Thrainer [Wed, 31 Jul 2013 13:41:43 +0000 (15:41 +0200)]
Check disk template in right dict when copying
Due to the structure of the code this condition can't possibly be true.
We have to look in the new_diskparams dict instead, otherwise it'd be
possible to try to update a non-existing entry.
(The same patch is in stable-2.7 as 106441d already).
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Thomas Thrainer [Wed, 31 Jul 2013 14:16:39 +0000 (16:16 +0200)]
Check disk template in right dict when copying
Due to the structure of the code this condition can't possibly be true.
We have to look in the new_diskparams dict instead, otherwise it'd be
possible to try to update a non-existing entry.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Apollon Oikonomopoulos [Wed, 31 Jul 2013 14:30:29 +0000 (17:30 +0300)]
ganeti.backend_unittest: chmod restricted cmd dir
TestVerifyRestrictedCmdDirectory.testNormal implicitly relies on the current
umask to check the behaviour of backend._VerifyRestrictedCmdDirectory. However,
when run under a more relaxed umask (as in the case of the Debian buildd's
using sbuild and - apparently - umask 0002), it fails.
Since this kind of failure is already tested for previously and since we should
check that a "known-normal" directory passes the test, we explicitly chmod()
the temporary directory to 0755.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Thomas Thrainer [Wed, 31 Jul 2013 12:58:29 +0000 (14:58 +0200)]
Fix formatting of tuple in error message
The missing str() call caused to raise another exception than the wanted
one. Transforming the tuple to string fixes this problem.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michele Tartara [Wed, 31 Jul 2013 09:33:55 +0000 (09:33 +0000)]
Mark the UUID design doc as implemented
The code implementing the UUID design document is included in Ganeti 2.8.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Wed, 31 Jul 2013 08:54:14 +0000 (08:54 +0000)]
Clarify that cmdlib/ must be removed downgrading
Downgrading from 2.8 to a previous version will fail if the new cmdlib/
directory is not removed.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Wed, 31 Jul 2013 08:53:27 +0000 (08:53 +0000)]
Fix formatting error in the UPGRADE document
An item of the enumerated list was not rendered correctly.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Tue, 30 Jul 2013 15:17:11 +0000 (15:17 +0000)]
Make build_chroot compatible with Squeeze
Modify build_chroot to make it compatible with debian Squeeze. This
is done by using a function instead of a alias for the command that
was failing.
Fixes Issue 507.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Thomas Thrainer [Tue, 30 Jul 2013 07:18:14 +0000 (09:18 +0200)]
Update security doc and NEWS for luxid
Document the split of luxid from confd in security.rst and in the NEWS
file.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Tue, 30 Jul 2013 13:02:14 +0000 (13:02 +0000)]
Add --cleanup to instance failover manpage
Describe the new parameter in the manpage of gnt-instance.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Tue, 30 Jul 2013 12:06:22 +0000 (12:06 +0000)]
Update NEWS with failover cleanup
Describe the new feature in the NEWS file.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Tue, 30 Jul 2013 11:59:52 +0000 (11:59 +0000)]
Add cleanup parameter to instance failover
Most of the code is shared with instance migrate, so we actually only need
to add the parameter and pass its value along the the common code.
Also, tests and harep are updated to support the right set of options to
the "failover" opcode.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Guido Trotter [Tue, 30 Jul 2013 09:48:35 +0000 (11:48 +0200)]
Fix 'prcre' typo in INSTALL
Thanks to "Izhar ul Hassan" for reporting the issue.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Klaus Aehlig <aehlig@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>
Stratos Psomadakis [Mon, 29 Jul 2013 14:14:49 +0000 (17:14 +0300)]
Update NEWS file for 2.8 wrt vnet_hdr KVM hvparam
Document the addition of the vnet_hdr HV parameter for KVM in the NEWS
file for 2.8.
Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Stratos Psomadakis [Mon, 29 Jul 2013 14:14:48 +0000 (17:14 +0300)]
Document the vnet_hdr HV parameter for KVM
Document the vnet_hdr HV parameter for KVM in the gnt-instance man page.
Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Apollon Oikonomopoulos [Mon, 29 Jul 2013 12:50:00 +0000 (15:50 +0300)]
Format gnt-network info group output
gnt-network info currently displays the connected group output unformatted:
# gnt-network info
...
connected to node groups:
['med', 'bridged', 'staging']
This patch adds formatting to the node group output.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Apollon Oikonomopoulos [Mon, 29 Jul 2013 12:49:41 +0000 (15:49 +0300)]
Add 2.7.2 NEWS entry
Prepare to list changes for 2.7.2.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Helga Velroyen [Fri, 26 Jul 2013 08:32:32 +0000 (10:32 +0200)]
Typos in ganeti-os-interface.rst
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Helga Velroyen [Mon, 29 Jul 2013 11:43:10 +0000 (13:43 +0200)]
Use exact option name --enabled-disk-templates consistently
It is possible to use both, --enabled-disk-template
(singular) or --enabled-disk-tempaltes (plural),
but the usage of it has been documented and used in QA
inconsistently. This is fixed by this patch now.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Helga Velroyen [Wed, 24 Jul 2013 16:03:54 +0000 (18:03 +0200)]
Update NEWS file wrt shared file storage
Mention the the changes related to shared file storage
in the NEWS file.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Wed, 24 Jul 2013 15:29:43 +0000 (17:29 +0200)]
Update manpage of gnt-cluster wrt shared file storage
This updates the man page of gnt-cluster {init, modify}
to mention the new --shared-file-storage-dir option.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Wed, 24 Jul 2013 14:53:20 +0000 (16:53 +0200)]
QA: skip lvm-based tests if lvm disabled
QA tests should make sure not to be run if the necessary
environment for them is not present. This patch fixes that
for a couple of tests that fail to check that before being
executed.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 15:19:14 +0000 (17:19 +0200)]
QA: test for --{shared,}-file-storage-dir
This adds tests for 'gnt-cluster modify' wrt to the
options --shared-file-storage-dir=... and
--file-storage-dir. It also separates the two directories'
specification in the QA configuration.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 14:56:53 +0000 (16:56 +0200)]
gnt-cluster verify: consider shared file storage
This patch enhances 'gnt-cluster verify' in a way that it
now validates the acceptance and existance of the shared
storage directory.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 13:55:00 +0000 (15:55 +0200)]
gnt-cluster modify --shared-file-storage-dir
This patch introduces to 'gnt-cluster modify' the option
'--shared-file-storage-dir' to change the default directory
for instances using shared file storage at cluster runtime.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 13:54:51 +0000 (15:54 +0200)]
Remove obsolete autoconf variable from remaining files
This removes the obsolete autoconf variable
'ENABLE_SHARED_FILE_STORAGE' from all remaining files.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 13:02:34 +0000 (15:02 +0200)]
objects.py: remove fallback to autoconf
The online-update function of the cluster config so far
inspected the autoconf data to determine whether shared
file storage is enabled. This should now totally rely
on the options given at cluster initialization and thus
this legacy fallback is removed.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 13:01:11 +0000 (15:01 +0200)]
Cluster-merge: determine shared file storage use from config
This patch makes cluster merge read the cluster's
configuration to find out whether or not shared
file storage is enabled.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 13:00:07 +0000 (15:00 +0200)]
Opcodes: remove obsolete RequireSharedFileStorage function
While looking for occurences of the soon-to-be-eliminated
autoconf option 'ENABLE_SHARED_FILE_STORAGE', I discovered
that this function uses it, but is actually never used
anyware, thus we just delete it.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 12:54:42 +0000 (14:54 +0200)]
Bootstrap: factor out and prepare shared-file-storage
This patch makes 'gnt-cluster init' use the
'--shared-file-storage-dir' option to set the default
shared file storage dir. Additionally, it performs the
same sanity and validity checks for the path as for
the default file storage directory. For this, we tried
to re-use as much code from file storage as possible.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Helga Velroyen [Tue, 23 Jul 2013 12:37:19 +0000 (14:37 +0200)]
Move default shared file storage directory to pathutils
This patch moves the default shared-file storage directory
to the pathutils file. It will be removed from configure.ac
at the end of this patch series.
Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Guido Trotter [Mon, 29 Jul 2013 11:52:56 +0000 (13:52 +0200)]
Prepare NEWS for 2.8.0 beta2
- Create stub "initial release" entry for beta1.
- Keep main 2.8 release information at top
- Add initial "since beta1" section
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Mon, 29 Jul 2013 08:57:39 +0000 (10:57 +0200)]
Add Ganeti 2.9 design document
This document lists the designs that have been implemented
in Ganeti 2.9 that hadn't been implemented in 2.8.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Klaus Aehlig [Mon, 29 Jul 2013 08:37:58 +0000 (10:37 +0200)]
Update NEWS for version 2.9
Also for version 2.9, sort the news entries into incompatible and
compatible changes. In this way, we keep the list of items that have
to be taking into considerations before upgrading as short as possible.
Also mention that our tests now have an additional dependency.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Thu, 25 Jul 2013 17:17:18 +0000 (19:17 +0200)]
Fix the downgrade function of cfgupgrade
The downgrade was not correctly removing some of the UUIDs (namely, those
of disks and NICs).
Fixes Issue 510.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>