]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
8 years agoFix failure of unit test TestCinderAllCmd
Mitsuhiro Tanino [Wed, 4 Nov 2015 23:42:04 +0000 (18:42 -0500)]
Fix failure of unit test TestCinderAllCmd

After introducing the commit 93d26e40098c966e7d791a9fb6152244a9f9409d
unit test TestCinderAllCmd fails if a test environment has
/etc/cinder/cinder.conf with proper backend configuration.
We should mock out some variables not to depend on test environment.

Change-Id: I3218f6be1c38ed228aa96346d6976a04ecb8d421
Closes-Bug: #1513263

9 years agoSheepdogDriver: Improve get_volume_stats operation
zhangsong [Mon, 2 Nov 2015 10:28:22 +0000 (18:28 +0800)]
SheepdogDriver: Improve get_volume_stats operation

This patch improves get_volume_stats method to invoke
dog command in SheepdogClient Class method instead of
in SheepdogDriver class method directly. Here are two
benefits we can realize as a result:

1.The current implementation can only get volume status
by local sheepdog node, but the SheepdogClient Class also
supports the method to run dog command with remote sheepdog
node.

2.SheepdogClient Class methods are implemented to run dog
command with fine grained Error handling. So it can improve
the robustness and is more readable to run dog command in
SheepdogClient Class method.

Change-Id: I64ca193cd50e6914d0d5fb6cf711c760dfb65b8c
Closes-Bug: #1512287

9 years agoMerge "VMware: Enforce min vCenter version"
Jenkins [Mon, 2 Nov 2015 07:59:21 +0000 (07:59 +0000)]
Merge "VMware: Enforce min vCenter version"

9 years agoMerge "Add -constraints for CI jobs"
Jenkins [Mon, 2 Nov 2015 07:44:33 +0000 (07:44 +0000)]
Merge "Add -constraints for CI jobs"

9 years agoMerge "Retype support for CloudByte iSCSI cinder driver"
Jenkins [Mon, 2 Nov 2015 02:40:36 +0000 (02:40 +0000)]
Merge "Retype support for CloudByte iSCSI cinder driver"

9 years agoMerge "Revert "Handle correct exception raised by python-novaclient""
Jenkins [Thu, 29 Oct 2015 14:10:53 +0000 (14:10 +0000)]
Merge "Revert "Handle correct exception raised by python-novaclient""

9 years agoMerge "Eager load snapshot_metadata in *snapshot_get_all"
Jenkins [Thu, 29 Oct 2015 02:53:25 +0000 (02:53 +0000)]
Merge "Eager load snapshot_metadata in *snapshot_get_all"

9 years agoRevert "Handle correct exception raised by python-novaclient"
Matt Riedemann [Thu, 29 Oct 2015 00:00:46 +0000 (17:00 -0700)]
Revert "Handle correct exception raised by python-novaclient"

This reverts commit 99dc6d34754954a27f6998406a94743c41b93981

With the block on novaclient 2.33 we can undo this workaround.
The regression in novaclient was reverted and will be in the next
release.

Change-Id: If561b699eb04486660009f100c5db425c3586d3c
Related-Bug: #1510790

9 years agoMerge "optimize the copy_image_to_volume method of sheepdogdriver"
Jenkins [Wed, 28 Oct 2015 16:16:38 +0000 (16:16 +0000)]
Merge "optimize the copy_image_to_volume method of sheepdogdriver"

9 years agoMerge "Updated from global requirements"
Jenkins [Wed, 28 Oct 2015 14:43:58 +0000 (14:43 +0000)]
Merge "Updated from global requirements"

9 years agoMerge "Imported Translations from Zanata"
Jenkins [Wed, 28 Oct 2015 11:15:45 +0000 (11:15 +0000)]
Merge "Imported Translations from Zanata"

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Wed, 28 Oct 2015 10:53:41 +0000 (10:53 +0000)]
Updated from global requirements

Change-Id: I318f5e2b85747ce77f39e74de07e0d92b8382427

9 years agooptimize the copy_image_to_volume method of sheepdogdriver
zhangsong [Sat, 24 Oct 2015 16:47:47 +0000 (00:47 +0800)]
optimize the copy_image_to_volume method of sheepdogdriver

the current copy_image_to_volume method of sheepdogdriver can only
write the image file to local sheepdog, with this patch, it supports
write image file to remote sheepdog node.

Closes-Bug: #1509910
Change-Id: I5084ef2c048439ad8b9d6ae56ce8cccaadc26262

9 years agoImported Translations from Zanata
OpenStack Proposal Bot [Wed, 28 Oct 2015 06:06:39 +0000 (06:06 +0000)]
Imported Translations from Zanata

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I0db97de021e9bb8dcd157e9f8df127ca2257db95

9 years agoHandle correct exception raised by python-novaclient
Ivan Kolodyazhny [Wed, 28 Oct 2015 05:45:57 +0000 (07:45 +0200)]
Handle correct exception raised by python-novaclient

We need to hanle both novaclient.exceptions.RequestTimeout
and requests.Timeout to make it works with a different
python-nocaclient versions.

