Add cpuid support to XEN hypervisors
Ease instance migration between heterogeneous nodes by letting systemadministrators hide CPU capabilities as needed.
Signed-off-by: Santi Raffa <rsanti@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Merge branch 'stable-2.9' into master
Version bump for 2.9.0 rc1
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Update NEWS for 2.9.0 rc1
Make the main 2.9 entry now describe 2.9.0 rc1and a short "Since 2.9.0 beta1" section.
Disable hlint camelcase on test module
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Jose Lopes <jabolopes@google.com>
configure: check for hslogger
As hslogger is, from 2.9 onwards, a mandatory dependency,check for it unconditionally.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Document hslogger dependency in NEWS
hslogger is now no longer optional (as it used to be in 2.8). Updatethe NEWS file accordingly.
Update INSTALL: hslogger is mandatory
hslogger is a mandatory Haskell dependency form 2.9 onwards. Henceupdate the INSTALL instructions accordingly.
Update installation instruction for Debian
In the instructions on how to install Ganeti on Debian, havethe commands for Wheezy as default and mention the commands forSqueeze as other versions, rather than defaulting to Squeeze.
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Add test for mond-data mock file
Test if the input file imported with the --mond-data option isparsed properly.
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Import MonD data from file
Implement functionality to import MonD data from a mock file toHTools (mainly for testing purposes) with the --mond-dataoption.
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>Signed-off-by: Michele Tartara <mtartara@google.com>...
Implement readJSON functions for DC Types
Implement readJSON functions for DCCategory, DCVersion andDCKind in Data Collectors's Types to be parsable from a JSONformatted file. Also, implement a utility function tocapitalize the first character of a string....
Fetch data from MonD to HTools
Contact all MonDs from HTools to fetch data from its DataCollectors (only CPUload Data Collector is queried at themoment). This information is available to all HTools with the--mond option and can be ignored if the --ignore-dynu option is...
Add MonD's latest API Version in lib/constants.py
Extract the version number from MonD's own file into the constants file, so thatis can be accessed from other parts of the system as well (e.g.: to performqueries over the MonD protocol).
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>...
Update hail, hbal and htools man-pages
Update hail, hbal and htools man-pages to include the use of dataprovided by MonD.
Add documentation for diskstats collector
The data collector for /proc/diskstats was undocumented. Add an entry for it inthe mon-collector man page.
Also, remove some end of line whitespaces from the file.
Signed-off-by: Michele Tartara <mtartara@google.com>...
Merge branch 'stable-2.8' into stable-2.9
Conflicts: Makefile.am NEWS configure.ac doc/design-draft.rst...
Fix wrong release date in the NEWS file
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Version bump for 2.8.0
Also, update the NEWS file accordingly.
Prevent lint error in mocked classes
Accessing private methods of parent classes is bad, but it is sometimes the bestapproach for classes mocking them for testing reasons.Selectively disable the related lint error just for the few functions that needto do it....
Fix indentation for newer lints
Newer versions of pylint are more strict regarding indentation rules. Thiscommit fixes a couple of indentations that they consider wrong.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Add daemon split design doc
This describes the future planned structure of Ganeti daemons.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Make the inst-status-xen collector more resilient
The data collectors should be able to provide as much information as possibleeven when the system is badly degraded. This patch modifies the instance statuscollector for xen so that it can keep providing as much data as possible, even...
Use secondary IP when moving instances
All data traffic usually goes over the secondary network, butgnt-instance move didn't. This patch corrects this problem by using thetarget nodes secondary IP as move target.
Signed-off-by: Thomas Thrainer <thomasth@google.com>...
Add 'generated from' comments in Hs2py constants
Modify Hs2Py constants to include a comment in the generated commentsdescribing the source of those constants. Fixes issue 588.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Honor disks_active of instance when adding disks
Adding a disk to an instance used to leave the disk behind activated, nomatter how the disks_active flag of the instance was. This changes makesure that new disks are only active if the other disks of the instance...
Mention changed default disk add behavior in NEWS
As the default behavior of adding disks has changed (now waiting fordisk synchronization is done per default), mention this change in theNEWS file.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Document --no-wait-for-sync for adding disks
The already present option '--no-wait-for-sync' in`gnt-instance modify` is now also mentioned in the part which describesadding a disk.
Wait for disk sync when adding a disk
When creating an instance, gnt-instance waits for instance disks tosync. Inconsistently, this was not the case for adding a disk to aninstance. This patch changes the default behavior to wait for sync whenadding a disk, but honor the --no-wait-for-sync option which...
Merge branch 'stable-2.7' into stable-2.8
Conflicts are trivially solved.
Conflicts: NEWS...
Version bump for 2.7.2
Change the version number and the NEWS file for the 2.7.2 bugfix release.
Signed-off-by: Michele Tartara <mtartara@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Haskell test modules contain functions which have names containingunderscore. Add hlint annotation to disable this check.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Fix expansion in Makefile.am
Fix comment in 'configure.ac'
Fix comment for a configure parameter in 'configure.ac' to beconsistent with the remaining parameters.
Fix 'src/mon-collector.hs' source in dist
This patch fixes 'Makefile.am' to include the source file of'mon-collector' in the distribution tarball even if the monitoringdaemon has been disabled at configure time. Fixes issue 587.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>...
Move 'BuildVersion' to 'lib/utils/version.py'
Functions 'BuildVersion' and 'SplitVersion' are no longer needed bythe constants and, given that they are not constants, they should bemoved elsewhere. Since they are only used by 'cfgupgrade' and tests,these functions are moved to 'lib/utils/version.py' and references to...
HUnit test for 'buildVersion'
Add 'HUnit' test for 'buildVersion'.
Remove '_autoconf'
The previous patch has made '_autoconf' obsolete. This patchcompletely removes '_autoconf' and the 'Makefile' targets for it.
Hs2Py constants: update Python references
Update references to constants that were previously in the generated'lib/_autoconf.py' and since the previous patch have been included inthe Hs2Py constant generation.
Hs2Py constants: add remaining '_autoconf.*' constants
Add remaining constants which in Python are imported from thegenerated 'lib/_autoconf.py'. This will allow to completely removethis module.
Hs2Py constants: update Python references to autoconf
Update Python references to all constants that used to point to thegenerated 'lib/_autoconf.py', which has been superseeded by theHaskell counterpart 'src/AutoConf.hs'.
Hs2Py constants: add all 'AutoConf' and related constants
Add all constants in 'AutoConf' to the Hs2Py constant generation and'socatEscapeCode' because it is part of the group containing'socatPath', 'socatUseCompress', and 'socatUseEscape'.
Add 'buildVersion' for calculating Ganeti versions
Add 'buildVersion' which calculates Ganeti versions and it is theHaskell counterpart of 'BuildVersion' in 'lib/constants.py'.
Fix sign in default-yes for --enable-versionfull
The default for using the full version string in the directoryis not to use it. If the option --enable-versionfull is given,its argument should default to yes. That means that everythingthat is not a "no" should be interpreted as yes....
Including missing RST files in packaging
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
The patch was released by the author into the public domain.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Update supported lint tools version numbers
Linting is now verified against the lint tools version numbers as listed in thispatch.
These version are corresponding to the ones that can be found in therepositories of Ubuntu 13.04.
Fix some wrong indentations in the code
Fix all instances of pep8's error: "E128 continuation line under-indented forvisual indent".
Disable parenthesis indentation check
More recent versions of pep8 check for the indentation level of closingparenthesis in a way that is incompatible with the way we use in our code. Ourstyle is still pep8 compliant, and was re-allowed in even more recent versions...
Fix an improperly escaped string
Mark a string representing a "sed" command including a regular expression as araw string, so that the entire escaping is performed by "sed" itself.
Make QaConfig a proper container
Newer pylint versions complain that QaConfig is not a proper container becauseit does not implement the len(), delitem() and setitem() methods.This commit implements them.
Make QmpMessage a proper container
Newer pylint versions complain that QmpMessage is not a proper container becauseit does not implement the len() and delitem() methods. This commitimplements them.
Also, tests are added.
Prevent static field checking for dynamic classes
In order to check for the correctness of the accesses to fields of objects,pylint uses astng, but this is known to fail on some dynamically generatedclasses. Still, newer pylint versions are stricter at performing this check, and...
Fix metaclasses support in recent pylint versions
Recent versions of pylint require the first parameter of a metaclass to be"cls". Older versions want "mcs". There's no way to support both by changing thecode, so the configuration file of pylint is changed instead, to have the...
Update references of Python constants in the previous patch to fetchtheir values from the generated Haskell to Python constants.
Hs2Py constants: add 'confd' related constants
Add 'confd' related constants to the Hs2Py constant generation.
Update references of the Python constants that were introduced in theprevious patch.
Hs2Py constants: add some constants
Add 'opcodeReason', 'diskstatsFile', 'statFile', and'mondTimeInterval', to the Hs2Py constant generation.
Organize Haskell constants
Reorder Haskell constants to match the order in the Python constantsmodule 'lib/constants.py' to make it easier to debug/trace the Hs2Pyconstant migration process.
design: replace 'gnt-upgrade' by 'gnt-cluster upgrade'
Instead of using a separate binary, add the upgradefunctionality to gnt-cluster.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Fix RPC call to blockdev_getdimensions
The parameter format for call_blockdev_getdimensions has changed in aprevious patch. Here, the correct parameter format is used for the RPCcall.
Fix cfgupgrade test wrt. downgrading physical_id
The physical_id field can't be recreated during downgrades, so don'texpect it to be during the test.
Display node names instead of node UUIDs
Display resolved node names instead of node UUIDs in a couple ofwarnings and log messages.
Only serialize dynamic_params on demand
To make sure that the dynamic_params field is not serialized by accidentto the configuration file only include it in the serialization whenexplicitly asked for.
Remove physical_id field reference from tools
Remove remaining references to the physical_id field in cluster-mergeand sanitize-config.
Remove physical_id field from disks during upgrade
The physical_id field is no longer supported in disk objects, so removeit during upgrades.
Remove physical_id from config mock
Disk objects no longer support the physical_id field, so remove it frommocked disk objects.
Fix tests related to the physical_id field
Remove all references to the physical_id field of disk objects in tests.
Remove physical_id field from disk object
The 'physical_id' field of disk objects is no longer used, so remove it.Also, all references are removed together with the code which made surethat the physical_id is up to date when transmitted over RPC.
Replace physical_id with dynamic_params
The disk field 'physical_id' has to be kept up to date whenever a diskobject is sent to a node via RPC. This is done with the SetDiskID methodmanually, which is a source of bugs.
This patch replaces the use of 'physical_id' with a new field names...
Fix typo
Fix typo in comment.
Handle $(python_scripts) and tools/burnin as python scripts
With the new private-module layout, python scripts using theganeti module must end up in $(versionedsharedir) in orderto see this private module.
Provide PYTHONPATH to burnin
One feature of the new private-module layout is that a pythonscript cannot simply 'import ganeti'. The reason is that theinterfaces to these modules are not stable and hence should notbe used outside Ganeti. However, this is what the burnin test...
Export VERSIONEDSHAREDIR to _autoconf.py
Fix 'AutoConf.hs.in' template substitution
Fix 'AutoConf.hs.in' template substitution, namely, change 'SOCAT' to'SOCAT_PATH' to match the value used in the invocation of 'm4' in thetarget 'src/AutoConf.hs' in 'Makefile.am'.
Also install the version-dependent links forcefully
In this way, with default configuration options, runningmake install twice in a row succeeds. Fixes issue 567.
Hs2Py constants: update 'SF_*' references
Update references to storage field Python constants to fetch theirvalues from 'lib/_constants.py'.
Hs2Py constants: add storage fields
Add storage fields constants to the Haskell to Python constantgeneration. These constants fetch their values from the Haskell datatype 'StorageField'.
Move 'StorageField' to 'Ganeti.Types'
Move 'StorageField' to 'Ganeti.Types' in order to break thecircularity of 'Ganeti.Rpc' and be able to generate constants fromthis Haskell data type.
Fix 'TOOLSDIR' when passed to 'src/AutoConf.hs'
Remove trailing parenthesis in 'TOOLSDIR' 'configure' variable whenpassed to 'm4' to generate 'src/AutoConf.hs'.
Add additional tests for utils.Retry
Also have some tests where the time the various components(inspecting the time function, calling the function, etc) havea non-trivial time. Also, have two tests demonstrating thatthe number of retries actually depends on the amount of time...
Make retry tests independent of actual time
Even in the tests, real time is used. While, generally, the assumptionsabout execution time are pretty safe, in some rare circumstances, e.g.,on machines with extremely heavy load they do not hold true, thus rendering...
Fix corner-case in handling of remaining retry time
Consider a remaining time of 0 as already timed out. Otherwise,there is no guarantee that calling utils.Retry with timeout 0will call the function precisely once; it might run in timeshorter than the resolution of timer....
Improves allocation parameters check in move-instance
If the target cluster has a default iallocator, no allocation paramsare needed. The parameter checks take this into account and do notshow errors anymore.
Signed-off-by: Hrvoje Ribicic <riba@google.com>...
Move-instance can now change the disk template while moving
By using the --dest-disk-template option, the move-instance utilitycan change the disk template of the moved instance on-the-fly.This is done by simply altering the disk template of the instance...
Update references to the Python constants generated in the previouspatch.
Hs2Py constants: add constants from types
Add the constants to the Hs2Py constant generation from the Haskelldata types moved in the previous patch.
Move data types from 'Objects' to 'Types'
Move several Haskell data types from 'Ganeti.Objects' to'Ganeti.Types' in order to be able to generate constants whileavoiding module circularity.
Fix conflicting path values from 'configure'
Because the Hs2Py constant generation infrastructure is transitional,there are two generated 'autoconf' modules, namely, 'src/AutoConf.hs'and 'lib/_autoconf.py'. However, conflicting values were beinggenerated for Haskell and Python concerning the variables...
Fix constants for OOB commands
Fix values of the constants for OOB commands, namely, 'oobPowerOn' and'oobPowerCycle'.
The $(gnt_python_sbin_SCRIPTS) are GENERATED_FILES
Before the layout change, the corresponding scripts used to bepart of PYTHON_BOOTSTRAP, hence were already considered asgenerated.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>...
For exported paths, use the canonical ones
Some paths set that are set at configure time are needed at runtime. These are exported by the Makefile. Change this to export the"canonical", unversioned, ones. This also has the advantage, thattools do not have to know which programs are python scripts (where,...
Update description of --enable-symlinks
As most of the symlinks in our setup are, in fact, independentof the Ganeti version, they can be installed unconditionally. Sothe --enable-symlinks configure option now only controls a smallnumber of symlinks that decide which version of Ganeti is used....
Adapt the version-dependent symlinks to the new design
With the latest change of our update design, there are only twosymbolic links left, that are specific to a particular version.Those are only installed, if requested.
Add the version-independent symbolic links
According to our new upgrade design, a couple of links areversion-independent, and should be installed always.
Make version granularity a configure option
From 2.10 onwards, all files are installed into versioneddirectories. As everything stays compatible between revisions,it is not technically necessary, to have revisions included inthe directories. Nevertheless, there are situations where this...
Adapt the base directories according to new layout
The file layout described in the upgrades design document has changed.Adapt the base directories accordingly.