]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
9 years agoChanged pvs separator from ':' to '|' to support names with ':'.
Joe D'Andrea [Fri, 16 Jan 2015 21:26:09 +0000 (21:26 +0000)]
Changed pvs separator from ':' to '|' to support names with ':'.

get_all_physical_volumes() runs:

pvs --noheadings --unit=g -o vg_name,name,size,free
    --separator : --nosuffix

Which can produce a variable number of fields if the 'name'
incorporates ':', as in the following:

cinder-volumes-array-lun-0:/dev/disk/by-path/ip-10.8.77.11:3260-
    iscsi-iqn.1984-05.com.dell:powervault.md3600i.6f01faf000eb1b
    540000000053c487b0-lun-0:931.01:931.01

Change-Id: Ia5442af2a06a004ff1af58ce08b816506b369f22
Closes-Bug: 1414076

9 years agoMerge "Create proxy volume driver"
Jenkins [Fri, 16 Jan 2015 19:20:36 +0000 (19:20 +0000)]
Merge "Create proxy volume driver"

9 years agoMerge "Capitalize the first letter in log messages."
Jenkins [Fri, 16 Jan 2015 19:20:26 +0000 (19:20 +0000)]
Merge "Capitalize the first letter in log messages."

9 years agoMerge "Set 'driver_volume_type' to 'gpfs'"
Jenkins [Fri, 16 Jan 2015 17:29:41 +0000 (17:29 +0000)]
Merge "Set 'driver_volume_type' to 'gpfs'"

9 years agoMerge "Switch the PureISCSIDriver over to using the purestorage pypi module."
Jenkins [Fri, 16 Jan 2015 17:04:38 +0000 (17:04 +0000)]
Merge "Switch the PureISCSIDriver over to using the purestorage pypi module."

9 years agoMerge "Implement clone_image caching on SolidFire"
Jenkins [Fri, 16 Jan 2015 15:23:47 +0000 (15:23 +0000)]
Merge "Implement clone_image caching on SolidFire"

9 years agoMerge "Fix bug in sheepdog driver: the wrong volume size"
Jenkins [Fri, 16 Jan 2015 14:49:26 +0000 (14:49 +0000)]
Merge "Fix bug in sheepdog driver: the wrong volume size"

9 years agoSet 'driver_volume_type' to 'gpfs'
Nilesh Bhosale [Fri, 16 Jan 2015 10:10:18 +0000 (15:40 +0530)]
Set 'driver_volume_type' to 'gpfs'

nova LibvirtGPFSVolumeDriver class implemented recently for GPFS volume
driver expects the 'driver_volume_type' as 'gpfs' from the Cinder GPFS
driver. Making the required change in the GPFS cinder driver to
complete the fix.

Change-Id: I880b93e5e3608b63872e6937d02482a3fe368efd
Related-Bug: #1405044

9 years agoMerge "Add migration tests for PostgreSQL"
Jenkins [Fri, 16 Jan 2015 08:22:45 +0000 (08:22 +0000)]
Merge "Add migration tests for PostgreSQL"

9 years agoMerge "Use is_valid_ipv6 from oslo.utils"
Jenkins [Fri, 16 Jan 2015 08:21:01 +0000 (08:21 +0000)]
Merge "Use is_valid_ipv6 from oslo.utils"

9 years agoMerge "Fix the continuation line indent to pass flake8"
Jenkins [Fri, 16 Jan 2015 08:20:46 +0000 (08:20 +0000)]
Merge "Fix the continuation line indent to pass flake8"

9 years agoMerge "Update README.rst to current state"
Jenkins [Fri, 16 Jan 2015 08:20:31 +0000 (08:20 +0000)]
Merge "Update README.rst to current state"

9 years agoMerge "Move oslo.db to oslo_db namespace"
Jenkins [Fri, 16 Jan 2015 08:20:13 +0000 (08:20 +0000)]
Merge "Move oslo.db to oslo_db namespace"

9 years agoMerge "Fix eqlx endless loop when server closes the connection"
Jenkins [Fri, 16 Jan 2015 08:19:11 +0000 (08:19 +0000)]
Merge "Fix eqlx endless loop when server closes the connection"

9 years agoMerge "Increase unit test coverage in hacking test"
Jenkins [Fri, 16 Jan 2015 08:18:15 +0000 (08:18 +0000)]
Merge "Increase unit test coverage in hacking test"

9 years agoMerge "Fix zfssa driver volume attach to work with latest zfssa software"
Jenkins [Fri, 16 Jan 2015 08:16:01 +0000 (08:16 +0000)]
Merge "Fix zfssa driver volume attach to work with latest zfssa software"

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Fri, 16 Jan 2015 01:10:17 +0000 (01:10 +0000)]
Updated from global requirements

Change-Id: If4911d8a678ecffee79b92d53eb1d8e1ada7a26f

9 years agoMerge "Updated from global requirements"
Jenkins [Fri, 16 Jan 2015 00:16:08 +0000 (00:16 +0000)]
Merge "Updated from global requirements"

9 years agoMerge "Imported Translations from Transifex"
Jenkins [Thu, 15 Jan 2015 22:41:41 +0000 (22:41 +0000)]
Merge "Imported Translations from Transifex"

9 years agoMerge "Add mock for cinder-rtstool call in tests.targets.test_lio_driver"
Jenkins [Thu, 15 Jan 2015 22:40:57 +0000 (22:40 +0000)]
Merge "Add mock for cinder-rtstool call in tests.targets.test_lio_driver"

