Remove unneeded checks
Those checks are already covered by the "types" in the opcodes, soremove them.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
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...
Install python mock using easy_install in chroot
We require a newer mock library, so install it using easy_install inchroot.
Require newer python mock library
Older Python mock libraries do not provide MagicMock, which easesmocking of complex objects quite a bit. As this is a build/testdependency only, requiring a new version is OK (it's available viaeasy_install).
Signed-off-by: Thomas Thrainer <thomasth@google.com>...
Remove Python < 2.6 compatibility code
This code was used for Python versions < 2.6 which we don't support anymore.
Merge branch 'stable-2.9'
Merge branch 'stable-2.8' into stable-2.9
Merge branch 'stable-2.7' into stable-2.8
Fix batch creation of instances
During batch creation of instances the 'reason' field in opcodes is setto None (but the field is present). This caused problems when adding areasons to the reason trail.
Setting the default value for the 'reason' field to the empty list fixes...
Fix documentation of gnt-instance batch-create
The documentation of gnt-instance batch-create was outdated andcontained invalid examples. This patch corrects the man page andincludes working example inputs.
Support multi instance allocs without iallocator
If all instances in the multi allocation request have already theirprimary and secondary node set, there is no need for an iallocator. Thusdon't require it in this case and omit the call to it all together....
Update parameter variables
Because opcodes are generated, parameter variables no longerexist. This patch fixes the Python opcode tests not to refer to thesevariables.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Remove test for mutable default parameter values
Opcode parameters contain default values which can be, for example, alist, 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...
Remove Python opcode test 'TestClusterOsList'
Python opcode generation produces also calls to Python type predicatesin a more composable way compared to the previous hand-written typepredicates. As a result, some predicates, such as,'TestClusterOsList', became unused because they are achieved through a...
Remove "missing result" check in opcode tests
Some opcodes used 'None', others used 'ht.TNone', as a way torepresent 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>...
Remove Python type predicate 'NoType'
Type predicate 'NoType' is no longer necessary.
Update .gitignore with opcode generated files
Python opcode generation produces 'opcodes.py' and there is also theprogram 'hs2py' which must go in .gitignore.
Hook h2spy in Makefile.am
Add hs2py program that generates Python opcodes
Add hs2py which is a Haskell program that uses the 'Hs2Py' module tooutput the actual Python opcode strings.
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.
Remove TagType
By removing 'TagObject' in the previous patch, 'TagType' also becameuseless, since it was only used by 'TagObject'. This patch removes 'TagType'.
Remove TagObject
The 'TagObject' datatype became useless because it was replaced by'TagKind'. This patch removes 'TagObject', its 'Arbitrary' instance,and related functions.
Update Harep, Query server, and tests
Update Harep, Haskell query server, and tests concerning Luxi andopcodes to reflect the changes to Haskell to Python opcodegeneration. This change is necessary because TagObject is replaced byTagKind and some types in opcodes and parameters changed to be...
Add Python opcode generation
Fix spacing in opcode documentation generation
Opcode documentation is automatically generated from the Pythonopcodes in the reStructuredText format. This patch fixes the ill RSTdefinitions by adding the missing blank line.
Eliminate Haskell constant for opcode names
Modify 'autotools/convert-constants' not to generate the Haskellconstant that holds all opcode names. By having Haskell generate thePython opcopdes, it becomes impossible to generate this constant dueto a cyclic dependency. However, this constant is used only in tests,...
Add opcode documentation
Add Haskell module containing opcode documentation for all theopcodes.
Add Haskell types for opcodes and parameters
Add Haskell types for IP addresses (version 4 and 6), IP networkaddresses, tag kind, and query result code.
Move constants to the appropriate module
Move constants ALLOCATABLE_KEY and FAILED_KEY to the constants module.
Add predicates to test Python types in opcodes
Add helper functions to test Python types, which are used by opcodeparameters and return values.
Fix missing constant from Python constants
Add INIC_BRIDGE constant which is present in Haskell opcodes but notin Python opcodes.
Update version in TODO deprecation comment
Update comment containing a TODO for a future release.
Support DSA SSH keys in bootstrap
As outlined in issue 338, Ganeti failed to initialize a cluster if noRSA SSH key is present on the master node. This patch extends Ganetissupport to DSA keys, so clusters with only DSA keys are possible now.
This fixes issue 338....
Include VCS version in `gnt-cluster version`
Also print the VCS version in the output of `gnt-cluster version`. Thismakes the VCS version also available over RAPI, etc.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Document 'viridian' hypervisor parameter
List the 'viridian' hypervisor parameter (valid for Xen HVM) in thegnt-instance manpage.
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>
mond: Introduce a new threading mechanism
Change mond's interface in order to be able to call periodically thecollection functions of the data collectors that support suchfunctionality. The data of such a collector is stored in a map with thedata collector's name as the key....
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>
Factor out utility functions from DiskstatsP
Remove the utility functions from DiskstatsP and import them fromParsers. Also modify the parser implementation to a more readable form.
Add generic Parsers file
Extract the utility functions of Diskstats's collectorParser so other collector Parsers can be able to use them.
Update mond's design document
Update mond's design document to describe the data collectors asstateless or stateful.
Fix formatting of instance names in config verify
Instance object were incorrectly treated as instance UUID's which causedan exception to be raised. Using the names of the instance objectsdirectly fixes this problem.
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.
Fix verify config if a node has no instances
Do not try to provide a fake instance UUID called "no instances", astrying to get the name for would fail and raise an exception.
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>
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>
Check for luxid permission during verify config
confd no longer needs access to the noded certificate file, but luxiddoes. Change the check to use the right user.
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....
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 bepossible to try to update a non-existing entry.
(The same patch is in stable-2.7 as 106441d already)....
ganeti.backend_unittest: chmod restricted cmd dir
TestVerifyRestrictedCmdDirectory.testNormal implicitly relies on the currentumask to check the behaviour of backend._VerifyRestrictedCmdDirectory. However,when run under a more relaxed umask (as in the case of the Debian buildd's...
Fix formatting of tuple in error message
The missing str() call caused to raise another exception than the wantedone. Transforming the tuple to string fixes this problem.
Mark the UUID design doc as implemented
The code implementing the UUID design document is included in Ganeti 2.8.
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.
Fix formatting error in the UPGRADE document
An item of the enumerated list was not rendered correctly.
Make build_chroot compatible with Squeeze
Modify build_chroot to make it compatible with debian Squeeze. Thisis done by using a function instead of a alias for the command thatwas failing.
Fixes Issue 507.
Signed-off-by: Michele Tartara <mtartara@google.com>...
Update security doc and NEWS for luxid
Document the split of luxid from confd in security.rst and in the NEWSfile.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Add --cleanup to instance failover manpage
Describe the new parameter in the manpage of gnt-instance.
Update NEWS with failover cleanup
Describe the new feature in the NEWS file.
Add cleanup parameter to instance failover
Most of the code is shared with instance migrate, so we actually only needto 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...
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>
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.
Update NEWS file for 2.8 wrt vnet_hdr KVM hvparam
Document the addition of the vnet_hdr HV parameter for KVM in the NEWSfile for 2.8.
Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>Reviewed-by: Guido Trotter <ultrotter@google.com>
Document the vnet_hdr HV parameter for KVM
Document the vnet_hdr HV parameter for KVM in the gnt-instance man page.
Format gnt-network info group output
gnt-network info currently displays the connected group output unformatted:
This patch adds formatting to the node group output....
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>
Typos in ganeti-os-interface.rst
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
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 QAinconsistently. This is fixed by this patch now....
Update NEWS file wrt shared file storage
Mention the the changes related to shared file storagein the NEWS file.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
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.
QA: skip lvm-based tests if lvm disabled
QA tests should make sure not to be run if the necessaryenvironment for them is not present. This patch fixes thatfor a couple of tests that fail to check that before beingexecuted.
Signed-off-by: Helga Velroyen <helgav@google.com>...
QA: test for --{shared,}-file-storage-dir
This adds tests for 'gnt-cluster modify' wrt to theoptions --shared-file-storage-dir=... and--file-storage-dir. It also separates the two directories'specification in the QA configuration.
gnt-cluster verify: consider shared file storage
This patch enhances 'gnt-cluster verify' in a way that itnow validates the acceptance and existance of the sharedstorage directory.
gnt-cluster modify --shared-file-storage-dir
This patch introduces to 'gnt-cluster modify' the option'--shared-file-storage-dir' to change the default directoryfor instances using shared file storage at cluster runtime.
Remove obsolete autoconf variable from remaining files
This removes the obsolete autoconf variable'ENABLE_SHARED_FILE_STORAGE' from all remaining files.
objects.py: remove fallback to autoconf
The online-update function of the cluster config so farinspected the autoconf data to determine whether sharedfile storage is enabled. This should now totally relyon the options given at cluster initialization and thus...
Cluster-merge: determine shared file storage use from config
This patch makes cluster merge read the cluster'sconfiguration to find out whether or not sharedfile storage is enabled.
Opcodes: remove obsolete RequireSharedFileStorage function
While looking for occurences of the soon-to-be-eliminatedautoconf option 'ENABLE_SHARED_FILE_STORAGE', I discoveredthat this function uses it, but is actually never usedanyware, thus we just delete it....
Bootstrap: factor out and prepare shared-file-storage
This patch makes 'gnt-cluster init' use the'--shared-file-storage-dir' option to set the defaultshared file storage dir. Additionally, it performs thesame sanity and validity checks for the path as for...
Move default shared file storage directory to pathutils
This patch moves the default shared-file storage directoryto the pathutils file. It will be removed from configure.acat the end of this patch series.
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>
Add Ganeti 2.9 design document
This document lists the designs that have been implementedin 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>
Update NEWS for version 2.9
Also for version 2.9, sort the news entries into incompatible andcompatible changes. In this way, we keep the list of items that haveto be taking into considerations before upgrading as short as possible.
Also mention that our tests now have an additional dependency....
Increase maximum HTTP message size
After adding a new KVM parameter, RAPI queries related to KVM have becometoo big, so we need to increase this.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Fix the downgrade function of cfgupgrade
The downgrade was not correctly removing some of the UUIDs (namely, thoseof disks and NICs).
Fixes Issue 510.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Design Document for Ceph/RBD support in Ganeti
Add design document for the Ceph/RBD support in Ganeti, as it will beimplemented during a GSoC project.
Signed-off-by: Pulkit Singhal <pulkitatiiit@gmail.com>Signed-off-by: Thomas Thrainer <thomasth@google.com>...
Clarify hbal man page
In the sense of hbal, and, in fact, all htools, drained nodesare considered as offline. Also, the cluster score is not justthe sum of its component, but, e.g., the count of instances onoffline nodes is weighted stronger.
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Properly add the UUID to all the disks
Starting from Ganeti 2.8 all the disks need to have a UUID.A function for adding a UUID automatically to disks was present, but it didn'tconsider disks with children (like DRBD).
The function is modified to work recursively....
Conflicts: NEWS: trivial...
Update NEWS and version for Ganeti 2.7.1
Release 2.7.1 with a handful of minor fixes.
Add hvparam to disable VNET_HDR on tap devices
IFF_VNET_HDR allows tap devices to extract a VIRTIO_NET_HDR from pktsgoing through the tap iface, enabling segmentation offload for thevirtio nics.
Current (Debian) kernels (3.2 for Debian Squeeze backrports / Wheezy)...
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>
Extend gnt-instance show to show vlan parameter
Extensions for "gnt-instance show" to output the vlan parameter whichwas introduced by my recent patch series.This is done by extending the nic object that is used to output theinfo. Every other occurrence of this object is adopted as well....
daemon-util: pass --oknodo at rotate_logs
daemon-util's rotate_logs() did not pass --oknodo to start-stop-daemon whileHUPing the daemon processes. As a result, rotate_logs would fail for anon-running daemon causing rotate_all_logs to exit prematurely....