Change-Id: Ib58101f12c87653aef97e055d22542acbeeee4a7
Closes-Bug: #1510790

9 years agoMerge "Imported Translations from Zanata"
Jenkins [Mon, 26 Oct 2015 06:11:19 +0000 (06:11 +0000)]
Merge "Imported Translations from Zanata"

9 years agoMerge "Add retries for Cisco FCZM client CLI _cfg_save"
Jenkins [Mon, 26 Oct 2015 01:58:50 +0000 (01:58 +0000)]
Merge "Add retries for Cisco FCZM client CLI _cfg_save"

9 years agoImported Translations from Zanata
OpenStack Proposal Bot [Sun, 25 Oct 2015 06:05:39 +0000 (06:05 +0000)]
Imported Translations from Zanata

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Ibce3d81070a2f470adf46ddbfa3acf2a3ee73815

9 years agoMerge "Add hypermetro support for Huawei driver"
Jenkins [Sun, 25 Oct 2015 02:08:42 +0000 (02:08 +0000)]
Merge "Add hypermetro support for Huawei driver"

9 years agoAdd missing cgsnapshot field to Snapshot object
Michał Dulko [Fri, 23 Oct 2015 13:55:49 +0000 (15:55 +0200)]
Add missing cgsnapshot field to Snapshot object

SQLAlchemy model of snapshot specifies its relationship to cgsnapshot.
This wasn't reflected in Snapshot versioned object. The patch adds
cgsnapshot field to Snapshot object as well as required unit tests.

Partial-Bug: 1509012
Change-Id: I285930222c491f83a35fdef78067e9548e4b845a

9 years agoMerge "Make relationships in objects consistent"
Jenkins [Fri, 23 Oct 2015 13:02:26 +0000 (13:02 +0000)]
Merge "Make relationships in objects consistent"

9 years agoEager load snapshot_metadata in *snapshot_get_all
Michał Dulko [Fri, 23 Oct 2015 09:59:48 +0000 (11:59 +0200)]
Eager load snapshot_metadata in *snapshot_get_all

All methods returning snapshot lists in db.sqlalchemy.api are eager
loading snapshot_metadata - besides snapshot_get_all_by_project and
snapshot_get_active_by_window. In case of the latter that fact caused
unit tests to randomly fail because of SQLAlchemy Session sometimes
getting closed before the metadata got lazy loaded. This commit adds
missing options(joinedload('snapshot_metadata')) to these queries.

Change-Id: I72557ebc7af9f3044046965ca79c9fe7c15520fc
Closes-Bug: 1501838

9 years agoMerge "Imported Translations from Zanata"
Jenkins [Thu, 22 Oct 2015 18:14:15 +0000 (18:14 +0000)]
Merge "Imported Translations from Zanata"

9 years agoMake relationships in objects consistent
Michał Dulko [Thu, 22 Oct 2015 12:54:35 +0000 (14:54 +0200)]
Make relationships in objects consistent

In Volume object 1:n relationship on volume_attachment was modeled
by ListOfObjectsField. Moreover _from_db_object and obj_load_attr
actually were setting VolumeAttachmentList as value of that field,
which is wrong behavior.

In CGSnapshot similar relationship on snapshots was done by ObjectField
with SnapshotList inside.

This commit unifies the approach to use the latter. Also unit test is
added to prevent mismatch of field type and value set on it.

Change-Id: I802fc8807d7d4c42680bb19866c3e90c866d3f26
Closes-Bug: 1508889

9 years agoImported Translations from Zanata
OpenStack Proposal Bot [Thu, 22 Oct 2015 06:07:58 +0000 (06:07 +0000)]
Imported Translations from Zanata

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I2e106aa0738c0fc2285ebf04d86c6321de0070d9

9 years agoRemove the jointly loaded model in finish_volume_migration
Vincent Hou [Wed, 14 Oct 2015 02:35:13 +0000 (19:35 -0700)]
Remove the jointly loaded model in finish_volume_migration

After a successful volume migration, the source volume and the
destination volume need to swap the data in the models in
finish_volume_migration. It is sufficient to load the volume
model only and there is no need to load other models, like
volume type, metadata, consistency group, etc. If we load
these additional models, it will lead to NULL key error, when
either source or destination model has a NULL key pointer.

Change-Id: I04ad0739387d602719591680854e6655cc87f9ab
Closes-Bug: #1505572

9 years agoMerge "Update docs to generate Guru Meditation Report"
Jenkins [Thu, 22 Oct 2015 04:16:44 +0000 (04:16 +0000)]
Merge "Update docs to generate Guru Meditation Report"

9 years agoMerge "Dell SC: Disable REST verify warnings"
Jenkins [Thu, 22 Oct 2015 03:50:51 +0000 (03:50 +0000)]
Merge "Dell SC: Disable REST verify warnings"

9 years agoMerge "Fix NoneType Attribute error"
Jenkins [Wed, 21 Oct 2015 23:31:46 +0000 (23:31 +0000)]
Merge "Fix NoneType Attribute error"