9 years agoSwitch the PureISCSIDriver over to using the purestorage pypi module.
Patrick East [Wed, 14 Jan 2015 23:07:16 +0000 (15:07 -0800)]
Switch the PureISCSIDriver over to using the purestorage pypi module.

All management api's will now go through the purestorage module, the
interface is extremely similar to the original FlashArray object
included in the cinder.volume.drivers.pure module. This allows for
updates to the REST API and python code that uses it to not disrupt the
cinder driver.

Implements: blueprint pure-iscsi-purestorage-lib
Change-Id: Ifcfb1c2337e5837f2121929c4788137d8bd1cf42

9 years agoFix zfssa driver volume attach to work with latest zfssa software
abhiram_moturi [Thu, 15 Jan 2015 16:31:53 +0000 (11:31 -0500)]
Fix zfssa driver volume attach to work with latest zfssa software

This fixes the volume attach issue of the zfssa driver
with the latest zfssa software release and makes it work
for all zfssa versions.

Change-Id: I4b9ceb7788c112ee5998f24b00a07d4346bc6275
Closes-Bug: #1411291

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Thu, 15 Jan 2015 21:42:05 +0000 (21:42 +0000)]
Updated from global requirements

Change-Id: Ifd1c94a3d90dc69abac47a100734b84ea9ba8243

9 years agoMove oslo.db to oslo_db namespace
Jay S. Bryant [Thu, 15 Jan 2015 00:16:32 +0000 (18:16 -0600)]
Move oslo.db to oslo_db namespace

This is the second in a series of changes to move to using
the new oslo_<library> namespace that is being used for
oslo libraries.

There is currently a shim in place that is allowing the old
oslo.<library> imports to work, but we need to be prepared for
when the shims go away.  Thus, we need patches like this one to
move to the new namespace.

This patch also updates our hacking check to ensure that no instances
of oslo.db sneak back in.

Change-Id: Ibebed114a362e199e03c83d7d229841e8f88932b

9 years agoFix eqlx endless loop when server closes the connection
Dunrong Huang [Wed, 14 Jan 2015 05:56:43 +0000 (13:56 +0800)]
Fix eqlx endless loop when server closes the connection

The eqlx driver would identify one CLI command completion by looking
for the system name prompt in the output ("ARRAY_NAME>"). But some
cases where there is no "ARRAY_NAME>" in the output. The eqlx server
closes the ssh connection immediately after sends such message, which
lead to a infinite loop in _get_output() and 100% CPU utilization.

What the patch does is to check the return of chan.recv(), if the
length of returned string is zero, which means server has closed the
connection, the loop will be exited.

Closes-Bug: #1410627

Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
Change-Id: I600c38d98f0f808c98df010a89ac58ca8e43f1a3

9 years agoIncrease unit test coverage in hacking test
Curt Bruns [Thu, 15 Jan 2015 18:35:05 +0000 (11:35 -0700)]
Increase unit test coverage in hacking test

Added a few unit tests to increase the test coverage from
~60% up to 90%.  Also modified the assertEqual of all tests
to be in the form of assertEqual(EXPECTED, ACTUAL) format.

Change-Id: If53cfae138c3e31d21e34aa86048d02a19fb6346

9 years agoMerge "Use assertRaisesRegexp() in test_srb.py."
Jenkins [Thu, 15 Jan 2015 18:16:11 +0000 (18:16 +0000)]
Merge "Use assertRaisesRegexp() in test_srb.py."

9 years agoMerge "Fixes misspelled words in Cinder"
Jenkins [Thu, 15 Jan 2015 16:22:57 +0000 (16:22 +0000)]
Merge "Fixes misspelled words in Cinder"

9 years agoMerge "Deal with PEP-0476 certificate chaining checking"
Jenkins [Thu, 15 Jan 2015 15:05:30 +0000 (15:05 +0000)]
Merge "Deal with PEP-0476 certificate chaining checking"

9 years agoMerge "Fix LOG formatting in api initialize_connection"
Jenkins [Thu, 15 Jan 2015 10:52:49 +0000 (10:52 +0000)]
Merge "Fix LOG formatting in api initialize_connection"

9 years agoFixes misspelled words in Cinder
Zhiteng Huang [Thu, 15 Jan 2015 03:12:05 +0000 (11:12 +0800)]
Fixes misspelled words in Cinder

Fixes misspelled words found by 'misspellings' in one shot

* pip install misspellings
* git ls-files | grep -v locale | misspellings -f -

Change-Id: I2b74c7f19f17ba566cfb734c012a8904f3e35e84

9 years agoMerge "Remove locks from LeftHand driver"
Jenkins [Thu, 15 Jan 2015 06:23:21 +0000 (06:23 +0000)]
Merge "Remove locks from LeftHand driver"

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Thu, 15 Jan 2015 06:09:26 +0000 (06:09 +0000)]
Imported Translations from Transifex

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

Change-Id: Ie183983e8c26e6b5aa8e9419e43b389cade46e8b

9 years agoMerge "Add loopingcalls for Huawei storage system driver"
Jenkins [Thu, 15 Jan 2015 04:13:30 +0000 (04:13 +0000)]
Merge "Add loopingcalls for Huawei storage system driver"

9 years agoAdd mock for cinder-rtstool call in tests.targets.test_lio_driver
Mitsuhiro Tanino [Thu, 15 Jan 2015 00:59:54 +0000 (19:59 -0500)]
Add mock for cinder-rtstool call in tests.targets.test_lio_driver

