John Griffith [Wed, 13 Aug 2014 21:25:49 +0000 (15:25 -0600)]
Actually encode the SolidFire json dump result
The SolidFire driver intends to do a encode on the json data to utf-8,
unfortunatly it's not really doing anything because the syntax of the
calls is wrong.
This patch changes things to actually perform the encoding.
Angus Lees [Wed, 13 Aug 2014 01:59:18 +0000 (11:59 +1000)]
Issue one SQL statement per execute() call
Some sqlalchemy drivers don't support multiple SQL statements in a
single execute() call. The sqlalchemy author has confirmed that one
statement per execute() is the intended API.
Rick Chen [Mon, 11 Aug 2014 02:55:28 +0000 (10:55 +0800)]
Add ProphetStor DPL Storage server volume driver for Cinder
ProphetStor DPL Storage server enables x86 commodity hardware as
enterprise-grade storage systems.
*[2014/07/14] Remove roll-back function.
*[2014/07/16] Add decorate fiber zone manage utils in initialize_connection and
terminate_connection.
Use mock instead of mox in tests.
*[2014/07/21] Update cinder volume certification report.
*[2014/07/29] Openstack continuous integration platform test.
Retry: 27
*[2014/07/31] Rebase
*[2014/08/06] Refine code
*[2014/08/11] Rebase and enhance to support thin/thick volume
Implements: blueprint prophetstor-dpl-driver
cinder-cert-results: https://bugs.launchpad.net/cinder/+bug/1354066
Change-Id: Iced5e45362aef4286bb7f1c848ab7cb3573b5c02
This change enables hacking check H104 and F841, and fixes all
violations.
[H104] Files with no code shouldn’t contain any license header nor
comments, and must be left completely empty.
[F841] local variable name is assigned to but never used
Jay S. Bryant [Fri, 1 Aug 2014 20:43:51 +0000 (15:43 -0500)]
Add hacking check for use of LOG.audit
Commit 4dc37abc removes the few instances of LOG.audit that
were in Cinder. Given that the plan is to remove LOG.audit messages
from OpenStack, I am adding this hacking check to ensure that such
messages do not sneak their way back into Cinder.
Anthony Lee [Tue, 22 Jul 2014 18:40:21 +0000 (11:40 -0700)]
Add CHAP support for 3PAR ISCSI
Adds CHAP support to 3PAR ISCSI. Volume metadata will store
CHAP credentials to allow volumes to be attached to hosts on
a 3PAR backend. Credentials are generated when the first volume
is attached. Subsequent volumes lookup the CHAP credentials
from an existing volume already attached to the host.
Jeegn Chen [Fri, 8 Aug 2014 08:27:38 +0000 (16:27 +0800)]
EMC: Fix minor issue in VNX driver and unit tests
There were some minor issues in initial commit of VNX Direct Driver
Juno Update (https://review.openstack.org/#/c/104413/), such as typo,
unclear config option help message and missing period.
Thang Pham [Thu, 7 Aug 2014 21:41:11 +0000 (17:41 -0400)]
Do not translate debug messages
LOG.debug messages do not need to be translated. The rdb driver
has a couple of debug messages that are translated. This patch
removes those debug translations.
Also, logging exception.ImageUnacceptable can contain non-ascii
characters. This patch fixes this by using six.text_type to
properly translate the exception.
Anthony Lee [Thu, 7 Aug 2014 20:58:34 +0000 (13:58 -0700)]
Fixing LeftHand live migration error
Fixed a bug in the LeftHand driver that was causing an error to occur during
live migration of an instance that is attached to a volume. The solution was
to make sure server access is only requested for a volume if the iSCSI
session doesn't already have access enabled on the LeftHand backend.
Jay S. Bryant [Sat, 2 Aug 2014 23:06:38 +0000 (18:06 -0500)]
Improve regex for _ import hacking check
Commit 3e2b1117 added a check to make sure that the _
function was being explicitly imported so that translation would
work properly.
I have discovered that those regexes/code would not work in some cases.
Particularly if the import line imported multiple things from
gettextutils or i18n. Also the check being used to find lines using
the _ function was not right.
This commit fixes the issues and adds appropriate tests. It also
adds the hacking check to HACKING.rst which should have been done the
first time around.
Wu Wenxiang [Sun, 2 Mar 2014 14:20:49 +0000 (22:20 +0800)]
General cleanup of unused objects
* Remove unused function fake_get_remote_image_service
* Remove unused local function fake_execute2
* stub_out_key_pair_funcs() does nothing, remove it.
* Removed usage of enumerate()
All *Command classes are instantiating for each cinder-manage command
execution. RPC client should be initialized for VolumeCommands usage.
Some custom RPC clients (oslo.messaging backends) could init RPC
connection after client initialization so it is no need to create RPC
client for every cinder-manage command invoke.
When doing backup-restore operation, it needs volume's size is not less
than backup's size.
But in backup-restore routine, when volume's size is bigger than backup's
size, it logs the the info of volume's size and backup's size to warn
level, which I think it should log the info to info level.
This bug fix it.
John Griffith [Fri, 1 Aug 2014 23:10:55 +0000 (17:10 -0600)]
Add retry_on_deadlock to db update methods
There's some known races that have been addressed in
Nova via a retry_on_deadlock deocrator. Some known
cases in Cinder exist as well when dealing with updates
to quotas and reservations_expire.
This patch introduces the decorator to Cinder and hits
the methods known to be susceptible to deadlock as well
as some others that seem as though they'd fall into the
same category.
Li Min Liu [Tue, 5 Aug 2014 03:39:09 +0000 (11:39 +0800)]
Change the exception type for Storwize/SVC driver
When create a volume from snapshot or clone a volume,
Storwize/SVC require the same size for the source volume
and target, if not, will raise VolumeDriverException.
Zhiteng Huang [Fri, 1 Aug 2014 17:50:47 +0000 (01:50 +0800)]
Fix solidfire accept_transfer
Previous fix has a mistake which makes the situation worse. This change
fix volume['project_id'] and volume['user_id'] and adds unit test for
accept_transfer.
Volume creation from non-streamOptimized images (preallocated/thin/sparse)
has following problems:
1) Sparse vmdk image is not converted to appropriate virtual disk type
suitable for attaching to a nova instance.
2) The adapter type in image meta-data is ignored while creating volumes.
3) The vmware:vmdk_type extra_spec property is ignored.
4) Virtual disk extent operation is called with a wrong parameter which
might result in unwanted disk provisioning type conversion.
This patch fixes the first 3 problems using the following workflow:
a) Create a disk-less backing.
b) Create a virtual disk (single flat extent) from the non-streamOptimized
image
c) Attach the virtual disk to the backing
d) Clone the backing (if needed) to perform disk provisioning type conversion
* E711 comparison to None should be 'if cond is None:'
* E712 comparison to True should be 'if cond is True:' or 'if cond:'
* E713 test for membership should be 'not in'
This patch adds support for converting virtual disk provisioning
type during clone backing operation. Currently volume creation from
preallocated/sparse image doesn't honour the disk type property in
the volume extra spec. The workflow to address this issue requires
disk provisioning type conversion during clone.
This change adds support for attaching a virtual disk to an existing
backing VM. Currently volume creation from preallocated/sparse image doesn't
honour the disk type in the volume extra spec and adapter type in the image
meta-data. The workflow to address these issues requires the above mentioned
method. This change also sets the disk size of backing to at least 1MB which
is the minimum required by VIM APIs.
VNX Direct Driver has been contributed to Icehouse release.
This patch refactors driver and adds the following new features
* Array-based Backend Support
* FC Basic Support
* Target Port Selection for MPIO
* Initiator Auto Registration
* Storage Group Auto Deletion
* Multiple Authentication Type Support
* Storage-Assisted Volume Migration
* SP Toggle for HA
* Security File Support
* Advance LUN Features
# Compression Support
# Deduplication Support
# FAST VP Support
# FAST Cache Support
* Storage-assisted Retype
* External Volume Management
* Read-only Volume
* FC Auto Zoning
Certificate Test Results
https://bugs.launchpad.net/cinder/+bug/1336640
John Griffith [Wed, 30 Jul 2014 02:20:31 +0000 (20:20 -0600)]
Skip incompatible test on OSX
Can't seem to get the test:
cinder.tests.test_volume.VolumeTestCase.test_delete_no_dev_fails
to run right, tried macports and homebrew versions of fileutils
but still get makedir failures. Give up and just detect if OSX
and skip.
John Griffith [Tue, 29 Jul 2014 15:59:33 +0000 (09:59 -0600)]
Update ref used for notifications
When we update a snapshot status in the db, we need to
use the newly updated snapshot-ref object in the following
notification method call. Otherwise we're sending a
notifciation message with the old/outdated status
information.
NOTE: This also fixes the unit test that was written to
pass with the bug that existed in the notification.