9 years agoUpdate docs to generate Guru Meditation Report
Sean McGinnis [Wed, 21 Oct 2015 21:23:56 +0000 (16:23 -0500)]
Update docs to generate Guru Meditation Report

Guru Meditation Reports (GMR) code in oslo.reports was recently updated
to expect SIGUSR2 as opposed to SIGUSR1, because it is reserved by
Apache 'mod_wsgi' for its own use.

Signal was changed and merged in change:
I9d3b6079ba2cca41fe4723723a6f80b2c3c0b9c0

Change-Id: Id58dd3c32b095f4c6b14caf650d36f2fc7dfb12c

9 years agoMerge "Imported Translations from Zanata"
Jenkins [Wed, 21 Oct 2015 17:14:25 +0000 (17:14 +0000)]
Merge "Imported Translations from Zanata"

9 years agoMerge "Updates in consistency_group in xiv/ds8k driver"
Jenkins [Wed, 21 Oct 2015 17:13:45 +0000 (17:13 +0000)]
Merge "Updates in consistency_group in xiv/ds8k driver"

9 years agoMerge "VMware: Unit test refactoring"
Jenkins [Wed, 21 Oct 2015 17:11:19 +0000 (17:11 +0000)]
Merge "VMware: Unit test refactoring"

9 years agoFix NoneType Attribute error
Nate Potter [Wed, 21 Oct 2015 15:51:39 +0000 (15:51 +0000)]
Fix NoneType Attribute error

Currently when creating a volume without a specified
volume_type, the capabilities_filter fails saying that
NoneType object has no attribute 'get'. This patch
will make that issue instead throw an exception telling
the user that they need to specify a volume type.

Change-Id: I89635f9e4f4f44d16f391284ccc027e86c552cdf
Closes-Bug: #1446031

9 years agoMerge "Cleanup for cinder tests with CGSnapshot"
Jenkins [Wed, 21 Oct 2015 15:37:53 +0000 (15:37 +0000)]
Merge "Cleanup for cinder tests with CGSnapshot"

9 years agoMerge "Improve performance listing detail for volumes"
Jenkins [Wed, 21 Oct 2015 08:42:55 +0000 (08:42 +0000)]
Merge "Improve performance listing detail for volumes"

9 years agoImported Translations from Zanata
OpenStack Proposal Bot [Wed, 21 Oct 2015 06:05:28 +0000 (06:05 +0000)]
Imported Translations from Zanata

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I00e09cccdf28b2f445230dac5cf0b5a46481435c

9 years agoAdd -constraints for CI jobs
Sachi King [Tue, 20 Oct 2015 22:43:07 +0000 (09:43 +1100)]
Add -constraints for CI jobs

This adds the constraints factor to the base section and duplicates
the sections required for CI with -constraints as tox does not
currently support factors in sections.  Work towards enabling factor
support in sections is currently stalled, as such we will need to
duplicate sections adding -constraints to facilitate running sections
with the constrained install_command.

Implements Blueprint: Requirements-Management

Change-Id: I7afd52517750b82dcac94b8aae68dc0e94d00e54

9 years agoMerge "Fix typos about 'target_discovered'"
Jenkins [Tue, 20 Oct 2015 17:01:28 +0000 (17:01 +0000)]
Merge "Fix typos about 'target_discovered'"

9 years agoFix typos about 'target_discovered'
Yusuke Hayashi [Tue, 20 Oct 2015 16:43:37 +0000 (01:43 +0900)]
Fix typos about 'target_discovered'

target_discoverd => target_discovered
(add 'e' before last 'd')

Change-Id: I0a98afe092ddb37eb46122aa7b972fae3a6e5543

9 years agoMerge "Imported Translations from Zanata"
Jenkins [Tue, 20 Oct 2015 13:11:15 +0000 (13:11 +0000)]
Merge "Imported Translations from Zanata"

9 years agoMerge "Updated from global requirements"
Jenkins [Tue, 20 Oct 2015 13:04:23 +0000 (13:04 +0000)]
Merge "Updated from global requirements"

9 years agoMerge "CGSnapshot Object"
Jenkins [Tue, 20 Oct 2015 12:24:30 +0000 (12:24 +0000)]
Merge "CGSnapshot Object"

9 years agoVMware: Unit test refactoring
Vipin Balachandran [Mon, 19 Oct 2015 06:55:54 +0000 (12:25 +0530)]
VMware: Unit test refactoring

Some of the unit tests use mox instead of mock. Also, there are
cases where a single test tests multiple cases and methods. This
patch refactors the unit tests for the following methods in the
vmdk module to fix these issues:

* get_volume_stats
* _verify_volume_creation
* create_volume
* delete_volume
* _get_extra_spec_disk_type
* _get_disk_type
* create_snapshot
* delete_snapshot

There will be follow-up patches to fix the remaining unit tests.

Partial-bug: #1261097
Change-Id: I17b1c0df4e13bf9900a2fe8d37ff5297a8e7486e

9 years agoCleanup for cinder tests with CGSnapshot
Daniel Tadrzak [Fri, 31 Jul 2015 12:31:14 +0000 (14:31 +0200)]
Cleanup for cinder tests with CGSnapshot