Unit tests in tests.targets.test_lio_driver are calling out to
cinder-rtstool.
change-id Ic25828361d9c30c4e1aa37b630d8ad272a78977b skips this
unit test to avoid failure of tests.
This patch reverts this change and adds mock for calling of
cinder-rtstool to reenable the unit tests.

Change-Id: I11dc07f692b5ba07484595c980f82bbdd2140d24
Closes-Bug: #1411029

9 years agoSkip LIO target unit tests until mocked
Mike Perez [Wed, 14 Jan 2015 23:47:26 +0000 (15:47 -0800)]
Skip LIO target unit tests until mocked

Unit tests are calling out to cinder-rtstool, which breaks in most
environments. We need these calls mocked out properly before being
reenabled.

Change-Id: Ic25828361d9c30c4e1aa37b630d8ad272a78977b
Related-Bug: #1411029

9 years agoFix LOG formatting in api initialize_connection
Walter A. Boring IV [Wed, 14 Jan 2015 23:38:34 +0000 (23:38 +0000)]
Fix LOG formatting in api initialize_connection

initialize_connection had invalid formatting characters
in the LOG entry.

Change-Id: I6bd8c7b374ba4c23001a98f2fda0705696e9d47c
Closes-Bug: #1411026

9 years agoMerge "Fix bug in tgt conf for volume"
Jenkins [Wed, 14 Jan 2015 23:10:54 +0000 (23:10 +0000)]
Merge "Fix bug in tgt conf for volume"

9 years agoMerge "Garbage Remains when Attached Volume is Migrated with NFS Driver"
Jenkins [Wed, 14 Jan 2015 23:10:42 +0000 (23:10 +0000)]
Merge "Garbage Remains when Attached Volume is Migrated with NFS Driver"

9 years agoMerge "Remove unused variables from ensure_export()"
Jenkins [Wed, 14 Jan 2015 21:30:58 +0000 (21:30 +0000)]
Merge "Remove unused variables from ensure_export()"

9 years agoMerge "Add hacking check for oslo namespace usage"
Jenkins [Wed, 14 Jan 2015 19:11:52 +0000 (19:11 +0000)]
Merge "Add hacking check for oslo namespace usage"

9 years agoDeal with PEP-0476 certificate chaining checking
Corey Bryant [Wed, 14 Jan 2015 18:11:30 +0000 (13:11 -0500)]
Deal with PEP-0476 certificate chaining checking

PEP-0476 introduced more thorough certificate chain verfication
for HTTPS connectivity; this was introduced in Python 2.7.9, and
breaks a number of unit tests in the cinder codebase.

Disable certificate chain verification for cinder SSL tests
using the backwards compatible SSLContext provided for this
purpose.

Change-Id: Iffc3658196f608c7a7c9b6527dc8e7210fb05bff
Closes-Bug: #1403068

9 years agoAdd hacking check for oslo namespace usage
Jay S. Bryant [Tue, 13 Jan 2015 23:11:33 +0000 (17:11 -0600)]
Add hacking check for oslo namespace usage

We want to make sure that we don't have usage of the old
oslo.concurrency naming slipping in with new changes where
we should be using the oslo_concurrency namespace.  This change
adds a hacking check to avoid use of the deprecated namespace.
As we convert more oslo libraries to the new namespace the check
will be updated to enforce use of the new namespace.

This hacking check is based upon the same N333 hacking check
in Cinder.

Change-Id: Ibec6d09e9d313c9e723f7542cedb9da5772d3de2

9 years agoRemove locks from LeftHand driver
Anthony Lee [Fri, 12 Dec 2014 19:32:15 +0000 (11:32 -0800)]
Remove locks from LeftHand driver

By removing synchronization locks from the LeftHand driver,
support for many simultaneous volume create/deletes and
volume attach/detachs will be added.  This is useful for high
availability environments where performance with locks in place
would be reduced.

Removing the locks requires the creation of a new LeftHand
client when a request is sent to the driver now.  This
allows requests to no longer be blocked if a request is
already in process by the driver.

This results in a performance increase for the driver and
better stability in a high availability environment.

Closes-Bug: #1395953
Change-Id: I39732d944a79bbfc597077fe0873d4cfcaace211

9 years agoFix bug in tgt conf for volume
git-harry [Wed, 14 Jan 2015 10:49:11 +0000 (10:49 +0000)]
Fix bug in tgt conf for volume

'lld' is not a valid directive.

This commit replaces 'lld' with the correct directive of 'driver'.

Change-Id: I165339a9652fe882c50a5a7e270675e343dceb30
Related-bug: #1396265

9 years agoUse is_valid_ipv6 from oslo.utils
ChangBo Guo(gcb) [Tue, 23 Dec 2014 07:20:38 +0000 (15:20 +0800)]
Use is_valid_ipv6 from oslo.utils

Remove _is_valid_ipv6 from Cinder and replace it's usages
by usages of is_valid_ipv6 from netutils, because this methods
implements the same functionality.

Change-Id: Ica16f0a34abc2f0c6f7240fe553a494d77dedc16

9 years agoUse lockutils.set_defaults to set lock_path in test
Jay S. Bryant [Tue, 13 Jan 2015 22:25:24 +0000 (16:25 -0600)]
Use lockutils.set_defaults to set lock_path in test

Commit 9dd6d212f0d8fd74c29077a786fb6d770a2a0bba for oslo.concurrency's
lockutils appears to have broken our unit tests.

Twelve of the the storwize_svc unit tests started failing with the
complaint that the required configuration option 'lock_path' was not set.

This change updates cinder/test.py to not only set up a temporary
lock_path location that will be automatically cleaned up, but to also
register that temporary lock_path location using lockutils.set_defaults()
to correct the problem.

