Hs2Py constants: add network mirrored disk templates
Add network mirrored disk template constants to the Haskell to Pythonconstant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Hs2Py constants: add SSH key files
Add SSH key file constants to the Haskell to Python constantgeneration.
Move VTypes to the appropriate place
Move 'VType' related constants to the appropriate place to matchPython's constants module.
Fix indentation
Fix indentation in 'Ganeti.OpCodes'.
Hs2Py constants: add 'osApiVersions'
Add constant 'osApiVersions' to the Haskell to Python constantgeneration. This patch fixes the type of this constant, by changingfrom 'List' to 'Set', therefore, 'Ganeti.Query.Server' is updatedaccordingly.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>...
Hs2Py constants: add 'ReplaceDisksMode' related constants
Add constants related to the Haskell type 'ReplaceDisksMode'. Thedata type declaration for 'ReplaceDisksMode' is also moved from'Ganeti.OpParams' to 'Ganeti.Types' because it used to be used only by...
Hs2Py constants: add RPC timeout constants
Add RPC timeout related constants to the Haskell to Python constantgeneration. The Haskell data type 'RpcTimeout' is moved from'Ganeti.Rpc' to 'Ganeti.Types' so it can be used by'Ganeti.HsConstants' without causing circularity problems with...
Hs2Py constants: add node parameter related constants
Add node parameter related constants to the Haskell to Python constantgeneration. This patch also fixes a type inconsistency betweenHaskell and Python, namely, 'ndsParameterTypes' and'ndsParameterTitles' become 'Map's instead of 'Tuple's, which allows...
Hs2Py constants: constants related to 'Ganeti.Htools.Types'
Add constants related to the Haskell types defined in'Ganeti.Htools.Types' to the Haskell to Python constant generation.
Hs2Py constants: add local disk status
Add constants related to local disk status to the Haskell to Pythonconstant generation. A new Haskell type 'LocalDiskStatus' is addedsimilarly to the constants that have been added previously in otherHs2Py patches....
Hs2Py constants: add 'fileDriver'
Add constant 'fileDriver' to the Haskell to Python constantgeneration. The constant 'FILE_DRIVER' is also moved to theappropriate place in 'lib/constants.py'.
Hs2Py constants: add Luxi constants
Add Luxi related constants to the Haskell to Python constantgeneration. A new Haskell type is added 'Ganeti.Types.PythonChar' towrap the Python character type.
Hs2Py constants: update forgotten 'SOCAT_ESCAPE_CODE'
Update constant 'SOCAT_ESCAPE_CODE' to retrieve its value from thegenerated 'lib/_constants.py'. The Haskell counterpart of thisconstant, namely, 'socatEscapeCode', has already been added.
Fix documentation comment
Fix documentation comment in 'Ganeti.ConstantUtils'.
Disregard comments in 'src/Ganeti/ListContants.hs' target
Update target 'src/Ganeti/ListContants.hs' to disregard comments in'src.Ganeti.HsContants' when extracting the names of the constantsthat need to be generated from Haskell to Python.
Fix typo in documentation
Fix typo in documentation in 'Ganeti.JSON'.
Hs2Py constants: add more constants
Add more constants to the Haskell to Python constant generation.
Hs2Py constants: add 'Ganeti.Confd' types
Hs2Py constants: add 'Ganeti.Confd' types.
Hs2Py constants: add confd requests
Add confd request related constants to the Haskell to Python constantgeneration.
Update reference to proper module
Update reference to constant 'confdMagicFourcc' to fetch its valuefrom 'Ganeti.Constants' instead of the re-export from module'Ganeti.Confd.Types'.
Add 'declareILADT' to declare integer literal datatypes
Add 'declareILADT' to declare integer literal datatypes.
Move confd request constants to 'Ganeti.ConstantUtils'
Add --resume option to 'gnt-cluster upgrade'
This option will resume an upgrade of the Ganeti version ofa cluster that got interrupted by a reboot of the master node,or similar event.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Add function to determine current configuration version
The 'gnt-cluster upgrade --resume' command needs to determine whether theconfiguration has already been updated or not, in order to decide at whichphase to resume. So provide a function to determine the version of the...
Add method to read and parse the intent-to-upgrade file
During upgrades, a file is written to disk on master that documentsthe fact that an upgrade is currently in progress. Add a functionto parse it.
Provide utility function to check a configuration version
In order for 'gnt-cluster upgrade --resume' to determine whether the configurationis already upgraded, it needs to compare whether a configuration version is compatiblewith a Ganeti target version. Provide a utility function for this....
Fix typo in doc string
Write the intent-to-upgrade file during upgrades
To recognize that an upgrade attempt of a cluster was interrupted by apower failure or similar, write a file into the file system documentingthat currently an upgrade is in progress.
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
Provide an inverse to UnescapeAndSplit
With utils.UnescapeAndSplit, we have a function to parsearbitrary non-empty string lists encoded as strings. Alsoprovide the appropriate encoding function.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Specify the intent-to-upgrade path
During a Ganeti upgrade, 'gnt-cluster upgrade --to' documents thefact that an upgrade is going on in a file, in case of a power failureon the master node. Specify the full file name in pathutils.
Hardcode default access mode to kernelspace
Hardcode constants.KERNELSPACE as the default access method forKVM disk templates, rather than allowing a change to the RBD defaultaccess mode to affect all disk templates for KVM.
At some point in the future it might make more sense to have this...
Mention the private-module layout in NEWS
As the new private-module layout of Ganeti's python code impliesthe 'import ganeti' will fail in python, this change is incompatible,and hence should be mentioned. The impact is, however, limited, as theinternal API was never promised to be a stable interface....
Get NEWS sections in consistent order
For all releases, the section on incompatible changes comes first,as these changes are the ones to take most care of. New featuresare not as important, as they can safely be ignored if you have nouse for them. Get the section on version 2.10.0 into that order, too....
Handle scenarios where access is not set
It should not be possible to reach _GenerateKVMRuntime without havingthe access method set, but if it does happen this commit makes surethe default value is used anyway.
Signed-off-by: Raffa Santi <rsanti@google.com>...
Document gnt-cluster upgrade in the man page
A new command, upgrade, was added to gnt-cluster. Document it.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Jose Lopes <jabolopes@google.com>
Add an upgrade command to gnt-cluster
This command will coordinate the switching to a newGaneti version across the cluster. This has becomepossible by the new layout that allows several Ganetiversions to be present at the same time.
Provide the DIRVERSION as a constant
Depending on configure options, the version string used in the nameof the version specific directory differs. Provide this string alsoas a constant, as it is needed for the upgrade procedure, in order tobe able to roll back....
Provide time constants related to upgrades
During upgrades, gnt-cluster needs to wait for all jobsin the queue to finish. Provide constants for timeout andpolling interval.
Add option to redist-conf while queue is drained
Add a new option to 'gnt-cluster redist-conf' allowing to ignore a drainedstate of the Ganeti queue. This is needed (until we implement the fine-grainedqueue control) during upgrades, as here we have to redistribute the configuration...
Provide means of submitting jobs to a drained queue
During an upgrade, the job queue needs to be drained in order to avoidnew jobs coming to the cluster. Nevertheless, the upgrade processneeds to carry out some maintenance, like redistributing the new...
Expose sharedir in pathutils
This path is needed to construct the link targetfor $(sysconfdir)/ganeti/share for a different version.The latter will happen in the automated upgrade procedure.
Provide path to ensure-dirs in pathutils
Provide the canonical path to cfgupgrade in pathutils
This is the version-independent path for cfgupgrade, that willalways refer to the cfgupgrade of the currently installed version.
Expose the list of online nodes at ssconf
Ganeti's ssconf contains the list of nodes currently consideredonline. Expose this data at the ssconf interface.
Also export PKGLIBDIR in pathutils
Add predicate whether to call cfgupgrade --downgrade
Provide a predicate that, given the current version and theversion to go to, tells whether it is appropriate to callcfgupgrade --downgrade.
Add utility function to recognize upgrade ranges
Upgrading is possible within the same major version to any equalor higher minor version. Downgrading is possible within the samemajor version to the previous minor version. Moreover, automaticupgrades are only supported from version 2.10 onwards. Add a utility...
Also provide the program version
Conceptionally, the versions of the program, the protocols, and theconfiguration are three different things, even though, currently thereis a tight coupling. So export the version as well, as the upgradesare designed to make decisions based on the version....
Add utility function to parse version strings
The new 'gnt-cluster upgrade' command will get a Ganeti version asargument. So provide a function able to parse it.
Update NEWS and docs to document access switch
Signed-off-by: Santi Raffa <rsanti@google.com>Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Add tests specific to the user/kernelspace access feature
Check that the validation procedures don't accept invalid valuesand also don't choke on valid values.
Signed-off-by: Santi Raffa <rsanti@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
Check validity of the access protocol parameter
Add Userspace RBD support in KVM
New method GetUserspaceAccessURI in storage class
Returns a hypervisor specific URI for RBD template when userspaceaccess is requested.
Define 'access' disk-parameter type
Add the "access" parameter to the RBD configuration. Fix test brokenby this change.
Merge 'EvacNode' and 'NodeEvacMode'
Merge 'EvacMode' and 'NodeEvacMode' which are associated with theduplicated constants 'IALLOCATOR_NEVAC_*' and 'NODE_EVAC_*'. Thismerge moves the type 'EvacMode' to 'Ganeti.Types' in order to avoid acircular dependency between 'Ganeti.HsConstants' and...
Remove duplicate 'IALLOCATOR_NEVAC_*' constants
Constants 'IALLOCATOR_NEVAC_*' are duplicates of 'NODE_EVAC_*' and areno longer being used so they can be removed. Fixes issue 583.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Replace 'IALLOCATOR_NEVAC_*' with 'NODE_EVAC_*'
Replace uses of 'IALLOCATOR_NEVAC_PRI', 'IALLOCATOR_NEVAC_SEC','IALLOCATOR_NEVAC_ALL', and 'IALLOCATOR_NEVAC_MODES', with'NODE_EVAC_PRI', 'NODE_EVAC_SEC', 'NODE_EVAC_ALL', and'NODE_EVAC_MODES', given that these constants are repeated....
Add soundhw support to XEN hypervisors
This allows XEN hypervisors to enable sound support, if the hostmachines has required support. This has been tested only up to thepoint of making sure the xen config file has the requiredconfiguration values as per:...
Add cpuid support to XEN hypervisors
Ease instance migration between heterogeneous nodes by letting systemadministrators hide CPU capabilities as needed.
Merge branch 'stable-2.9' into master
Version bump for 2.9.0 rc1
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
configure: check for hslogger
As hslogger is, from 2.9 onwards, a mandatory dependency,check for it unconditionally.
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.
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.
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.
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.
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.