Switch cinder tests to use CGSnapshot objects instead of direct
calls to db. Additionally, the patch switches from dict to object notation.

Drivers tests need to be fixed in other patch.

Co-Authored-By: Szymon Wroblewski<szymon.wroblewski@intel.com>
Partial-Implements: blueprint cinder-objects
Change-Id: I40161592c887a386aa7a323381d71f0111d584fa

9 years agoMerge "LIO: Let delete_initiator succeed if iqn not found"
Jenkins [Tue, 20 Oct 2015 07:31:52 +0000 (07:31 +0000)]
Merge "LIO: Let delete_initiator succeed if iqn not found"

9 years agoImported Translations from Zanata
OpenStack Proposal Bot [Tue, 20 Oct 2015 06:08:51 +0000 (06:08 +0000)]
Imported Translations from Zanata

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Id2c47c6dfa95d9efbb249ee1e72d3baa606ca449

9 years agoVMware: Enforce min vCenter version
Vipin Balachandran [Fri, 16 Oct 2015 07:29:10 +0000 (12:59 +0530)]
VMware: Enforce min vCenter version

The VMDK driver deprecated vCenter versions less 5.1 in L
release. This patch enforces the minimum required vCenter
version for the VMDK driver.

DocImpact
  The minimum required vCenter version for the VMDK driver
  is 5.1.

Change-Id: I2ca0362623367d534b35124923947ee1e22c89fa

9 years agoMerge "devref doc: assorted fixes in "Unit Tests""
Jenkins [Tue, 20 Oct 2015 05:25:32 +0000 (05:25 +0000)]
Merge "devref doc: assorted fixes in "Unit Tests""

9 years agoAdd hypermetro support for Huawei driver
Liu Xinguo [Wed, 15 Jul 2015 09:52:19 +0000 (17:52 +0800)]
Add hypermetro support for Huawei driver

Hypermetro is a key storage feature and a requirement for
features such as high-availability and disaster recovery of
applications running on OpenStack clouds. This patch will
add initial support for volume hypermetro in Huawei driver.

DocImpact
Implements: blueprint support-hypermetro-for-huawei-volume-driver
Change-Id: Ibbdecccafd63a11a28c3ab12893756f23c38082a

9 years agoMerge "Ensure replication functions check driver status"
Jenkins [Tue, 20 Oct 2015 01:35:30 +0000 (01:35 +0000)]
Merge "Ensure replication functions check driver status"

9 years agoMerge "Remove unused gettextutils from oslo-incubator"
Jenkins [Tue, 20 Oct 2015 01:33:12 +0000 (01:33 +0000)]
Merge "Remove unused gettextutils from oslo-incubator"

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Tue, 20 Oct 2015 00:48:46 +0000 (00:48 +0000)]
Updated from global requirements

Change-Id: I457e3cd5e1c4261cae06551e78436fd2127c35fe

9 years agodevref doc: assorted fixes in "Unit Tests"
Eric Harney [Mon, 19 Oct 2015 18:57:44 +0000 (14:57 -0400)]
devref doc: assorted fixes in "Unit Tests"

Fix the example command for running a unit test.
(Colon versus period.)

Fix box formatting for tox commands.  (Need extra
newline after double colon.)

Fix a typo in the same section.

Fix broken ostestr doc link.

Remove testr and flake8 links that don't go anywhere.

Change-Id: I243e4f0639ef4a87e8950e0428b7556919094b0e

9 years agoLIO: Let delete_initiator succeed if iqn not found
Eric Harney [Thu, 15 Oct 2015 14:25:49 +0000 (10:25 -0400)]
LIO: Let delete_initiator succeed if iqn not found

When performing delete_initiator, this should not
raise an error if it can't find the initiator in
an ACL.  This likely indicates something has
gotten out of sync, but the teardown should be
allowed to succeed.

Closes-Bug: #1506496
Change-Id: I3fa9d2e4a435de7c8ee5b24d419930050af197fe

9 years agoMerge "Huawei driver handle volume exists error"
Jenkins [Mon, 19 Oct 2015 15:18:29 +0000 (15:18 +0000)]
Merge "Huawei driver handle volume exists error"

9 years agoCGSnapshot Object
root [Wed, 24 Jun 2015 10:32:29 +0000 (12:32 +0200)]
CGSnapshot Object

This patch adds VersionedObjects abstraction layer to CGSnapshots.

Co-Authored-By: Szymon Wroblewski <szymon.wroblewski@intel.com>
Co-Authored-By: Michal Dulko <michal.dulko@intel.com>
Partial-Implements: blueprint cinder-objects
Change-Id: Ie4cdd1ffae15a93bff756ad278ca680f9f420748

9 years agoUpdates in consistency_group in xiv/ds8k driver
Alon Marx [Fri, 9 Oct 2015 21:00:49 +0000 (00:00 +0300)]
Updates in consistency_group in xiv/ds8k driver

The changes are:
1. ability to modify a consistecy group (update_consistencygroup)
2. ability to create a consistency group from a cgsnapshot or from
   another consistency group (create_consistencygroup_from_src)