Change-Id: I011888f676ebc170e7285048b7e5a638a5a8c9a9
Closes-bug: 1410485

9 years agoFix bug in sheepdog driver: the wrong volume size
ustcdylan [Sat, 6 Dec 2014 14:23:21 +0000 (22:23 +0800)]
Fix bug in sheepdog driver: the wrong volume size

We give a volume size when create a volume from an snapshot,
but the sheepdog driver ignores the size.

Change-Id: I4310e7ef07e98c002ad3494e623ea243e3aad468
Closes-Bug: #1399598

9 years agoAdd loopingcalls for Huawei storage system driver
Bob-OpenStack [Wed, 24 Dec 2014 04:03:13 +0000 (20:03 -0800)]
Add loopingcalls for Huawei storage system driver

Add loopingcalls for Huawei storage system driver, and make
wait interval configurable.

Closes-Bug: #1403608
Change-Id: Ieb7c6af40e5109d7f44022cbc38d8ec715e6057c

9 years agoMerge "Adds cinder iscsi driver for CloudByte storage"
Jenkins [Mon, 12 Jan 2015 23:59:11 +0000 (23:59 +0000)]
Merge "Adds cinder iscsi driver for CloudByte storage"

9 years agoImplement clone_image caching on SolidFire
John Griffith [Thu, 18 Dec 2014 17:55:05 +0000 (10:55 -0700)]
Implement clone_image caching on SolidFire

When performing boot from Volume on none FS based devices or devices
that aren't also acting as Glance Image stores, the current process goes
like this:
1. Fetch the image from Glance Store to a temp file on the Cinder Node
2. Perform a qemu-img convert on that file (convert to raw)
3. Transfer the contents of that file to the newly created Volume using dd

This process can take a while and is pretty inefficient. This BP introduces
the option for Operators to enable image-caching on the SolidFire backend device.

When enabled this option will use the existing Cinder clone_image method,
and will create a "Template Volume" of minimum required size on the SolidFire
backend. This Volume will be created with a backend SolidFire account that can
be shared among OpenStack Tenants.

When a request is received we first do a number of checks before proceeding:
1. Is Image/Template caching enabled
2. Inspect the image-metadata and verify that the image is public,
   or that the tenant making the request is the owner
3. Verify that the image-metadata includes the properties['virtual_size']
   parameter

If the preconditions are met, create a minimal sized Volume with the requested
image; then use SolidFires clone operation to create the requested bootable
Volume. During the process we also check and make sure that the image hasn't
been updated since we created our cached copy, if it has we then delete the
copy we have on the system and create a new one.

Also updated those drivers with docstrings duplicating the params info.  I did
not rewrite or modify those that didn't include changed info.  I'm not sure we
should duplicate docstring info for base methods like this anyway, but that's
irrelevant for this work.

Change-Id: I2fac9410f504dff1aaa9fe0b9a274db7b074fa50
Implements: blueprint implement-solidfire-cloneimage

9 years agoAdd migration tests for PostgreSQL
Ivan Kolodyazhny [Fri, 12 Dec 2014 16:11:58 +0000 (18:11 +0200)]
Add migration tests for PostgreSQL

Fix migrations for PostgresSQL:
002_quota_class - PostgreSQL-specific reservations foreign key name
004_volume_type_to_uuid - while downgraging volume_type_id from string to int
PostgreSQL can't do it automatically

Change-Id: I68b8608a85594501536835ddc9dc87bcd2dd80c4
Closes-Bug: #1266595

9 years agoGarbage Remains when Attached Volume is Migrated with NFS Driver
Rushil Chugh [Mon, 8 Dec 2014 22:09:36 +0000 (17:09 -0500)]
Garbage Remains when Attached Volume is Migrated with NFS Driver

Garbage volume remained when an attached NFS volume was migrated
to another NFS backend. An error message was generated as the
attached volume was not detached before being migrated. The root
cause of the issue is that status_update['status'] is only set
for retype and not for migration from one NFS backend to another
NFS backend. This patch proposes to fix the aforementioned issue
where migration fails from one NFS backend to another NFS backend.

Change-Id: I657a46d98b1e2a52cec128308cbbf39166c3625b
Closes-bug: 1391172

9 years agoUpdate README.rst to current state
Marc Koderer [Wed, 7 Jan 2015 14:44:26 +0000 (15:44 +0100)]
Update README.rst to current state

The existing README.rst is outdated. It's referring to
old URL's and can't be used for beginners to get an overview
of the module.

Change-Id: I66b866c35d74e7ec2c319ddcf09db1cfb318eb27

9 years agoMerge "Clean up QoSSpecManageApiTest setup"
Jenkins [Mon, 12 Jan 2015 05:22:47 +0000 (05:22 +0000)]
Merge "Clean up QoSSpecManageApiTest setup"

9 years agoMerge "Fix incorrect usage of get_flow in volume.manager"
Jenkins [Sun, 11 Jan 2015 06:29:53 +0000 (06:29 +0000)]
Merge "Fix incorrect usage of get_flow in volume.manager"

9 years agoMerge "Add debug messaging for tgt already exists"
Jenkins [Sat, 10 Jan 2015 06:09:06 +0000 (06:09 +0000)]
Merge "Add debug messaging for tgt already exists"

9 years agoRemove unused variables from ensure_export()
Mitsuhiro Tanino [Sat, 10 Jan 2015 01:11:43 +0000 (20:11 -0500)]
Remove unused variables from ensure_export()

