History | View | Annotate | Download (64.5 kB)
Add unit tests for LUInstanceCreate and move tests
- Move instance related tests to instance_unittest.py- Adapt moved tests to the new test framework where appropriate- Add unit test coverage for LUInstanceCreate - Only instance creation is covered yet, no imports...
Design document for automatised upgrades
This design document describes how upgrade and downgradescan be made more automatic for future versions.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Move TestLUGroupAssignNodes to group_unittest.py
While moving the test, it is adapted to the new test framework.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Generate text report of Haskell coverage
In order to generate a coverage graph, we generate also the coveragedata as text format. This eases parsing on Buildbot.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
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>
Move cmdlib-related unittests to cmdlib/
ganeti.cmdlib_unittest.py andganeti.cmdlib.instance_storage_unittest.py are moved to thetest/py/cmdlib directory. Also, they are renamed to match the names inthis module.
Additionally, instance_storage_unittest.py was added to the makefile, so...
Add unit test for LUClusterActivateMasterIp
In order to properly assert the called RPC method, eq is implementedon ConfigObject as well.
Enable pylint and PEP8 for test support code
The test support code is mainly written from scratch, so in order toensure to keep the code quality high, enable pylint and PEP8 checksfor it.
Due to some specialities of the test code, a dedicate pylintrc-test file...
Initial version of cmdlib test framework
The initial version of the cmdlib test framework is able to execute LU'swith the following components mocked:
A base test class is provided which makes it easy to execute opcodes and...
Merge branch 'stable-2.9'
Merge branch 'stable-2.8' into stable-2.9
Hook h2spy in Makefile.am
Generate Python opcodes from opcode descriptors
Add Haskell module Hs2Py which contains the helper functions thatgenerate the Python opcodes as strings from the Haskell opcodedescriptors produced by Template Haskell.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>...
Add CPUload collector
Introduce CPUload data collector as described in the correspondingdesign 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>...
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>
Add generic Parsers file
Extract the utility functions of Diskstats's collectorParser so other collector Parsers can be able to use them.
Add monitoring-query-format.rst to $(docinput)
Commit 431ff2c10 split the monitoring system documentation in two parts but didnot 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....
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 thedocumentation generation, an error message was printed, having "make" fail....
Fix Makefile.am dependency on 2 documentation targets
Makefile.am rule for doc/html/index.html and doc/man-html/index.htmlrequires executing sphinx-wrapper. However, sphinx-wrapper was not inthe dependency list for this rule.
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>
Merge branch 'stable-2.7' into stable-2.8
Conflicts: NEWS: trivial...
Add a high-level design for the proposed Opcode filtering
This is a design document detailing the semantics of thefine-grained control of jobs in Ganeti.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add hotplug design doc
This is a design document detailing the implementation of devicehotplugging in Ganeti.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>Reviewed-by: Guido Trotter <ultrotter@google.com>
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>
gnt-cluster {init, modify} --file-storage-dir
This patch implements consistent usage and behavior ofthe --file-storage-dir option in 'gnt-cluster init'and 'gnt-cluster modify'. It includes a bunch of unittests as well.
Additionally, it enables the previously written unit...
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>
Rename queryd to luxid
As queryd will, in the future, handle all LUXI request, queue jobs andmost likely perform various other tasks, it is renamed to luxid already.This will safe some headache when upgrading Ganeti installations, as wedon't have to deal with a daemon rename....
Enable unit tests again
A while ago, the execution of python unit tests wasaccidentally disabled for distcheck. This patchenables them again. This will lead to a couple oftests failing, but we decided to submit this firstand then fix the broken tests in separate patches....
Document ganeti-queryd
Add a man page for ganeti-queryd and update the documentation forganeti-confd in various places.
Add queryd daemon (split from confd)
queryd is added as a new daemon which handles configuration queries overLUXI. This functionality was removed from confd, which now only queriesover the network.
The queryd user is added to the master group such that it can access...
Extract ConfigReader from Confd/Server.hs
Confd's functionality to watch the Ganeti configuration file isextracted to the ConfigReader module. No functional changes areintroduced.
This extraction makes will enable us to split queryd from confd, asqueryd will have to use the same functionality....
Add unit test for drbdsetup show parsing
This unit test checks for proper parsing of the output from `drbdsetupshow` when re-attaching the local disk. In this case, disk parametersare not (yet) set, so the corresponding dict is empty.
Signed-off-by: Thomas Thrainer <thomasth@google.com>...
Remove file storage path from autoconf
This patch removes the option to configure the filestorage path at configure time, because it is nowreplaced by a runtime option for gnt-cluster init.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Remove ENABLE_FILE_STORAGE completely
This patch removes the ENABLE_FILE_STORAGE completelyfrom the remaining files, such as Makefile, configure,constants, pathutils and objects.
cluster init: check for enabled disk templates
The purpose of this patch is to remove the usage of the'ENABLE_FILE_STORAGE' constant. To get there, we do somerefactoring, add unit tests and add a FIXME for a forgottentest regarding the file storage location....
Fix single-execution of Haskell tests and shelltests
Add Makefile.am target hs-test-% for single-execution of Haskelltests.
Add Makefile.am target hs-shell-% for single-execution of Haskellshelltests.
Update documentation on running individual tests....
Include "instance" information in LV data collector
This commit enables the logical volume data collector to get information aboutthe instances and to link it to the information about logical volumes.
The list of parameters accepted by the collector is expanded to allow proper...
Factor out the getInstances function
The getInstances function can be useful in general, but is defined insidethe InstStatus data collector. This commit takes it out and adds it toa proper (newly created) library.
Signed-off-by: Michele Tartara <mtartara@google.com>...
Add htools shell test for VCPU handling
This tests that VCPUs used by both instances and node OS are correctlyaccounted in allocation.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Add LV data collector
This commit adds the LV data collector.
Also, the lvCommand function was not providing the correct value as expected bythe readProcess function, so it was fixed.
Add tests for LVs parser
Add unit tests and Quickcheck tests for the LV parser.
Also, fix the alphabetic order of some imports in htest.hs.
Add LV parser
Add the parser for getting the information about the logical volumes in thesystem.
Add test for the --full-evacuation option
In this example cluster, there are four pairs of nodes, each hostingtwo instances. Each node has disk capacity for an additional instance.Therefore, for normal online rolling reboots, there are two node groups,...
Refactor NIC configuration scripts
Add new script vif-ganeti that could be used instead ofdefault vif-bridge in order NIC customization can be moreflexible.
Extract common code from kvm-ifup and insert it in a newfile net-common that is being sourced by kvm-ifup and...
Storage utility functions for Haskell
In order to extend the Haskell version of the NodeInfoquery, we need some utility functions to deal withdisk templates and storage types.
Merge branch 'stable-2.8' into master
Fix issue with python coverage tests
The recently introduced check for python libraries required only for testing(commit 27df5b736ef72b3b12c07f32d64dbac95fe7a5ba) was not correct. Thispatch fixes the issue.
Disable python test if required libraries are missing
Some python libraries are only needed for the tests, but not for runningGaneti. If those libraries are missing, just disable the Python tests.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Merge branch 'stable-2.8' into 'master'
Revert "Storage utility functions for Haskell"
This reverts commit88d27b8aa8adc2e5ced773909f1d40812c5a6ea7.
Rename directory 'Block' to 'Storage'
This patch renames the 'Block' directory to 'Storage' inthe Haskell code base. The same rename was done in thepython code base earlier this quarter. We generalize thename, because we needed a place for general storage...
Add test for shrink heuristics over different resources
In this example, memory prevents adding more than one instance onthe first node. Yet, on the other nodes, 2 instances can be placedeach, if disks are shrunk appropriately. This, however, requiresto courageous decision to shrink disks next, even though more nodes...
Disable more version checks for alpha versions
Alpha versions should not check for version numbers in READMEsand documentation.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Add tests for check-news
Unit tests verifying the behaviour of the check-news script are added.
This required adding a new make target, "autotools-check" directly called from"commit-check", because the usual tests are executed in the build directory,whereas these, being relative to the autotools, cannot be executed there because...
Fix bug in Makefile.am
There was a typo in the name of the script for launching offline tests.
Utility functions for storage types
Handling various storage types for the free space reportingrequires some utility functions. They will be invoked inlater patches. Unit tests are included.
Conflicts: (trival, take union of added files/tests) Makefile.am test/hs/shelltests/htools-hspace.test...
Add a test for hspace to respect instance policy
In this example, the instance policy for disks prevents allocationof more than one instance per node. The test verifies that tieredallocation still respects this and doesn't attempt to place policyviolating instances on the cluster....
Index nodes by their UUID
No longer index nodes by their name but by their UUID in the clusterconfig. This change changes large parts of the code, as the followingadjustments were necessary: * Change the index key to UUID in the configuration and the ConfigWriter, including all methods....
New tests for hspace and exclusive storage
hspace is run on clusters with exclusive storage enabled.
Add diskstats data collector
Add a new data collector responsible for gathering disk performancestatistics.
Add unit tests for the Diskstats parser
Add one test parsing an actual /proc/diskstats file and one QuickChecktest.
Fix erroneously ordered files in Makefile.am
Add /proc/diskstats parser
Add a parser for interpreting the content of the /proc/diskstats file,providing information about the state of the disks of the system.
Unit tests for spindles and exclusive storage in htools
Everything should work the same when exclusive storage is active, asspindles are not yet handled as a resource. A new test has been added forthe interactions between spindles and policies.
Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>...
Test with non-redundant instances and several node-groups
The example cluster contains two node groups. The first contains three nodes,with two non-redundant instances each. As each node has only capacity for threeinstances, the nodes have to be rebooted individually. Additionally, there is...
Add tests for network-aware allocation
hail-alloc-invalid-network defines a cluster with two nodegroups and anallocation request which does not fit on any of the groups. Group 1 hasinvalid disk-templates while Group 2 is not connected to the rightnetworks....
Parse NIC data from allocation request in hail
Add a NIC type and extend the Instance type by a list of NIC's. Parsethe NIC's in allocation requests and store them for now. Later patcheswill make use of this field in order to ensure that the requestedinstance is only placed in node groups wich are connected to those...
Merge branch 'stable-2.8'
Create overall design document for 2.8
Also, cleanup the list of draft designs.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
cfgupgrade: Downgrade is a NO-OP
The configuration is still the same as in 2.8 (the reference stable versionfor this branch), so downgrade shouldn't do anything.
Unit tests are also updated, with a new 2.8 configuration file. Theconfiguration file used for the upgrade+downgrade test was tailored to the...
Design doc for internal shutdown detection
Ganeti is currently not able to detect a legit shutdown request performed by auser from inside a Xen domain.
This patch provides a design document to implement a mechanism able to cope withsuch events.
Test for hroller taking non-redundant instances into account
The example cluster consists of 6 nodes, each hosting 2 instances andhaving capacity for 3. So, while the drbd-induced graph consists ofonly insulated nodes, no more than two nodes can be rebooted at the...
Add Harep man page
Add the man page for the Ganeti auto-repair tool.
Sort cmdlib-related entries in Makefile.am
Files in the cmdlib directory are sorted alphabetically inMakefile.am.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
cmdlib: Extract instance query related functionality
Split instance.py further by extracting instance querying relatedlogical units and functions to instance_query.py.
cmdlib: Extract instance operation functionality
Split instance.py further by extracting instance operations(start/stop/reboot/etc.) related logical units and functions toinstance_operation.py.
The extracted operations have in common that they affect the operating...
cmdlib: Extract migration related functionality
Split instance.py further by extracting migration related logical unitsand functions to instance_migration.py.
cmdlib: Extract storage related functionality
Split instance.py further by extracting storage related logical unitsand functions to instance_storage.py.
Extract miscellaneous logical units from cmdlib
All remaining classes in init.py are extracted to misc.py.
Extract os related logical units from cmdlib
All LUOs* classes are extracted to operating_system.py.
Extract query related logical units from cmdlib
All LUQuery* classes are extracted to query.py.
Extract backup related logical units from cmdlib
All LUBackup* classes are extracted to backup.py.
Extract instance related logical units from cmdlib
All LUInstance* classes are extracted to instance.py. Common functionsare moved to common.py if used by non-instance logical units as well.Additionally, helper functions which are only used by LUBackup* and...
Extract node related logical units from cmdlib
All LUNode* classes are extracted to node.py. Common functions are movedto common.py if used by non-node logical units as well.
Extract group related logial units from cmdlib
All LUGroup* classes are moved to group.py. Common functions areextracted to common.py.
Extract cluster related logical units from cmdlib
All LUCluster* classes are extracted to cluster.py. Shared functions areextracted to common.py, helper functions only used by LUCluster* areextracted to cluster.py.
Extract test logical units from cmdlib
LUTest* are moved to test.py.
Extract network related logical units from cmdlib
LUNetwork* and associated helper functions are extracted to network.py.
Extract tags related logical units from cmdlib
LUTags* and their base class, TagsLU, are extracted to tags.py. Anadditional shared function, _ShareAll, is extracted to common.py forshared usage.
Extract base classes from cmdlib
Base classes holding common functionality is extracted into base.py.Utility functions used by both base classes and subclasses is moved tocommon.py.
Backend function for file storage space reporting
This adds functionality to retrieve disk space informationfor file storage. It calls the 'df' tool and parses itsoutput to extract the total and free amount of disk spaceon the disk where the given path is located....
Reorder unit tests in Makefile.am
In a previous commit, I accidentially changed the order ofunit tests in Makefile.am to not be alphabetically anymore.This fixes it.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Move 'container.py' to storage directory
Moving 'container.py' to the storage directory.