Change-Id: I8da0e86ec321bf67b59fef8426fdd637dfe83bbe
Implements: bp xiv-ds8k-cg-updates

9 years agoMerge "Mark XML API as deprecated in Mitaka."
Jenkins [Sun, 18 Oct 2015 16:32:38 +0000 (16:32 +0000)]
Merge "Mark XML API as deprecated in Mitaka."

9 years agoMerge "Port API admin action tests to Python 3"
Jenkins [Sun, 18 Oct 2015 12:48:16 +0000 (12:48 +0000)]
Merge "Port API admin action tests to Python 3"

9 years agoRetype support for CloudByte iSCSI cinder driver
yogeshprasad [Thu, 1 Oct 2015 10:24:10 +0000 (15:54 +0530)]
Retype support for CloudByte iSCSI cinder driver

This patch enables the volume retype function for CloudByte iSCSI cinder
driver. Admin can control the IOPS, graceallowed, compression and many
other QOS properties of a volume via OpenStack.

DocImpact
Change-Id: I4b05e49c545fb284e7abb90ad0661bcba5b646b7
Implements: blueprint cloudbyte-driver-support-retype

9 years agoAdd retries for Cisco FCZM client CLI _cfg_save
Patrick East [Fri, 9 Oct 2015 23:35:12 +0000 (16:35 -0700)]
Add retries for Cisco FCZM client CLI _cfg_save

Previously this config update would break if there were other changes
happening that were not completed yet. An easy work-around is to just
retry if it fails to apply the configuration update. There is already
code in place to handle this, but it doesn’t actually work correctly.

Instead of fixing it I’ve switched over to using the utils.retry
decorator to do the retries.

Change-Id: I3c1948bcfdedc633c23a30351260ce8fbf7342de
Closes-Bug: #1482398

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Sat, 17 Oct 2015 00:22:37 +0000 (00:22 +0000)]
Updated from global requirements

Change-Id: I6c7b091b175f0564e215ec53134b319b874309a0

9 years agoMerge "Volume extend error does not catch exception"
Jenkins [Fri, 16 Oct 2015 23:13:17 +0000 (23:13 +0000)]
Merge "Volume extend error does not catch exception"

9 years agoMerge "Only use LOG.exception in exception handler"
Jenkins [Fri, 16 Oct 2015 23:10:28 +0000 (23:10 +0000)]
Merge "Only use LOG.exception in exception handler"

9 years agoMerge "Fix method VolumeTypeList.get_all"
Jenkins [Fri, 16 Oct 2015 22:50:47 +0000 (22:50 +0000)]
Merge "Fix method VolumeTypeList.get_all"

9 years agoRemove unused gettextutils from oslo-incubator
Jay S Bryant [Fri, 16 Oct 2015 20:21:27 +0000 (15:21 -0500)]
Remove unused gettextutils from oslo-incubator

Now that the old config generator code has been replaced/removed
we can now also remove gettextutils.  The generator was the last
hold-out in our code still using that obsolete code.

This patch removes the unneeded file and also updates the i18n code
that was monkey patching in support for using the _() and _LX()
functions in gettextutils.

Change-Id: Ib29915b13bd7f0173637ac6d1881f1ca06b713d6
related-bug: 1381563

9 years agoMerge "Use project id from volume when retyping volumes"
Jenkins [Fri, 16 Oct 2015 16:50:40 +0000 (16:50 +0000)]
Merge "Use project id from volume when retyping volumes"

9 years agoMerge "Port API types extra specs to Python 3"
Jenkins [Thu, 15 Oct 2015 21:59:34 +0000 (21:59 +0000)]
Merge "Port API types extra specs to Python 3"

9 years agoMerge "Port API to Python 3"
Jenkins [Thu, 15 Oct 2015 21:15:54 +0000 (21:15 +0000)]
Merge "Port API to Python 3"

9 years agoUse project id from volume when retyping volumes
Ollie Leahy [Thu, 15 Oct 2015 15:20:28 +0000 (15:20 +0000)]
Use project id from volume when retyping volumes

Use the project_id from the volume being retyped to reserve quota in
get_volume_type_reservation(). Previously the project_id from the
context was used, which could cause reservations to be made and never
cleared.

Change-Id: I25f7c00961e259102cdaea6ea9394d04ded96b92
Closes-Bug: #1505307

9 years agoMerge tag '7.0.0'
OpenStack Proposal Bot [Thu, 15 Oct 2015 12:03:48 +0000 (12:03 +0000)]
Merge tag '7.0.0'

This is a null-merge of the 7.0.0 release tag back into the master
branch so that the 7.0.0 tag will appear in the git commit history of
the master branch. It contains no actual changes to the master branch,
regardless of how our code review system's UI represents it. Please
ask in #openstack-infra if you have any questions, and otherwise try
to merge this as quickly as possible to avoid later conflicts on the
master branch.

Change-Id: Icaa0f7eae22bcd886a5f6867d688ee90ae0a406c