After introducing commit 9651f547147188645942466602c92cce06666483,
these three variables are obsolete in ensure_export().
By remaining these variable, ensure_export() fails to export
volumes after c-vol service is restart because the caller of
ensure_export() in lvm driver does not pass these variables.

- iscsi_name, volume_group, config

Main clean up is done by commit Ibfd1feefd72c43ef316b267e9d6645f2e67e2558.
This patch adds some tests for tgt, lio, and iser targets.
And also adds initialization of chap_auth_userid and chap_auth_password
in create_iscsi_target() because these variables might be referred
before definition.

Closes-bug: 1408121
Related-bug: 1408171
Change-Id: I8766eee33ae07fea71873809bfec37b8352c3a89

9 years agoMerge "Add more rally benchmarks related to Cinder"
Jenkins [Sat, 10 Jan 2015 00:03:52 +0000 (00:03 +0000)]
Merge "Add more rally benchmarks related to Cinder"

9 years agoFix incorrect usage of get_flow in volume.manager
John Griffith [Fri, 9 Jan 2015 23:58:06 +0000 (23:58 +0000)]
Fix incorrect usage of get_flow in volume.manager

The call to flows.manager.create_volume.get_flow in cinder.volume.manager's
create_volume method is passing in keyword args where the flows manager is
actually expecting positional arguments. The good thing is that most of these
seem to evaluate to boolean values and are evaluated as True, so they don't
fail; however the behavior isn't going to be exactly as expected here.

The method signature in flows.manager.create_volume:

    def get_flow(context, db, driver, scheduler_rpcapi, host, volume_id,
             allow_reschedule, reschedule_context, request_spec,
             filter_properties, snapshot_id=None, image_id=None,
             source_volid=None, source_replicaid=None,
             consistencygroup_id=None):

Meanwhile the call in cinder.volume.manager.create_volume:

            flow_engine = create_volume.get_flow(
                context_elevated,
                self.db,
                self.driver,
                self.scheduler_rpcapi,
                self.host,
                volume_id,
                snapshot_id=snapshot_id,
                image_id=image_id,
                source_volid=source_volid,
                source_replicaid=source_replicaid,
                consistencygroup_id=consistencygroup_id,
                allow_reschedule=allow_reschedule,
                reschedule_context=context,
                request_spec=request_spec,
                filter_properties=filter_properties)

Change-Id: I0ec8c7e754521e418f534e199e58fa7e4ef01499
Closes-Bug: #1409168

9 years agoMerge "Fix iscsi_write_cache setting for iscsi targets"
Jenkins [Fri, 9 Jan 2015 21:57:45 +0000 (21:57 +0000)]
Merge "Fix iscsi_write_cache setting for iscsi targets"

9 years agoFix iscsi_write_cache setting for iscsi targets
John Griffith [Wed, 7 Jan 2015 05:47:01 +0000 (22:47 -0700)]
Fix iscsi_write_cache setting for iscsi targets

While transitioning to the new driver and target
model (change 9651f547147188645942466602c92cce06666483)
some things got lost not surprisingly.  One of those
things that wasn't migrated correctly was the
iscsi_write_cache option due to ensure_export not
being called properly on service restart.

This patch cleans up the ensure/create_export methods
and their signatures.  Most importantly esnure_export
should now actually work and check the iscsi_write_cache
settings.

While fixing this I also cleaned up the two methods
mentioned above to eliminate the unnecessary and
duplicate info in their arguments.

Closes-Bug: #1408171

Change-Id: Ibfd1feefd72c43ef316b267e9d6645f2e67e2558

9 years agoMerge "i18n fixes for PureISCSIDriver"
Jenkins [Fri, 9 Jan 2015 18:30:48 +0000 (18:30 +0000)]
Merge "i18n fixes for PureISCSIDriver"

9 years agoAdd debug messaging for tgt already exists
John Griffith [Fri, 9 Jan 2015 00:42:05 +0000 (17:42 -0700)]
Add debug messaging for tgt already exists

We have a race condition where the call to create an
iscsi target seems to be issued twice.  This patch
adds some debug logging to try and get some more info
around where things are going wrong.

First, we add a log message to the intialize_connection call
in the cinder.volume.api and include the connector info.

Second, we add a target show output prior to the update/create
command in the target driver.

In addition, we also had the update and show commands in the same
try/except block which led us to believe the show was failing,
but that's NOT the case at all.  So this patch also moves that
existing show (debug purposes as well) out of the main try block.

Note that there are some old bugs logged against TgtAdm for issues
with it "loosing count" of target id's it's issued, and in turn
reissuing the same ID multiple times.  This patch is intended to
give us enough info to determine if that's what's going on or not.

Other possibility is that the initialize call is being issued more
than once.

Change-Id: If17acff6c0b697261ae0e7a40fc26962cbee6c7b
Related-Bug: #1398078

9 years agoClean up QoSSpecManageApiTest setup
Sean McGinnis [Fri, 9 Jan 2015 15:42:48 +0000 (09:42 -0600)]
Clean up QoSSpecManageApiTest setup

There is currently unnecessary work being performed in setUp
for QoSSpecManageApiTest and confusing comments. This cleans
that up to avoid confusion.

Test was explicitly calling a reset on a fake, but the cleanup
for each test will do this as well. Relatively harmless, but
this makes the code cleaner.

Change-Id: I2671fc0a186acb75767d9adb1edeb9ad705fc958

9 years agoMerge "cinder-rtstool: should use acl.node_wwn"
Jenkins [Thu, 8 Jan 2015 18:41:15 +0000 (18:41 +0000)]
Merge "cinder-rtstool: should use acl.node_wwn"

