Klaus Aehlig [Fri, 4 Oct 2013 17:07:19 +0000 (19:07 +0200)]
Provide an inverse to UnescapeAndSplit
With utils.UnescapeAndSplit, we have a function to parse
arbitrary non-empty string lists encoded as strings. Also
provide the appropriate encoding function.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Fri, 4 Oct 2013 15:53:04 +0000 (17:53 +0200)]
Specify the intent-to-upgrade path
During a Ganeti upgrade, 'gnt-cluster upgrade --to' documents the
fact that an upgrade is going on in a file, in case of a power failure
on the master node. Specify the full file name in pathutils.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Raffa Santi [Mon, 7 Oct 2013 09:27:49 +0000 (11:27 +0200)]
Hardcode default access mode to kernelspace
Hardcode constants.KERNELSPACE as the default access method for
KVM disk templates, rather than allowing a change to the RBD default
access mode to affect all disk templates for KVM.
At some point in the future it might make more sense to have this
value as its own constant, but as it stands it makes little sense:
only one of several disk templates and one of several hypervisors
support an userspace option to begin with.
Signed-off-by: Raffa Santi <rsanti@google.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Fri, 4 Oct 2013 15:05:08 +0000 (17:05 +0200)]
Mention the private-module layout in NEWS
As the new private-module layout of Ganeti's python code implies
the 'import ganeti' will fail in python, this change is incompatible,
and hence should be mentioned. The impact is, however, limited, as the
internal API was never promised to be a stable interface.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Fri, 4 Oct 2013 14:59:43 +0000 (16:59 +0200)]
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 features
are not as important, as they can safely be ignored if you have no
use for them. Get the section on version 2.10.0 into that order, too.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Santi Raffa [Fri, 4 Oct 2013 11:54:39 +0000 (13:54 +0200)]
Handle scenarios where access is not set
It should not be possible to reach _GenerateKVMRuntime without having
the access method set, but if it does happen this commit makes sure
the default value is used anyway.
Signed-off-by: Raffa Santi <rsanti@google.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Wed, 2 Oct 2013 08:00:49 +0000 (10:00 +0200)]
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>
Klaus Aehlig [Tue, 24 Sep 2013 10:43:33 +0000 (12:43 +0200)]
Add an upgrade command to gnt-cluster
This command will coordinate the switching to a new
Ganeti version across the cluster. This has become
possible by the new layout that allows several Ganeti
versions to be present at the same time.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Tue, 1 Oct 2013 09:16:40 +0000 (11:16 +0200)]
Provide the DIRVERSION as a constant
Depending on configure options, the version string used in the name
of the version specific directory differs. Provide this string also
as a constant, as it is needed for the upgrade procedure, in order to
be able to roll back.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Tue, 1 Oct 2013 08:00:45 +0000 (10:00 +0200)]
Provide time constants related to upgrades
During upgrades, gnt-cluster needs to wait for all jobs
in the queue to finish. Provide constants for timeout and
polling interval.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Mon, 30 Sep 2013 11:59:31 +0000 (13:59 +0200)]
Add option to redist-conf while queue is drained
Add a new option to 'gnt-cluster redist-conf' allowing to ignore a drained
state of the Ganeti queue. This is needed (until we implement the fine-grained
queue control) during upgrades, as here we have to redistribute the configuration
to all nodes before undraining the queue.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Fri, 27 Sep 2013 16:26:28 +0000 (18:26 +0200)]
Provide means of submitting jobs to a drained queue
During an upgrade, the job queue needs to be drained in order to avoid
new jobs coming to the cluster. Nevertheless, the upgrade process
needs to carry out some maintenance, like redistributing the new
configuration, therefore, this patch provides a means of submitting
jobs to a drained queue.
Of course, once the more fine-grained job queue control will be implemented,
this functionality can be removed.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Fri, 27 Sep 2013 13:27:06 +0000 (15:27 +0200)]
Expose sharedir in pathutils
This path is needed to construct the link target
for $(sysconfdir)/ganeti/share for a different version.
The latter will happen in the automated upgrade procedure.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Wed, 2 Oct 2013 07:06:36 +0000 (09:06 +0200)]
Provide path to ensure-dirs in pathutils
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Thu, 26 Sep 2013 15:06:10 +0000 (17:06 +0200)]
Provide the canonical path to cfgupgrade in pathutils
This is the version-independent path for cfgupgrade, that will
always refer to the cfgupgrade of the currently installed version.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Wed, 25 Sep 2013 09:30:21 +0000 (11:30 +0200)]
Expose the list of online nodes at ssconf
Ganeti's ssconf contains the list of nodes currently considered
online. Expose this data at the ssconf interface.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Tue, 24 Sep 2013 16:42:20 +0000 (18:42 +0200)]
Also export PKGLIBDIR in pathutils
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Thu, 26 Sep 2013 14:15:22 +0000 (16:15 +0200)]
Add predicate whether to call cfgupgrade --downgrade
Provide a predicate that, given the current version and the
version to go to, tells whether it is appropriate to call
cfgupgrade --downgrade.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Tue, 24 Sep 2013 12:04:20 +0000 (14:04 +0200)]
Add utility function to recognize upgrade ranges
Upgrading is possible within the same major version to any equal
or higher minor version. Downgrading is possible within the same
major version to the previous minor version. Moreover, automatic
upgrades are only supported from version 2.10 onwards. Add a utility
function implementing this logic.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Thu, 26 Sep 2013 13:06:09 +0000 (15:06 +0200)]
Also provide the program version
Conceptionally, the versions of the program, the protocols, and the
configuration are three different things, even though, currently there
is a tight coupling. So export the version as well, as the upgrades
are designed to make decisions based on the version.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Tue, 24 Sep 2013 07:55:00 +0000 (09:55 +0200)]
Add utility function to parse version strings
The new 'gnt-cluster upgrade' command will get a Ganeti version as
argument. So provide a function able to parse it.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Raffa Santi [Wed, 2 Oct 2013 09:02:36 +0000 (11:02 +0200)]
Update NEWS and docs to document access switch
* Update NEWS file
* Update man page
* Update install.rst
Signed-off-by: Santi Raffa <rsanti@google.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Raffa Santi [Wed, 2 Oct 2013 09:02:35 +0000 (11:02 +0200)]
Add tests specific to the user/kernelspace access feature
Check that the validation procedures don't accept invalid values
and also don't choke on valid values.
Signed-off-by: Santi Raffa <rsanti@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Raffa Santi [Wed, 2 Oct 2013 09:02:34 +0000 (11:02 +0200)]
Check validity of the access protocol parameter
* Prevent incompatible hypervisor/disk template/access type
combinations from being reached through the command line.
* Prevent the access config from taking illegal values such as "pink
bunny" through the command line.
Signed-off-by: Santi Raffa <rsanti@google.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Raffa Santi [Wed, 2 Oct 2013 09:02:33 +0000 (11:02 +0200)]
Add Userspace RBD support in KVM
* Add device class object in block_device tuple
* Update hv_xen.py for new block_devices format
* Fix tests broken by the change
Signed-off-by: Santi Raffa <rsanti@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Raffa Santi [Wed, 2 Oct 2013 09:02:32 +0000 (11:02 +0200)]
New method GetUserspaceAccessURI in storage class
Returns a hypervisor specific URI for RBD template when userspace
access is requested.
Signed-off-by: Santi Raffa <rsanti@google.com>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Raffa Santi [Wed, 2 Oct 2013 09:02:31 +0000 (11:02 +0200)]
Define 'access' disk-parameter type
Add the "access" parameter to the RBD configuration. Fix test broken
by this change.
Signed-off-by: Santi Raffa <rsanti@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Wed, 25 Sep 2013 13:40:14 +0000 (15:40 +0200)]
Merge 'EvacNode' and 'NodeEvacMode'
Merge 'EvacMode' and 'NodeEvacMode' which are associated with the
duplicated constants 'IALLOCATOR_NEVAC_*' and 'NODE_EVAC_*'. This
merge moves the type 'EvacMode' to 'Ganeti.Types' in order to avoid a
circular dependency between 'Ganeti.HsConstants' and
'Ganeti.HTools.Types'. The type 'EvacMode' is preferred to the type
'NodeEvacMode' given that its use is more widespread.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Jose A. Lopes [Wed, 25 Sep 2013 11:10:08 +0000 (13:10 +0200)]
Remove duplicate 'IALLOCATOR_NEVAC_*' constants
Constants 'IALLOCATOR_NEVAC_*' are duplicates of 'NODE_EVAC_*' and are
no 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>
Jose A. Lopes [Wed, 25 Sep 2013 12:16:51 +0000 (14:16 +0200)]
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.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Raffa Santi [Thu, 29 Aug 2013 12:15:11 +0000 (14:15 +0200)]
Add soundhw support to XEN hypervisors
This allows XEN hypervisors to enable sound support, if the host
machines has required support. This has been tested only up to the
point of making sure the xen config file has the required
configuration values as per:
http://xenbits.xen.org/docs/4.2-testing/man/xl.cfg.5.html
This feature may or may not be available on xen versions prior
to 4.2
Signed-off-by: Santi Raffa <rsanti@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Santi Raffa [Wed, 2 Oct 2013 09:37:23 +0000 (11:37 +0200)]
Add cpuid support to XEN hypervisors
Ease instance migration between heterogeneous nodes by letting system
administrators hide CPU capabilities as needed.
Signed-off-by: Santi Raffa <rsanti@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Tue, 1 Oct 2013 15:28:24 +0000 (17:28 +0200)]
Merge branch 'stable-2.9' into master
* stable-2.9
Version bump for 2.9.0 rc1
Update NEWS for 2.9.0 rc1
configure: check for hslogger
Document hslogger dependency in NEWS
Update INSTALL: hslogger is mandatory
Update installation instruction for Debian
Add documentation for diskstats collector
Make the inst-status-xen collector more resilient
Use secondary IP when moving instances
* stable-2.8
Fix wrong release date in the NEWS file
Version bump for 2.8.0
Add daemon split design doc
* stable-2.7
Version bump for 2.7.2
Conflicts:
NEWS
configure.ac
doc/design-draft.rst
configure.ac: ignore version bump on stable-2.9
rest: take both additions.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Klaus Aehlig [Mon, 30 Sep 2013 14:57:51 +0000 (16:57 +0200)]
Version bump for 2.9.0 rc1
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Mon, 30 Sep 2013 14:57:11 +0000 (16:57 +0200)]
Update NEWS for 2.9.0 rc1
Make the main 2.9 entry now describe 2.9.0 rc1
and a short "Since 2.9.0 beta1" section.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Mon, 30 Sep 2013 15:10:42 +0000 (17:10 +0200)]
Disable hlint camelcase on test module
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Klaus Aehlig [Mon, 30 Sep 2013 11:06:01 +0000 (13:06 +0200)]
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>
Klaus Aehlig [Mon, 30 Sep 2013 11:13:34 +0000 (13:13 +0200)]
Document hslogger dependency in NEWS
hslogger is now no longer optional (as it used to be in 2.8). Update
the NEWS file accordingly.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Mon, 30 Sep 2013 11:11:26 +0000 (13:11 +0200)]
Update INSTALL: hslogger is mandatory
hslogger is a mandatory Haskell dependency form 2.9 onwards. Hence
update the INSTALL instructions accordingly.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Mon, 30 Sep 2013 09:14:25 +0000 (11:14 +0200)]
Update installation instruction for Debian
In the instructions on how to install Ganeti on Debian, have
the commands for Wheezy as default and mention the commands for
Squeeze as other versions, rather than defaulting to Squeeze.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Spyros Trigazis [Mon, 30 Sep 2013 05:57:42 +0000 (08:57 +0300)]
Add test for mond-data mock file
Test if the input file imported with the --mond-data option is
parsed properly.
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 [Mon, 30 Sep 2013 05:56:59 +0000 (08:56 +0300)]
Import MonD data from file
Implement functionality to import MonD data from a mock file to
HTools (mainly for testing purposes) with the --mond-data
option.
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 [Mon, 30 Sep 2013 05:56:16 +0000 (08:56 +0300)]
Implement readJSON functions for DC Types
Implement readJSON functions for DCCategory, DCVersion and
DCKind in Data Collectors's Types to be parsable from a JSON
formatted file. Also, implement a utility function to
capitalize the first character of a string.
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 [Mon, 30 Sep 2013 05:55:27 +0000 (08:55 +0300)]
Fetch data from MonD to HTools
Contact all MonDs from HTools to fetch data from its Data
Collectors (only CPUload Data Collector is queried at the
moment). This information is available to all HTools with the
--mond option and can be ignored if the --ignore-dynu option is
enabled. This functionality is implemented in ExtLoader.hs.
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, 27 Sep 2013 10:02:00 +0000 (13:02 +0300)]
Add MonD's latest API Version in lib/constants.py
Extract the version number from MonD's own file into the constants file, so that
is can be accessed from other parts of the system as well (e.g.: to perform
queries over the MonD protocol).
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 [Mon, 30 Sep 2013 05:54:31 +0000 (08:54 +0300)]
Update hail, hbal and htools man-pages
Update hail, hbal and htools man-pages to include the use of data
provided by MonD.
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Michele Tartara [Mon, 30 Sep 2013 09:09:17 +0000 (11:09 +0200)]
Add documentation for diskstats collector
The data collector for /proc/diskstats was undocumented. Add an entry for it in
the mon-collector man page.
Also, remove some end of line whitespaces from the file.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Mon, 30 Sep 2013 07:45:54 +0000 (09:45 +0200)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8
Fix wrong release date in the NEWS file
Version bump for 2.8.0
Add daemon split design doc
* stable-2.7
Version bump for 2.7.2
Conflicts:
Makefile.am
NEWS
configure.ac
doc/design-draft.rst
configure.ac: ignore version change in stable-2.8
rest: take both additions
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Michele Tartara [Fri, 27 Sep 2013 13:02:14 +0000 (15:02 +0200)]
Fix wrong release date in the NEWS file
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Fri, 27 Sep 2013 12:32:58 +0000 (14:32 +0200)]
Version bump for 2.8.0
Also, update the NEWS file accordingly.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Fri, 27 Sep 2013 10:40:39 +0000 (10:40 +0000)]
Prevent lint error in mocked classes
Accessing private methods of parent classes is bad, but it is sometimes the best
approach for classes mocking them for testing reasons.
Selectively disable the related lint error just for the few functions that need
to do it.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Michele Tartara [Fri, 27 Sep 2013 10:39:04 +0000 (10:39 +0000)]
Fix indentation for newer lints
Newer versions of pylint are more strict regarding indentation rules. This
commit 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>
Michele Tartara [Tue, 6 Aug 2013 15:19:49 +0000 (15:19 +0000)]
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>
Michele Tartara [Thu, 26 Sep 2013 16:49:21 +0000 (16:49 +0000)]
Make the inst-status-xen collector more resilient
The data collectors should be able to provide as much information as possible
even when the system is badly degraded. This patch modifies the instance status
collector for xen so that it can keep providing as much data as possible, even
when some of the queries it performs fail, by removing exitIfBad calls and
substituting them with logging and returning empty fields instead.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Thomas Thrainer [Thu, 26 Sep 2013 09:12:35 +0000 (11:12 +0200)]
Use secondary IP when moving instances
All data traffic usually goes over the secondary network, but
gnt-instance move didn't. This patch corrects this problem by using the
target nodes secondary IP as move target.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
(cherry picked from commit
f56ab6d13212868e3ebffd14c05746dab8fb1103)
Thomas Thrainer [Thu, 26 Sep 2013 09:12:35 +0000 (11:12 +0200)]
Use secondary IP when moving instances
All data traffic usually goes over the secondary network, but
gnt-instance move didn't. This patch corrects this problem by using the
target nodes secondary IP as move target.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Jose A. Lopes [Wed, 25 Sep 2013 15:28:42 +0000 (17:28 +0200)]
Add 'generated from' comments in Hs2py constants
Modify Hs2Py constants to include a comment in the generated comments
describing the source of those constants. Fixes issue 588.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Thomas Thrainer [Wed, 25 Sep 2013 12:25:47 +0000 (14:25 +0200)]
Honor disks_active of instance when adding disks
Adding a disk to an instance used to leave the disk behind activated, no
matter how the disks_active flag of the instance was. This changes make
sure that new disks are only active if the other disks of the instance
are active too.
Tests are included.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Thomas Thrainer [Wed, 25 Sep 2013 10:33:44 +0000 (12:33 +0200)]
Mention changed default disk add behavior in NEWS
As the default behavior of adding disks has changed (now waiting for
disk synchronization is done per default), mention this change in the
NEWS file.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Thomas Thrainer [Wed, 25 Sep 2013 09:24:34 +0000 (11:24 +0200)]
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 describes
adding a disk.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Thomas Thrainer [Wed, 25 Sep 2013 09:21:08 +0000 (11:21 +0200)]
Wait for disk sync when adding a disk
When creating an instance, gnt-instance waits for instance disks to
sync. Inconsistently, this was not the case for adding a disk to an
instance. This patch changes the default behavior to wait for sync when
adding a disk, but honor the --no-wait-for-sync option which
`gnt-instance modify` already supports.
Also adapt unit tests to mock the additional RPC call.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Michele Tartara [Thu, 26 Sep 2013 11:32:57 +0000 (13:32 +0200)]
Merge branch 'stable-2.7' into stable-2.8
Conflicts are trivially solved.
* stable-2.7
Version bump for 2.7.2 (updated NEWS file)
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Conflicts:
NEWS
configure.ac
Michele Tartara [Thu, 26 Sep 2013 07:53:10 +0000 (09:53 +0200)]
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>
Klaus Aehlig [Wed, 25 Sep 2013 12:28:32 +0000 (14:28 +0200)]
Merge branch 'stable-2.9' into master
* stable-2.9
Including missing RST files in packaging
Update supported lint tools version numbers
Fix some wrong indentations in the code
Disable parenthesis indentation check
Fix an improperly escaped string
Make QaConfig a proper container
Make QmpMessage a proper container
Prevent static field checking for dynamic classes
Fix metaclasses support in recent pylint versions
* stable-2.8
Add additional tests for utils.Retry
Make retry tests independent of actual time
Fix corner-case in handling of remaining retry time
Perform proper cleanup on termination of Haskell daemons
Conflicts:
Makefile.am
doc/devnotes.rst
In doc/devnotes.rst, take version updates from
stable-2.9 while keeping the addition of mock
from master. In Makefile.am take both additions.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Wed, 25 Sep 2013 11:40:25 +0000 (13:40 +0200)]
Disable hlint camelcase on test module
Haskell test modules contain functions which have names containing
underscore. Add hlint annotation to disable this check.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Wed, 25 Sep 2013 11:53:24 +0000 (13:53 +0200)]
Merge branch 'stable-2.8' into stable-2.9
* stable-2.8
Add additional tests for utils.Retry
Make retry tests independent of actual time
Fix corner-case in handling of remaining retry time
Perform proper cleanup on termination of Haskell daemons
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Klaus Aehlig [Wed, 25 Sep 2013 09:33:57 +0000 (11:33 +0200)]
Fix expansion in Makefile.am
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Jose Lopes <jabolopes@google.com>
Jose A. Lopes [Tue, 24 Sep 2013 09:17:48 +0000 (11:17 +0200)]
Fix comment in 'configure.ac'
Fix comment for a configure parameter in 'configure.ac' to be
consistent with the remaining parameters.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Mon, 23 Sep 2013 16:24:03 +0000 (18:24 +0200)]
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 monitoring
daemon has been disabled at configure time. Fixes issue 587.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Tue, 24 Sep 2013 14:48:50 +0000 (16:48 +0200)]
Move 'BuildVersion' to 'lib/utils/version.py'
Functions 'BuildVersion' and 'SplitVersion' are no longer needed by
the constants and, given that they are not constants, they should be
moved elsewhere. Since they are only used by 'cfgupgrade' and tests,
these functions are moved to 'lib/utils/version.py' and references to
them updated. Note that in 'lib/server/masterd.py', local variable
'version' is renamed 'ver' to avoid redefining the import
'ganeti.utils.version'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Tue, 24 Sep 2013 14:45:46 +0000 (16:45 +0200)]
HUnit test for 'buildVersion'
Add 'HUnit' test for 'buildVersion'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Tue, 24 Sep 2013 11:28:08 +0000 (13:28 +0200)]
Remove '_autoconf'
The previous patch has made '_autoconf' obsolete. This patch
completely removes '_autoconf' and the 'Makefile' targets for it.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 20 Sep 2013 09:05:46 +0000 (11:05 +0200)]
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 in
the Hs2Py constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 20 Sep 2013 09:03:49 +0000 (11:03 +0200)]
Hs2Py constants: add remaining '_autoconf.*' constants
Add remaining constants which in Python are imported from the
generated 'lib/_autoconf.py'. This will allow to completely remove
this module.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Thu, 19 Sep 2013 16:34:14 +0000 (18:34 +0200)]
Hs2Py constants: update Python references to autoconf
Update Python references to all constants that used to point to the
generated 'lib/_autoconf.py', which has been superseeded by the
Haskell counterpart 'src/AutoConf.hs'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 20 Sep 2013 13:58:36 +0000 (15:58 +0200)]
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'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Jose A. Lopes [Fri, 20 Sep 2013 08:39:09 +0000 (10:39 +0200)]
Add 'buildVersion' for calculating Ganeti versions
Add 'buildVersion' which calculates Ganeti versions and it is the
Haskell counterpart of 'BuildVersion' in 'lib/constants.py'.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Klaus Aehlig [Wed, 25 Sep 2013 08:55:54 +0000 (10:55 +0200)]
Fix sign in default-yes for --enable-versionfull
The default for using the full version string in the directory
is not to use it. If the option --enable-versionfull is given,
its argument should default to yes. That means that everything
that is not a "no" should be interpreted as yes.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Robin H. Johnson [Sat, 21 Sep 2013 18:50:42 +0000 (18:50 +0000)]
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>
Michele Tartara [Mon, 8 Jul 2013 07:50:34 +0000 (07:50 +0000)]
Update supported lint tools version numbers
Linting is now verified against the lint tools version numbers as listed in this
patch.
These version are corresponding to the ones that can be found in the
repositories of Ubuntu 13.04.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Tue, 24 Sep 2013 16:41:41 +0000 (16:41 +0000)]
Fix some wrong indentations in the code
Fix all instances of pep8's error: "E128 continuation line under-indented for
visual indent".
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Tue, 24 Sep 2013 16:29:37 +0000 (16:29 +0000)]
Disable parenthesis indentation check
More recent versions of pep8 check for the indentation level of closing
parenthesis in a way that is incompatible with the way we use in our code. Our
style is still pep8 compliant, and was re-allowed in even more recent versions
of the tool, but still we have to disable the check, for the time being.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Michele Tartara [Tue, 24 Sep 2013 14:56:42 +0000 (16:56 +0200)]
Fix an improperly escaped string
Mark a string representing a "sed" command including a regular expression as a
raw string, so that the entire escaping is performed by "sed" itself.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Tue, 24 Sep 2013 14:43:56 +0000 (14:43 +0000)]
Make QaConfig a proper container
Newer pylint versions complain that QaConfig is not a proper container because
it does not implement the __len__(), __delitem__() and __setitem__() methods.
This commit implements them.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Michele Tartara [Tue, 24 Sep 2013 13:26:54 +0000 (13:26 +0000)]
Make QmpMessage a proper container
Newer pylint versions complain that QmpMessage is not a proper container because
it does not implement the __len__() and __delitem__() methods. This commit
implements them.
Also, tests are added.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Michele Tartara [Tue, 24 Sep 2013 14:22:59 +0000 (14:22 +0000)]
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 generated
classes. Still, newer pylint versions are stricter at performing this check, and
therefore fail while testing our codebase. Disable the checking of a few
selected classes that incur in this problem.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
Michele Tartara [Tue, 24 Sep 2013 12:47:53 +0000 (12:47 +0000)]
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 the
code, so the configuration file of pylint is changed instead, to have the
current codebase work with both versions.
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Jose A. Lopes [Thu, 19 Sep 2013 14:59:59 +0000 (16:59 +0200)]
Hs2Py constants: update Python references
Update references of Python constants in the previous patch to fetch
their values from the generated Haskell to Python constants.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Jose A. Lopes [Thu, 19 Sep 2013 14:59:34 +0000 (16:59 +0200)]
Hs2Py constants: add 'confd' related constants
Add 'confd' related constants to the Hs2Py constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Jose A. Lopes [Thu, 19 Sep 2013 14:48:39 +0000 (16:48 +0200)]
Hs2Py constants: update Python references
Update references of the Python constants that were introduced in the
previous patch.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Jose A. Lopes [Thu, 19 Sep 2013 14:47:47 +0000 (16:47 +0200)]
Hs2Py constants: add some constants
Add 'opcodeReason', 'diskstatsFile', 'statFile', and
'mondTimeInterval', to the Hs2Py constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Jose A. Lopes [Thu, 19 Sep 2013 13:39:58 +0000 (15:39 +0200)]
Organize Haskell constants
Reorder Haskell constants to match the order in the Python constants
module 'lib/constants.py' to make it easier to debug/trace the Hs2Py
constant migration process.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Klaus Aehlig [Fri, 20 Sep 2013 17:42:57 +0000 (19:42 +0200)]
design: replace 'gnt-upgrade' by 'gnt-cluster upgrade'
Instead of using a separate binary, add the upgrade
functionality to gnt-cluster.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Thomas Thrainer [Tue, 24 Sep 2013 07:25:48 +0000 (09:25 +0200)]
Fix RPC call to blockdev_getdimensions
The parameter format for call_blockdev_getdimensions has changed in a
previous patch. Here, the correct parameter format is used for the RPC
call.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Thomas Thrainer [Tue, 24 Sep 2013 06:46:02 +0000 (08:46 +0200)]
Fix cfgupgrade test wrt. downgrading physical_id
The physical_id field can't be recreated during downgrades, so don't
expect it to be during the test.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Thomas Thrainer [Fri, 20 Sep 2013 06:05:54 +0000 (08:05 +0200)]
Display node names instead of node UUIDs
Display resolved node names instead of node UUIDs in a couple of
warnings and log messages.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Thomas Thrainer [Thu, 19 Sep 2013 14:40:43 +0000 (16:40 +0200)]
Only serialize dynamic_params on demand
To make sure that the dynamic_params field is not serialized by accident
to the configuration file only include it in the serialization when
explicitly asked for.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Thomas Thrainer [Thu, 19 Sep 2013 14:11:41 +0000 (16:11 +0200)]
Remove physical_id field reference from tools
Remove remaining references to the physical_id field in cluster-merge
and sanitize-config.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Thomas Thrainer [Thu, 19 Sep 2013 12:04:17 +0000 (14:04 +0200)]
Remove physical_id field from disks during upgrade
The physical_id field is no longer supported in disk objects, so remove
it during upgrades.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Thomas Thrainer [Thu, 19 Sep 2013 12:00:42 +0000 (14:00 +0200)]
Remove physical_id from config mock
Disk objects no longer support the physical_id field, so remove it from
mocked disk objects.
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>