9 years agoMerge "windows: don't use LOG.exception if not logging an exception"
Jenkins [Thu, 15 Oct 2015 02:55:32 +0000 (02:55 +0000)]
Merge "windows: don't use LOG.exception if not logging an exception"

9 years agoMerge "Cleanup/move code in Storwize Driver"
Jenkins [Thu, 15 Oct 2015 00:12:14 +0000 (00:12 +0000)]
Merge "Cleanup/move code in Storwize Driver"

9 years agoMerge "Add backup_swift_auth_url to swift backup driver"
Jenkins [Thu, 15 Oct 2015 00:07:52 +0000 (00:07 +0000)]
Merge "Add backup_swift_auth_url to swift backup driver"

9 years agoMerge "Remove extra register_opts() calls in netapp eseries"
Jenkins [Thu, 15 Oct 2015 00:07:41 +0000 (00:07 +0000)]
Merge "Remove extra register_opts() calls in netapp eseries"

9 years agoMerge "Fix updating only volume type is_public"
Jenkins [Wed, 14 Oct 2015 23:10:56 +0000 (23:10 +0000)]
Merge "Fix updating only volume type is_public"

9 years agoMerge "Update config format for replication_devices"
Jenkins [Wed, 14 Oct 2015 22:16:43 +0000 (22:16 +0000)]
Merge "Update config format for replication_devices"

9 years agoMerge "Use lvm_conf_file directory for LVM_SYSTEM_DIR value."
Jenkins [Wed, 14 Oct 2015 22:01:47 +0000 (22:01 +0000)]
Merge "Use lvm_conf_file directory for LVM_SYSTEM_DIR value."

9 years agoOnly use LOG.exception in exception handler
Sean McGinnis [Mon, 12 Oct 2015 21:07:55 +0000 (16:07 -0500)]
Only use LOG.exception in exception handler

There were a few instances of the code calling LOG.exception
in places where there was not an exception in context. This
can cause errors and should just be LOG.error as it effectively
ends up being.

Some instances in vhdutils.py are being left as they are being
addressed in Ib3113f2c4752d37e890f97d259da5d51cbfcfb96 under a
different bug report.

Change-Id: I1898c4d63c16c4d41b3e255a7de21429d1b04ddb
Closes-bug: #1504735

9 years agoPort API admin action tests to Python 3
Victor Stinner [Wed, 7 Oct 2015 21:44:46 +0000 (23:44 +0200)]
Port API admin action tests to Python 3

* Replace ast.literal_eval(response.body) with response.json
* Use oslo_serialization.jsonutils.dump_as_bytes() to encode the
  response to JSON as bytes for the HTTP body.
* tests-py3.txt: add cinder.tests.unit.api.contrib.test_admin_actions

Partial-Implements: blueprint cinder-python3
Change-Id: Ib30c701b9dbbcc774dfc5f19a7174ab318006206

9 years agoPort API types extra specs to Python 3
Victor Stinner [Wed, 7 Oct 2015 16:41:48 +0000 (18:41 +0200)]
Port API types extra specs to Python 3

* Replace dict.iteritems() with dict.items(). The iteritems() method
  of dictionaries was removed in Python 3.
* Add cinder.tests.unit.api.contrib tests to tests-py3.txt:

  - test_availability_zones
  - test_capabilities
  - test_extended_snapshot_attributes
  - test_hosts
  - test_qos_specs_manage
  - test_quotas
  - test_quotas_classes
  - test_scheduler_stats
  - test_services
  - test_types_extra_specs
  - test_types_manage
  - test_used_limits

Partial-Implements: blueprint cinder-python3
Change-Id: Ie3d2de456c34286cca0505f6125a1a723bd8ad8b

9 years agoPort API to Python 3
Victor Stinner [Wed, 7 Oct 2015 16:12:48 +0000 (18:12 +0200)]
Port API to Python 3

* test_make_flat_dict(): only use one dictionary key. On Python 3,
  the hash function is now randomized by default and so dictionary
  keys are returned in a random order.
* Replace "not cmp(a, b) == 0" with "a != b"
* test_common: replace range(n) with list(range(n)) to get a list on
  Python 3. On Python 3, range() now returns an iterator.
* Replace dict.items()[0] with list(dict.items()[0]). On Python 3,
  dict.items() now returns a view which is not indexable.
* VolumeTypesController.index(): replace dict.values() with
  list(dict.values()) to get a list on Python 3.
* test_xmlutil: use byte strings for XML
* test_extensions: use byte strings for HTTP body
* Add the following tests to tests-py3.txt:

  - cinder.tests.unit.api.test_common
  - cinder.tests.unit.api.test_extensions
  - cinder.tests.unit.api.test_versions
  - cinder.tests.unit.api.test_xmlutil

Partial-Implements: blueprint cinder-python3
Change-Id: I40c28f6b6a1cf72ce13774755153c8691b4d621b

9 years agoMerge "encryption_api_url requires a version"
Jenkins [Wed, 14 Oct 2015 19:00:10 +0000 (19:00 +0000)]
Merge "encryption_api_url requires a version"