9 years agoMerge "Use cinder.utils.execute directly"
Jenkins [Thu, 8 Jan 2015 18:27:26 +0000 (18:27 +0000)]
Merge "Use cinder.utils.execute directly"

9 years agoAdd more rally benchmarks related to Cinder
Boris Pavlovic [Wed, 7 Jan 2015 21:26:11 +0000 (00:26 +0300)]
Add more rally benchmarks related to Cinder

Some of Rally benchmarks related to Cinder are failing often.
Especially benchmarks that attach volumes.

Adding all Cinder related benchmarks to cinder gate to help
Cinder team to fix issues.

As well make this job put to Jenkins +1/-1.
For that we added for every benchmark sla section
that checks that there is no failed iterations.

Change-Id: I3b32dd91792445d26755e8d469edb5d3f82ebca2

9 years agoMerge "LVM: Add terminate_connection call for Target Objects"
Jenkins [Thu, 8 Jan 2015 09:18:41 +0000 (09:18 +0000)]
Merge "LVM: Add terminate_connection call for Target Objects"

9 years agoMerge "Fix drbd driver to load without 3'rd party libs"
Jenkins [Thu, 8 Jan 2015 09:13:36 +0000 (09:13 +0000)]
Merge "Fix drbd driver to load without 3'rd party libs"

9 years agoMerge "Deal with tgt already exists errors"
Jenkins [Thu, 8 Jan 2015 07:44:48 +0000 (07:44 +0000)]
Merge "Deal with tgt already exists errors"

9 years agoUse cinder.utils.execute directly
John Griffith [Wed, 7 Jan 2015 23:25:48 +0000 (16:25 -0700)]
Use cinder.utils.execute directly

When we were in the process of working on brick libs
we did quite a bit of funky stuff with setting a member
variable for each class to point to an executor that was
passed in during init.

There's no longer any reason to do this with the target drivers,
so we should simplify our lives a bit and go back to using the
good old cinder.utils wrapper.

It's also believed that the use of the member variable is
susceptible to some concurrency issue that was causing the
wrong cmd string to be executed.  We'll mark this as closing
that bug and reopen if we still see the signature in Kibana.

Change-Id: I7a5648d496d15eec5d7ac3643411198226f1ffdf
Closes-Bug: #1398078

9 years agoDeal with tgt already exists errors
John Griffith [Wed, 7 Jan 2015 22:04:07 +0000 (15:04 -0700)]
Deal with tgt already exists errors

So there's a major problem in the iscsi code (and has been
for quite some time).  The tgt show command sometimes seems
to be corrupt and the issued command is actually a tgt create.
The result is that we already have a tgt and the call raises
which then causes the operation to fail.

An example of the issue:
  Stdout: Unexpected error while running command.Command:
  sudo cinder-rootwrap /etc/cinder/rootwrap.conf tgt-admin
  --update iqn.2010-10.org.openstack:volume-f055d3c5-db7a-
  484e-9d0d-b98495439413
  Exit code: 22
  Stdout:
  Command:tgtadm -C 0 --lld iscsi --op new --mode target
  --tid 1 -T iqn.2010-10.org.openstack:volume-f055d3c5-db7a-
  484e-9d0d-b98495439413
  exited with code: 22.
  Stderr: u'tgtadm: this target already exists

What's disturbing however is that in that section of code
we're sending a --op show!!  Could be something we're
doing with our member executor?  Or maybe something to
do with the new oslo concurrency code?

Regardless, his patch intends to provide a clear marker for
ER in the case that create export fails due to the
target entry already existing.

Also this patch will enable us to go ahead and just use
the existing target rather than bomb out and fail everything.
Root cause of why we're getting a second create is still
unknown and needs addressed, but this might help in getting
more info as well as keeping things stable until we address
the root issue.

Change-Id: I0faf4d49b2d3e631b08ec1dff4361ff2376e3308
Partial-Bug: #1398078

9 years agoFix drbd driver to load without 3'rd party libs
John Griffith [Thu, 8 Jan 2015 00:21:42 +0000 (00:21 +0000)]
Fix drbd driver to load without 3'rd party libs

The new drbd driver has a couple needed 3'rd party libs
that aren't in the global requirements.  That means that
any time there's an attempt to import the driver things
blow up due to import errors.

The great thing is that the author took care of things in
unit tests by creating mocks, but we still have the problem
of the driver itself, and this causes us to be unable to do
things like genconfig.

This patch just wraps the 3'rd party libs into a try/catch
block, sets them to None if they're not on the system.

Also, move the global dbus.array variable into init and
make it a member variable.

Change-Id: I33b605fecf1709efa6124312ba58cd29ed885178
Closes-Bug: #1408483

9 years agoi18n fixes for PureISCSIDriver
Mudassir Latif [Tue, 6 Jan 2015 23:52:51 +0000 (15:52 -0800)]
i18n fixes for PureISCSIDriver

Change-Id: Id786a69687385c27b2d00cda8617f2457aae4dd6

9 years agocinder-rtstool: should use acl.node_wwn
Tomoki Sekiyama [Wed, 7 Jan 2015 22:33:51 +0000 (17:33 -0500)]
cinder-rtstool: should use acl.node_wwn

In newer version of rtslib module, NodeACL is now an object, not a
dict. Thus, acl.node_wwn must be used instead of acl['node_wwn'],
otherwise it will fail with exception.

Change-Id: I0fb53596a2a99609aa4d573f1254b3afa7d9fd91
Closes-Bug: #1408443

