WebOb 1.5 was released at 2015-10-11. With this new version,
webob.exc.WSGIHTTPException() constructor now fails with a KeyError
when the HTTP status code is 0.
test_exceptions_raise() of test_misc tries to instanciate all
exceptions of cinder.exception. The problem is that
ConvertedException uses a default HTTP status code of 0.
Modify the default HTTP status code of ConvertedException to 400 to
fix the unit test. The bug is only in the test,
cinder/api/openstack/wsgi.py copies an existing HTTP code:
Xing Yang [Wed, 23 Sep 2015 15:22:43 +0000 (11:22 -0400)]
Fix VMAX live migration problem
Live migration fails for VMAX because the host is not taken into
account when determining whether a volume is masked or not. For
live migration it is necessary to know which host a volume is masked
to. This patch fixes the problem by checking which host the volume
is masked to.
dell_storagecenter_api.py was looking for the cgsnapshot for
cgsnapshot-delete via the wrong REST API call. It was also only
looking for the first volume's snapshot rather than all snapshots
associated with a cgsnapshot. It now locates the snapshots properly
and expires the associated replays on cgsnapshot-delete.
Wilson Liu [Wed, 23 Sep 2015 07:04:33 +0000 (15:04 +0800)]
Huawei driver add check before use a QoS
One QoS in Huawei storage array can contain at most 64 LUNs.
Do a check before adding LUN to QoS, if the number of the
LUNs in the QoS is already equal or larger than 64, then
this QoS should not be used.
Wilson Liu [Thu, 24 Sep 2015 08:52:31 +0000 (16:52 +0800)]
Report *real* free capacity in Huawei driver
When we query capacity of a storage pool on Huawei storage,
there are two items in the result: one is "USERFREECAPACITY"
and the another one is "DATASPACE". In fact the "DATASPACE"
is the *real* space we can use to create LUN, the
"USERFREECAPACITY" contains some metadata that we can not use
to store user data.
This patch cleanly reverts the changes made via the
commit: e681ba2a99995dcd999e6539bb1222f8a1ac8adc
cleanly and mitigates the conflicts that would
occur with git-revert on the said commit.
The revert is solely for changes pertaining to the use
of the external library, netapp_lib. Minor code refactors
from the prior change are retained.
Unit test coverage has been increased for ZAPI and REST
interface code in netapp/dataontap/client/api.py and
netapp/eseries/client.py.
Andreas Jaeger [Thu, 24 Sep 2015 19:14:13 +0000 (21:14 +0200)]
Cleanup of Translations
In preparation for the release, do some cleanups for translations.
Removes all po files that are partially translated. The translation
team has decided to exclude files with less than 66 % of translated
content. There is no content lost, all data is in the translation
server, we just remove it from the repository.
This updates also recreates pot (translation source files) to
reflect the state of the repository in case there was no recent
import for them.
This change needs to be done manually since the automatic import does
not handle some of these cases.
Eric Harney [Mon, 21 Sep 2015 18:29:19 +0000 (14:29 -0400)]
Allow c-vol backends to start when some backends fail to load
Currently, if a c-vol backend fails to load due to an error in
the module startup process (like a volume driver's __init__ or
dependency import failure), the c-vol process halts completely.
Instead, catch that backend failure, log it, and allow other
backends in enabled_backends to still start up and run.
Note that this is not applicable for failures that allow
drivers to load and remain "uninitialized" -- this is for
failures that occur prior to that point.
When using NetApp drivers, all available flexvols on
a datastore are being reported to the Cinder Scheduler
as available storage pools. This allows Cinder volumes
to be created on flexvols not designated for OpenStack.
This commit fixes the problem by delimiting which pools are
eligible for provisioning via a configuration parameter
'netapp_pool_name_search_pattern'. This allows
the Cinder drivers to operate against a restricted
set of storage containers.
Tom Barron [Mon, 14 Sep 2015 21:38:40 +0000 (17:38 -0400)]
NetApp volume/snapshot delete performance fix
cDOT NFS NetApp drivers back cinder volumes with array-side files and
use array-side cloning techniques when creating snapshots and when
creating volumes from glance images. Customers have experienced
performance issues on the array when deleting many of these in
in quick succession, especially for large volumes.
This commit addresses these performance issues by overriding parent
class volume and snapshot delete methods, which use OS "rm" command to
delete volume backing files, with methods that use DOT API to delete
these files, and which invoke the optimized file deletion engine
available in DOT 8.3.
Michal Dulko [Mon, 21 Sep 2015 13:58:01 +0000 (15:58 +0200)]
Replace soft_delete in volume_type_access_remove
This commit replaces oslo.db's soft_delete used in
volume_type_access_remove in db.api with a simple update setting
deleted column to True.
As deleted column is boolean it is represented in the DB by TINYINT,
which max value is 127. This introduces problems when removing records
with id higher than that, because soft_delete sets deleted column to the
value of id. This commit fixes the issue and adds unit tests for such
case.
Tina [Wed, 16 Sep 2015 03:38:03 +0000 (23:38 -0400)]
Fixing create CG from Cgsnapshot bug in VNX driver
When creating a consistency group from a cgsnapshot, VNX driver
didn't force a poll to the VNX system. This caused the creation
to fail because the out-of-date status was returned. This patch
forces a poll to the VNX system to get rid of this issue.
Kendall Nelson [Thu, 13 Aug 2015 15:17:36 +0000 (10:17 -0500)]
Dynamically create cinder.conf.sample
As it stands, the opts.py file that is passed into
oslo-config-generator isn't being generated dynamically
and the old way of generating the cinder.conf.sample is
dependent on oslo-incubator which Cinder is trying to
move away from. oslo-config-generator works differently
than oslo-incubator so a number of changes had to be made
in order to make this switch.
This patch adds the config directory to Cinder and in it
are two files:
-generate_cinder_opts.py that will take the
results of a grep command to create the opts.py
file to be passed into oslo-config-generator.
-cinder.conf which is the new configuration for
oslo-config-generator. The file is inside the config
directory to be consistent with other projects.
Some changes were made to the generate_sample.sh file in
order to give the base directories and target directories
to the generate_cinder_opts.py program.
tox.ini was edited to remove the checkonly option because
all that needs to happen in check_uptodate.sh is a check to
ensure that the cinder.conf.sample is actually being
generated with no issues.
All options were removed from the check_uptodate.sh
because they were unnecessary given the new, more simple
way of generating the cinder.conf.sample.
setup.cfg was also edited in order to add information
oslo-config-generator needs to run.
Co-Authored By: Jay Bryant <jsbryant@us.ibm.com>
Co-Authored By: Jacob Gregor <jgregor@us.ibm.com>
Ryan McNair [Thu, 27 Aug 2015 20:51:14 +0000 (20:51 +0000)]
Fix MITM vulnerability for Brocade FC SAN lookup
Refactor the Brocade FC SAN lookup service implementation to use
common SSH utilities which already avoid MITM vulnerabilities.
This is a follow-up to https://review.openstack.org/#/c/138526/
which reverted an incomplete fix for the MITM issues for Brocade.
Michael Price [Tue, 25 Aug 2015 22:36:44 +0000 (17:36 -0500)]
NetApp: Fix volume extend with E-Series
Thin provisioned volumes were being converted to thick provisioned
volumes by extend_volume. When thin provisioning support was added,
the extend_volume method was not updated to use the correct API
for performing the capacity expansion operation.
This patch changes the volume extension strategy when a volume is
thin provisioned to use the correct API. With a thick provisioned
volume, a clone will be created with the new capacity, and the old
volume removed, but a thin provisioned volume's capacity can simply
be expanded directly, because that is merely the capacity that the user
sees, as opposed to the backend provisioned capacity.
Michael Price [Wed, 2 Sep 2015 18:48:05 +0000 (13:48 -0500)]
Fix netapp_enable_multiattach default for E-Series
The E-Series driver erroneously changed the netapp_enable_multiattach
option to default to True. This option should default to False to
ensure backwards-compatibility with upgrades.
Michal Dulko [Tue, 15 Sep 2015 13:52:57 +0000 (15:52 +0200)]
Check for None on service's updated_at
We weren't checking if service's updated_at is None when passing it to
timeutils.normalize_time which caused an exception. This commit adds
the check to cinder-manage and cinder-api (services and hosts). Also
regression unit tests are added.
peter_wang [Fri, 21 Aug 2015 05:33:44 +0000 (01:33 -0400)]
Fix issue of volume after host-assisted migration
In host-assisted migration, Cinder framework currently doesn't
update name_id and provider_location when the driver doesn't provide
name_id or provider_location in update_migrated_volume
This changes previous Cinder behavior which will update name_id and
provider_location anyway. Any operation against this volume will not
be successful; for example, volume deletion cannot delete it's
underlying LUN.
This fix will update name_id and provider_location if driver doesn't
return them.
Mike Rooney [Mon, 31 Aug 2015 15:29:53 +0000 (11:29 -0400)]
Local img-cache files ignored for image transfers
The cDOT NFS driver will only attempt to use the local img-cache-*
files if the copy offload path is defined in the cinder.conf file.
This should be attempted regardless of copy-offload's configuration.
The VMDK driver config options 'vmware_ca_file' and 'vmware_insecure'
are ignored while copying sparse or preallocated vmdk images to vCenter
datastores for volume creation. Therefore, the vCenter certificate is
not verified during image copy.
This patch sets appropriate parameters in the oslo.vmware API (for
copying images) call to enable vCenter certificate verification.
Tom Barron [Thu, 10 Sep 2015 23:53:29 +0000 (19:53 -0400)]
Fix NetApp clone from glance failure
When glance and cinder are backed by the same NetApp DOT flexvol
container, exposed as an NFS share, a direct clone is attempted
of the backing files rather than a copy. With the advent of
kilo 2015.1.1, this clone operation fails with the message:
"Image cloning unsuccessful ... need more than 2 values to unpack."
The issue here is that the clone path code is calling the parent
nfs class _is_share_eligible() method to see if there is enough
space on the destination flexvol and this method calls _get_capacity_info()
expecting a three-tuple to be returned. However, commit e52f304313efc695f7dd89c222041bffd53c131a deliberately changed the return
values of _get_capacity_info() within the NetApp drivers to return
a 2-tuple, based on API calls to obtain capacity information from
the NetApp storage arrays. That commit missed that this method
would also be invoked by the parent nfs class _is_share_eligible()
method, which expects a different signature.
The fix in this commit is to replace the call to the parent
_is_share_eligible() method with a more appropriate NetApp class
specific _share_has_space_for_clone() method. This new method
uses the NetApp version of _get_capacity_info to get space information
from the arrays via NetApp apis and expects a 2-tuple to be returned
from this method.