9 years agoMark XML API as deprecated in Mitaka.
Ivan Kolodyazhny [Wed, 14 Oct 2015 17:33:08 +0000 (20:33 +0300)]
Mark XML API as deprecated in Mitaka.

Cinder XML API is untested and will be removed in the N release.

Implements: blueprint deprecate-xml-api
Change-Id: I753dedadf99bbb8e49d0076aa0da4ffa4ff97a4b

9 years agowindows: don't use LOG.exception if not logging an exception
Matt Riedemann [Mon, 12 Oct 2015 13:44:14 +0000 (06:44 -0700)]
windows: don't use LOG.exception if not logging an exception

There is a bug in python 3.4 such that if you call LOG.exception and
you're not in a logging handler context it fails. That bug is fixed
inadvertantly in python 3.5 under:

http://bugs.python.org/issue17911

This fixes the instance in the windows vhdutils module to use LOG.error
rather than LOG.exception to avoid that logging error.

Since LOG.exception was being used I'm assuming the original author wanted
traceback given this is a utility method, so we use the exc_info kwarg which
will log a traceback if there is one.

Closes-Bug: #1505240

Change-Id: Ib3113f2c4752d37e890f97d259da5d51cbfcfb96

9 years agoImprove performance listing detail for volumes
wanghao [Mon, 20 Jul 2015 09:09:19 +0000 (17:09 +0800)]
Improve performance listing detail for volumes

When large numbers of volumes are created from images in cloud,
and user uses pagination querying, there is no need to query all
volumes' volume_glance_metadata, just get those volumes which are in
response list.

Implement a new method "volume_api.get_list_volumes_image_metadata"
to query image metadata in list of volumes by using one sql querying.

Change-Id: I42307d51133bab58a166a781fccf797f0608843e
Closes-Bug: #1476150

9 years agoMerge "Port WSGI tests to Python 3"
Jenkins [Wed, 14 Oct 2015 04:04:29 +0000 (04:04 +0000)]
Merge "Port WSGI tests to Python 3"

9 years agoMerge "Provide better debug log when 'cinder manage' fails"
Jenkins [Wed, 14 Oct 2015 01:20:23 +0000 (01:20 +0000)]
Merge "Provide better debug log when 'cinder manage' fails"

9 years agoMerge "Move ssh_utils tests to test_ssh_utils"
Jenkins [Wed, 14 Oct 2015 01:20:11 +0000 (01:20 +0000)]
Merge "Move ssh_utils tests to test_ssh_utils"

9 years agoMerge "Fix log formatting for rbd driver"
Jenkins [Tue, 13 Oct 2015 23:27:57 +0000 (23:27 +0000)]
Merge "Fix log formatting for rbd driver"

9 years agoFix updating only volume type is_public
liyingjun [Wed, 9 Sep 2015 01:46:21 +0000 (09:46 +0800)]
Fix updating only volume type is_public

When updating only volume type is_public, error will be raised: `ERROR:
Specify either volume type name and/or description`. Fixed this by
adding a check that is_public is None, the same way name and description
do.

APIImpact
Change-Id: I4b7ece238f76d9acb7f0555c180c6336f6cf1830
Implement blueprint: only-update-volume-type-public
Closes-bug: #1493616

9 years agoencryption_api_url requires a version
Ollie Leahy [Thu, 1 Oct 2015 17:21:52 +0000 (18:21 +0100)]
encryption_api_url requires a version

If the value configured for encryption_api_url does not include the
barbican API version, then some calls from cinder will fail. This can
mean that encrypted volumes cannot be deleted. To prevent this happening
raise an exception if the configured value for encryption_api_url does not
include the barbican version.

Change-Id: I1a4c9b9e93d7d189a3cdf1469e8bb87817473da5
Closes-Bug: #1501780

9 years agoCleanup/move code in Storwize Driver
Jacob Gregor [Thu, 1 Oct 2015 18:52:34 +0000 (13:52 -0500)]
Cleanup/move code in Storwize Driver

This patch updates the name of helper.py to storwize_svc_common.py.
In addition, ssh.py has been collapsed into storwize_svc_common.py
to reduce redundant code. Unit tests were also updated to reflect
these updates.

This patch is the first of a series of patches with the aim of
bringing the storwize_svc driver in line with other san based
Cinder drivers.

Co-Authored By: Kendall Nelson <kjnelson@us.ibm.com>
Co-Authored By: Slade Baumann <baumann@us.ibm.com>

Partially implements: blueprint refactor-storwize-driver-for-mitaka

Change-Id: I7725a008105ae54e49f90c74b32aa11713e983c9

9 years agoPort WSGI tests to Python 3
Victor Stinner [Wed, 7 Oct 2015 15:38:12 +0000 (17:38 +0200)]
Port WSGI tests to Python 3

* Replace dict.keys()[0] with list(data.keys())[0]. On Python 3,
  dict.keys() now returns a view which is not indexable.
* Skip SSL tests on Python 3. Tests hang for an unknown reason, they
  must be fixed later.
* Fix unit tests: HTTP body type is bytes, not Unicode.
* Debug.print_generator(): on Python 3, write into sys.stdout.buffer
  instead of sys.stdout, because HTTP body type is bytes not Unicode.