9 years agoLVM: Add terminate_connection call for Target Objects
Tomoki Sekiyama [Wed, 7 Jan 2015 22:39:33 +0000 (17:39 -0500)]
LVM: Add terminate_connection call for Target Objects

terminate_connection should be redirected from LVM driver to targets
object. Especially this is required in LioAdm to remove an initiator
from a target. This also fixes some mismatch of method arguments and
remove unused methods in target objects.

Change-Id: Ic42836e995bbdaad92e355b94cb2d7b45d8fdb60
Partial-Bug: #1408443

9 years agoMerge "Fix argument order in assertEqual: tests/test_glusterfs.py"
Jenkins [Wed, 7 Jan 2015 22:55:34 +0000 (22:55 +0000)]
Merge "Fix argument order in assertEqual: tests/test_glusterfs.py"

9 years agoAdd an instance-locality filter
Adrien Vergé [Fri, 5 Dec 2014 15:09:10 +0000 (16:09 +0100)]
Add an instance-locality filter

Having an instance and an attached volume on the same physical host
(i.e. data locality) can be desirable in some configurations, in order
to achieve high-performance disk I/O.

This patch adds an InstanceLocalityFilter filter that allow users to
request creation of volumes 'local' to an existing instance, without
specifying the hypervisor's hostname, and without any knowledge of the
underlying back-ends.

In order to work:
- At least one physical host should run both nova-compute and
  cinder-volume services.
- The Extended Server Attributes extension needs to be active in Nova
  (this is by default), so that the 'OS-EXT-SRV-ATTR:host' property is
  returned when requesting instance info.
- The user making the call needs to have sufficient rights for the
  property to be returned by Nova. This can be achieved either by
  changing Nova's policy.json (the 'extended_server_attributes' option),
  or by setting an account with privileged rights in Cinder conf.

For example:
  Instance 01234567-89ab-cdef is running in a hypervisor on the physical
  host 'my-host'.

  To create a 42 GB volume in a back-end hosted by 'my-host':
    cinder create --hint local_to_instance=01234567-89ab-cdef 42

Note:
  Currently it is not recommended to allow instance migrations for
  hypervisors where this hint will be used. In case of instance
  migration, a previously locally-created volume will not be
  automatically migrated. Also in case of instance migration during the
  volume's scheduling, the result is unpredictable.

DocImpact: New Cinder scheduler filter
Change-Id: Id428fa2132c1afed424443083645787ee3cb0399

9 years agoMerge "Add driver filter and evaluator for scheduler"
Jenkins [Wed, 7 Jan 2015 07:58:22 +0000 (07:58 +0000)]
Merge "Add driver filter and evaluator for scheduler"

9 years agoAdds cinder iscsi driver for CloudByte storage
AmitKumarDas [Wed, 25 Jun 2014 12:08:52 +0000 (17:38 +0530)]
Adds cinder iscsi driver for CloudByte storage

This patch satisfies the basic requirements for a cinder driver. It has
the necessary code to provision storage volume, snapshot and clone.

Driver certification results url https://bugs.launchpad.net/cinder/+bug/1380126

Change-Id: Icd91eff614fa6b3e61e48edccda4bd7bf3955b60
Implements: blueprint CloudByte-ElastiStor-Cinder-Driver

9 years agoAdd driver filter and evaluator for scheduler
Anthony Lee [Mon, 8 Dec 2014 14:52:18 +0000 (06:52 -0800)]
Add driver filter and evaluator for scheduler

This patch adds a new filter for the cinder scheduler that
can interpret two new properties provided by backends,
'filter_function' and 'goodness_function'.  A driver can rely
on cinder.conf entries to define these properties for a backend
or the driver can generate them some other way.  An evaluator is
used by the filter to parse the properties.  The 'goodness_function'
property  is used to weigh qualified backends in case multiple ones
pass the filter. More details can be found in the spec:
https://review.openstack.org/#/c/129330/

Implements: blueprint filtering-weighing-with-driver-supplied-functions
DocImpact:  New optional backend properties in cinder.conf.
            New filter and weigher available for scheduler.
Change-Id: I38408ab49b6ed869c1faae746ee64a3bae86be58

9 years agoRemove import of private _lazy module
John Griffith [Tue, 6 Jan 2015 21:40:00 +0000 (14:40 -0700)]
Remove import of private _lazy module

New version of oslo.i18n released and some things
moved around (internal private modules in the lib).

This should be fine and shouldn't matter to us, BUT
it seems we had some hackery going on in our unit tests
that were being lazy and importing and manipulating the
private library.

This patch removes those cases and fixed up the cinder.i18n
helper method for enable_lazy to accept a bool (which is how
the libraries method works to begin with).

There were several tests in test_faults that were actually
performing and comparing translations of messages.  These
tests aren't quite working now because they had a number
of things they imported from private variables and methods
in the i18n module.  Honestly I'm not sure of the value of
testing those things here anyway, but for now I've just
added a skip to those and we can sort out long term fixes
and plans later.

Change-Id: I2ae3d9b98c107cebaf386adbdcdb3cfafee070be
Partial-Bug: #1408099

9 years agoFix the continuation line indent to pass flake8
Accela Zhao [Tue, 6 Jan 2015 05:36:35 +0000 (13:36 +0800)]
Fix the continuation line indent to pass flake8

The flake8 complains "E128 continuation line under-indented for
visual indent" on cinder/tests/api/contrib/test_types_manage.py
line 270. The continuation line should be indented to the opening
parentheses. This patch fixes the indention.

Change-Id: I8330e2580863ed4d53b5607c25fc5317c5a166b9