* ResponseObject: encode serializer output to UTF-8 if it's Unicode.
* tox.ini: add the following tests to Python 3.4

  - cinder.tests.unit.api.openstack.test_wsgi
  - cinder.tests.unit.wsgi

Note: Ignore pylint error E1101 on sys.stdout.buffer. pylint on
Python 2 complains that the buffer attribute doesn't exist, whereas
the code is only executed on Python 3 and the attribute exists on
Python 3.

Related-Bug: #1505103
Partial-Implements: blueprint cinder-python3
Change-Id: I0db0e04010e41be71192a2e4db13829114ad6eef

9 years agoFix method VolumeTypeList.get_all
Dmitry Guryanov [Tue, 13 Oct 2015 11:53:13 +0000 (14:53 +0300)]
Fix method VolumeTypeList.get_all

Function volume_types.get_all_types returns dict, then
VolumeTypeList.get_all passes it to base.obj_make_list, which, in turn,
passes it to oslo_versionedobjects.base.obj_make_list.

And this function iterates over 4th argument and calls
item_cls._from_db_object for each item. So if it will iterate over dict
from volume_types.get_all_types, it'll get strings instead of orm
objects.

By the way, VolumeTypeList.get_all is not used anywhere in cinder code.
I tried to use it in unit test for my new patch and found this problem.

Closes-Bug: #1505653

Change-Id: If789bc5bf224974de5c4e4b9a57c83ef51d1779b

9 years agoUse lvm_conf_file directory for LVM_SYSTEM_DIR value.
Fergal Mc Carthy [Tue, 22 Sep 2015 21:24:25 +0000 (17:24 -0400)]
Use lvm_conf_file directory for LVM_SYSTEM_DIR value.

Currently when LVM_SYSTEM_DIR is added to LVM.LVM_CMD_PREFIX it is
hardcoded as /etc/cinder.

However the configuration option lvm_conf_file could specify a file
located in an arbitrary directory, not just /etc/cinder, so we should
be using the path to the directory containing the specified lvm.conf
file as the value for LVM_SYSTEM_DIR.

Change-Id: I702fdfb3640ef99255fda0fda4d39d0a80ce9dcc
Closes-Bug: #1498651

9 years agoSquashed commit of WebOb 1.5 and oslo.db fixes
Davanum Srinivas [Wed, 7 Oct 2015 01:45:12 +0000 (18:45 -0700)]
Squashed commit of WebOb 1.5 and oslo.db fixes

Add testresources and testscenarios used by oslo.db fixture

If we use oslo.db fixtures, we'll need these 2 packages or
the next version of oslo.db release will break us.

Closes-Bug: #1503501
Change-Id: I8facdaf69c79b1b1ae4f9f64e9856e12f14440ed
(cherry picked from commit ec40c3b6ddbfa4912ca6e612558efaef6043f3ae)

Fix test_misc for WebOb 1.5

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:

    Fault(exception.ConvertedException(code=ex_value.code,  ...)

Closes-Bug: #1505153
Change-Id: I1aec8038774828d48da4b0e831b390e33243809a
(cherry picked from commit 867fccf833ffc597aa986cb6ff1b3b5c1101b9ba)

Change default Exception code to 500

As a part of the fix for LP#1505153, the invalid
response of 0 was changed to 400 to fix a running
issue with the new version of WebOb.

It was pointed out after the fact  however that a
500 might be more appropriate here.

Additionally, other projects have implemented a 500
as the default so for the sake of consistency we should
consider doing the same.

This patch just changes the 400 to a 500 as the default
code.

Conflicts:
        cinder/tests/unit/test_exception.py

NOTE(mriedem): The conflict is due to 17802086f not being
in stable/liberty.

Change-Id: Ie486dc49c927f9b50f07c1fc562e89c090924a40
Closes-Bug: #1505488
(cherry picked from commit 9a7cbe540c94d54194194f4747a52b8211f6372e)

9 years agoChange default Exception code to 500
John Griffith [Tue, 13 Oct 2015 03:44:09 +0000 (21:44 -0600)]
Change default Exception code to 500

As a part of the fix for LP#1505153, the invalid
response of 0 was changed to 400 to fix a running
issue with the new version of WebOb.

It was pointed out after the fact  however that a
500 might be more appropriate here.

Additionally, other projects have implemented a 500
as the default so for the sake of consistency we should
consider doing the same.

This patch just changes the 400 to a 500 as the default
code.

Change-Id: Ie486dc49c927f9b50f07c1fc562e89c090924a40
Closes-Bug: #1505488

9 years agoDell SC: Disable REST verify warnings
Tom Swanson [Tue, 13 Oct 2015 15:28:22 +0000 (10:28 -0500)]
Dell SC: Disable REST verify warnings

The option to verify REST https requests is user selectable.  If the
user has not enabled this then we spam the c-vol logs with warnings.
This patch disables those warnings when verify is set to false.

Change-Id: I9fd2023d7ca4898f4c206a2ddfaf35ce5cf9ca7e