9 years agoCapitalize the first letter in log messages.
Accela Zhao [Tue, 6 Jan 2015 02:17:56 +0000 (10:17 +0800)]
Capitalize the first letter in log messages.

Capitalize the first letter in the log messages of
cinder/tests/test_emc_xtremio.py to make them look more consistent
with logging in other places.

Change-Id: Ib23248f8d983f5bee31f405c2088b99772a083bd

9 years agoFix argument order in assertEqual: tests/test_glusterfs.py
Bharat Kumar Kobagana [Tue, 6 Jan 2015 05:44:18 +0000 (11:14 +0530)]
Fix argument order in assertEqual: tests/test_glusterfs.py

The assertEqual in cinder/tests/test_glusterfs.py is using
incorrect argument order (observed, expected), which causes the
error message about mismatch to be reversed if the test case fails.
Change it to (expected, observed).

Change-Id: Idcd88de9c5e8a096f0ef473e92bff17e6be16814
Partial-Bug: #1259292

9 years agoMerge "Replace oslo-incubator with oslo_context"
Jenkins [Mon, 5 Jan 2015 23:27:33 +0000 (23:27 +0000)]
Merge "Replace oslo-incubator with oslo_context"

9 years agoMerge "The DRBD(manage) Cinder volume driver"
Jenkins [Mon, 5 Jan 2015 21:28:40 +0000 (21:28 +0000)]
Merge "The DRBD(manage) Cinder volume driver"

9 years agoMerge "Transition LVM Driver to use Target Objects"
Jenkins [Mon, 5 Jan 2015 21:28:07 +0000 (21:28 +0000)]
Merge "Transition LVM Driver to use Target Objects"

9 years agoUse assertRaisesRegexp() in test_srb.py.
Corey Bryant [Mon, 5 Jan 2015 19:53:48 +0000 (14:53 -0500)]
Use assertRaisesRegexp() in test_srb.py.

Python >= 2.7 should be using assertRaisesRegexp()
rather than assertRaisesRegex().

Change-Id: I033b88d50cf90503e1123a9871c1bc252d914c06
Closes-Bug: 1407781

9 years agoThe DRBD(manage) Cinder volume driver
Philipp Marek [Thu, 18 Dec 2014 19:12:13 +0000 (20:12 +0100)]
The DRBD(manage) Cinder volume driver

This driver allows to use DRBD 9, via the DRBDmanage Dbus API,
as a Software-Defined-Storage backend.

Cert test result: https://bugs.launchpad.net/cinder/+bug/1400834

Change-Id: Ia0851ddaf405044978343f61cf22c61e7f6682c2

9 years agoMerge "Make ProphetStor drivers compliant with logging standards"
Jenkins [Mon, 5 Jan 2015 04:33:59 +0000 (04:33 +0000)]
Merge "Make ProphetStor drivers compliant with logging standards"

9 years agoMake ProphetStor drivers compliant with logging standards
rick.chen [Tue, 30 Dec 2014 04:11:18 +0000 (12:11 +0800)]
Make ProphetStor drivers compliant with logging standards

The guidelines are specified here:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html

Change-Id: I9e76f3159ee6fbee2c7394aa59ac05f5904ae1cb
Partial-Bug: 1384312

9 years agoTransition LVM Driver to use Target Objects
John Griffith [Tue, 18 Nov 2014 00:46:54 +0000 (00:46 +0000)]
Transition LVM Driver to use Target Objects

This patch refactors the LVM Driver to take a
seperate Target object instead of mixing the
control and data path implementations inside the
driver itself.

It removes the volume/iscsi.py and brick/iscsis/*
files which were duplicating code and actually
very messy in terms of where calls were actually
being implemented.

Change-Id: I43190d1dac33748fe55fa00f260f32ab209be656

9 years agoMerge "Convert mox to mock: tests/test_glusterfs.py"
Jenkins [Fri, 2 Jan 2015 18:13:08 +0000 (18:13 +0000)]
Merge "Convert mox to mock: tests/test_glusterfs.py"

9 years agoReplace oslo-incubator with oslo_context
Yuriy Nesenenko [Fri, 26 Dec 2014 10:00:52 +0000 (12:00 +0200)]
Replace oslo-incubator with oslo_context

Context currently being moved out of the incubator to a standalone project.

Change-Id: I4f25ed35a88f82ee934cc35872c66d7a38256408
Closes-Bug: #1210261

9 years agoCreate proxy volume driver
Marc Koderer [Wed, 10 Dec 2014 06:29:25 +0000 (07:29 +0100)]
Create proxy volume driver

Drivers that need a special proxy logic can't inherit from BaseVD
directly. This is problematic for the ABCmeta feature since the class
model can't be accessed easily with isinstance().

Change-Id: I553a72991bb450e8581a757fb98a264ed1ba8fb2
Partly-Implements: blueprint abc-volume-drivers

9 years agoMerge "Fix 3PAR host persona mapping to match WSAPI"
Jenkins [Thu, 1 Jan 2015 02:55:08 +0000 (02:55 +0000)]
Merge "Fix 3PAR host persona mapping to match WSAPI"

9 years agoMerge "Make 3PAR drivers compliant with logging standards"
Jenkins [Wed, 31 Dec 2014 16:10:14 +0000 (16:10 +0000)]
Merge "Make 3PAR drivers compliant with logging standards"

9 years agoMerge "Fixing 3PAR connection name cache error"
Jenkins [Wed, 31 Dec 2014 08:32:44 +0000 (08:32 +0000)]
Merge "Fixing 3PAR connection name cache error"