]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
9 years agoInvalid GlusterFS share format error
Bharat Kumar Kobagana [Mon, 17 Nov 2014 05:42:13 +0000 (11:12 +0530)]
Invalid GlusterFS share format error

When we provide invalid GlusterFS share format in GlusterFS shares
configuration file (glusterfs_shares_config), it will log a
Warning message in the volume log file, which not easily discover
able while debugging.

So, this patch changing Invalid GlusterFS share Warning message to
Error message.

Change-Id: I24d47dafc56490d40bd81256135f4b13fce5614a

9 years agoMerge "Add i18n _LX tags for relevant log levels in EQLX driver."
Jenkins [Mon, 17 Nov 2014 03:53:01 +0000 (03:53 +0000)]
Merge "Add i18n _LX tags for relevant log levels in EQLX driver."

9 years agoMerge "Mock cinder.wsgi.Server in TestWSGIService"
Jenkins [Sun, 16 Nov 2014 11:04:04 +0000 (11:04 +0000)]
Merge "Mock cinder.wsgi.Server in TestWSGIService"

9 years agoMerge "Remove cinder/compute/aggregate_states.py"
Jenkins [Sun, 16 Nov 2014 06:37:21 +0000 (06:37 +0000)]
Merge "Remove cinder/compute/aggregate_states.py"

9 years agoMerge "Mock isfile in test_ssh_missing_hosts_key_file"
Jenkins [Sun, 16 Nov 2014 00:31:04 +0000 (00:31 +0000)]
Merge "Mock isfile in test_ssh_missing_hosts_key_file"

9 years agoMerge "Fix wrapper to work with barbicanclient 3.0.1"
Jenkins [Sun, 16 Nov 2014 00:17:20 +0000 (00:17 +0000)]
Merge "Fix wrapper to work with barbicanclient 3.0.1"

9 years agoAdd i18n _LX tags for relevant log levels in EQLX driver.
Sean McGinnis [Sat, 15 Nov 2014 01:39:54 +0000 (19:39 -0600)]
Add i18n _LX tags for relevant log levels in EQLX driver.

The decision has been made to follow the translation
convention used in other projects of marking all INFO
and above log strings with _LI, _LW, or _LE. This patch
adds these markers for all log strings in the EQLX
driver that are not being used in an exception or where
array output is being logged.

Change-Id: I978886e0a98601c0b3d70f7c97bccf6561ba325e

9 years agoBump Req timeout to 30 seconds in SolidFire Driver
John Griffith [Fri, 14 Nov 2014 18:26:07 +0000 (11:26 -0700)]
Bump Req timeout to 30 seconds in SolidFire Driver

Local SolidFire CI system seems to have various networking
disconnects during runs.  This appears to be a problem with
latencies in our lab.

Currently have resources working on this, but in the meantime
bumping the timeout value in requests to see if we can address
it that way and get CI running again.  We'll either get to root
cause in our network or add this as a formal config option later
that will be used only for SolidFire CI system.

Change-Id: I0a13ac2e60c7053fc935922bfb28127ade858392

9 years agoRemove cinder/compute/aggregate_states.py
git-harry [Fri, 14 Nov 2014 17:10:58 +0000 (17:10 +0000)]
Remove cinder/compute/aggregate_states.py

This file is from the initial fork from nova. It defines the states a
host aggregate can take. It is not used anywhere in the cinder code
and is therefore unnecessary.

The commit removes the file from the codebase.

Change-Id: I9ba12aabc5009020950b746f312372fa4bfa156d

9 years agoMerge "Fix Brocade FC SAN lookup MITM vulnerability"
Jenkins [Fri, 14 Nov 2014 16:26:27 +0000 (16:26 +0000)]
Merge "Fix Brocade FC SAN lookup MITM vulnerability"

9 years agoMock isfile in test_ssh_missing_hosts_key_file
git-harry [Fri, 14 Nov 2014 09:09:55 +0000 (09:09 +0000)]
Mock isfile in test_ssh_missing_hosts_key_file

test_ssh_missing_hosts_key_file tests that when the ssh_hosts_key_file
is missing an InvalidInput exception is raised. It does this by
setting CONF.ssh_hosts_key_file to, what is assumed to be, the
location of a non-existant file. If the file, /tmp/blah, exists the
test fails. This test should not be dependent on what is on the
filesystem.

This commit adds a mock for os.path.isfile so that when
ssh_utils.SSHPool checks for existance of CONF.ssh_hosts_key_file it
always gets False regardless of the state of the filesystem.

Change-Id: I6bf797301a0829797d55d4442088f9ef944aec2c
Closes-bug: #1392628

9 years agoMerge "Implementing the use of _L’x’/i18n markers"
Jenkins [Fri, 14 Nov 2014 15:46:59 +0000 (15:46 +0000)]
Merge "Implementing the use of _L’x’/i18n markers"

9 years agoMerge "Scality driver:use self.configuration instead of CONF"
Jenkins [Fri, 14 Nov 2014 15:21:34 +0000 (15:21 +0000)]
Merge "Scality driver:use self.configuration instead of CONF"

9 years agoMerge "Implementing the use of _L’x’/i18n markers"
Jenkins [Fri, 14 Nov 2014 15:19:54 +0000 (15:19 +0000)]
Merge "Implementing the use of _L’x’/i18n markers"

9 years agoImplementing the use of _L’x’/i18n markers
Mike Mason [Tue, 11 Nov 2014 14:05:24 +0000 (14:05 +0000)]
Implementing the use of _L’x’/i18n markers

Placing the _Lx markers back into the code.  No other cleaner solution has
has been implemented. Patches will be submitted in a series of sub
directories and in a fashion that is manageable.
This is the fifth commit of this kind

Change-Id: I476750bf05ddee85dd5bf25c7bd00ee103d23115
Partial-Bug: #1384312

9 years agoScality driver:use self.configuration instead of CONF
JordanP [Thu, 13 Nov 2014 16:14:00 +0000 (17:14 +0100)]
Scality driver:use self.configuration instead of CONF

In order for the Filter scheduler to be used to it's full advantage
Cinder drivers need to move away from using FLAGS directly and switch
to appending their specific options to self.configuration.

This patch converts the driver and updates tests.

Commit message stolen from Id1a7c583894ac368bdcc61facc6f72300db320c7
Closes-Bug: #1392633
Change-Id: I61b0b6a21628d5629b5f80768e73ee44db05d1ce

9 years agoMerge "Explicitly close requests obj in SolidFire Driver"
Jenkins [Fri, 14 Nov 2014 06:27:39 +0000 (06:27 +0000)]
Merge "Explicitly close requests obj in SolidFire Driver"

9 years agoMerge "Add automatic creation and deletion of Purity hosts for PureISCSIDriver"
Jenkins [Fri, 14 Nov 2014 05:26:24 +0000 (05:26 +0000)]
Merge "Add automatic creation and deletion of Purity hosts for PureISCSIDriver"

9 years agoMerge "Add volume attribute support to volume created using clone, snapshot"
Jenkins [Fri, 14 Nov 2014 05:25:41 +0000 (05:25 +0000)]
Merge "Add volume attribute support to volume created using clone, snapshot"

9 years agoMock cinder.wsgi.Server in TestWSGIService
git-harry [Thu, 13 Nov 2014 21:50:23 +0000 (21:50 +0000)]
Mock cinder.wsgi.Server in TestWSGIService

The fixed tests were binding to port 8776. These unit tests should not
be starting the wsgi app and so the class has been mocked.

Change-Id: I52b8ce4788741a0802d4d91d413474101542a3e0
Closes-bug: #1392498

9 years agoExplicitly close requests obj in SolidFire Driver
John Griffith [Thu, 13 Nov 2014 14:43:13 +0000 (07:43 -0700)]
Explicitly close requests obj in SolidFire Driver

Currently we're not explicitly returning requests
connection objects back to the ConnectionPool when
we're done with them.  For most cases this isn't a
problem, however if we start adding higher and higher
concurrent actions the internal Connection Pool management
doesn't keep up.

This patch just adds an explicit close of the requests
connection after we're done with it to keep the ConnectionPool
as full as possible and avoid any resource issues that could
occur during heavy concurrent usage.

Change-Id: Ib074ca15286060d2aa11cdc66e74be1b8eed3c93

9 years agoAdd volume attribute support to volume created using clone, snapshot
Manojkiran [Wed, 29 Oct 2014 02:36:24 +0000 (08:06 +0530)]
Add volume attribute support to volume created using clone, snapshot

The following patch adds support for volume attributes (setting of
storage pool, replicas, dio, write affinity etc) in case of volume
creation triggered using snapshot, clone.

Change-Id: Ia6e24cafb85c0b2996e2524b45c189fb38e83848
Closes-Bug: #1386650

9 years agoStop stacktracing on QuotaErrors
Joe Gordon [Fri, 3 Oct 2014 01:18:31 +0000 (18:18 -0700)]
Stop stacktracing on QuotaErrors

QuotaErrors are expected, no need to stacktrace for it.

Change-Id: I748848789a73798abae964040efe1a329fbf1bd9

9 years agoStop stacktracing on InvalidInput exceptions
Joe Gordon [Thu, 2 Oct 2014 17:11:48 +0000 (10:11 -0700)]
Stop stacktracing on InvalidInput exceptions

InvalidInput is an expected error case, no need to stacktrace for it,
just log the error.

Change-Id: Ifcca98effd3ab153af30d21f2f23094210fe8ce3
Closes-Bug: #1376839

9 years agoAdd automatic creation and deletion of Purity hosts for PureISCSIDriver
Patrick East [Fri, 22 Aug 2014 23:43:20 +0000 (16:43 -0700)]
Add automatic creation and deletion of Purity hosts for PureISCSIDriver

The driver will now be responsible to manage hosts for new initiators
which do not already have a host created for them. This will allow for
backwards compatibility with the previous version that relied on hosts
being pre-configured for use by Cinder.

Implements: blueprint pure-iscsi-automatic-host-creation
Change-Id: I04b554e1a21128d55eddc21afda7108a868e4248

9 years agoFix Brocade FC SAN lookup MITM vulnerability
Matthew Edmonds [Tue, 11 Nov 2014 21:03:23 +0000 (16:03 -0500)]
Fix Brocade FC SAN lookup MITM vulnerability

Modify the Brocade FC SAN lookup service implementation to use the
same SSH key config properties used elsewhere rather than relying on
arguments which are non-standard and never passed by the base lookup
service.

Change-Id: I0cb5141368bc9a62a4e0374026d66fc2725cfe24
Closes-Bug: 1391311

9 years agoMerge "Imported Translations from Transifex"
Jenkins [Tue, 11 Nov 2014 11:43:47 +0000 (11:43 +0000)]
Merge "Imported Translations from Transifex"

9 years agoMerge "Updated from global requirements"
Jenkins [Tue, 11 Nov 2014 11:43:37 +0000 (11:43 +0000)]
Merge "Updated from global requirements"

9 years agoImplementing the use of _L’x’/i18n markers
Mike Mason [Thu, 6 Nov 2014 13:37:37 +0000 (13:37 +0000)]
Implementing the use of _L’x’/i18n markers

Placing the _Lx markers back into the code.  No other cleaner solution has
has been implemented. Patches will be submitted in a series of sub
directories and in a fashion that is manageable.
This is the third commit of this kind

Change-Id: I33b0bb05b1c1ea91dc5a1e93eaadceea1f23fcc9
Partial-Bug: #1384312

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Tue, 11 Nov 2014 06:09:44 +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: I3c97602b295590fb90cba334e6d390e1e52f9be5

9 years agoMerge "Activate pep8 check that _ is imported"
Jenkins [Tue, 11 Nov 2014 03:32:21 +0000 (03:32 +0000)]
Merge "Activate pep8 check that _ is imported"

9 years agoMerge "Retry remove iscsi target"
Jenkins [Tue, 11 Nov 2014 03:32:13 +0000 (03:32 +0000)]
Merge "Retry remove iscsi target"

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Mon, 10 Nov 2014 22:58:13 +0000 (22:58 +0000)]
Updated from global requirements

Change-Id: Ib06608cdb8ce099ddc5f5f92aa33e6ba3c68e079

9 years agoFix the LV NotFound situation for thin-type LVM
David Pineau [Thu, 6 Nov 2014 14:01:13 +0000 (15:01 +0100)]
Fix the LV NotFound situation for thin-type LVM

If the logical volume is not found, LVM displays on the error output
that the volumes could not be found. So here, we filter on this very
specific situation, and let all the other cases go through the stack.

Added a test for this new code path, which raises an exception of the
proper type to be caught by the new code.

Change-Id: I703af8ccd87c6332d9f88eff63fcf26ebed234f4
Closes-Bug: #1390081

9 years agoFix wrapper to work with barbicanclient 3.0.1
Brianna Poulos [Thu, 6 Nov 2014 21:07:16 +0000 (13:07 -0800)]
Fix wrapper to work with barbicanclient 3.0.1

Due to the updates to the python-barbicanclient in version 3.0.1, the cinder
barbican wrapper no longer functions.  This patch updates the cinder barbican
wrapper and test cases to work with barbicanclient 3.0.1.

Change-Id: Ibef4abd5fd9b12962420eaa5d7ebf62700171861
Closes-Bug: #1388461

9 years agoRetry remove iscsi target
Matt Riedemann [Fri, 7 Nov 2014 14:23:09 +0000 (06:23 -0800)]
Retry remove iscsi target

There is a race in the gate when removing an iscsi
target in the remove export flow where the target
is still active. It's about a 75% failure rate so
simply adding a configurable retry on the delete
call should clean that up.

Change-Id: I8531652e8b80f1c65c9942e109dea01fda5674e0
Closes-Bug: #1363258

9 years agoRemove test_barbican from keymgr tests
John Griffith [Tue, 4 Nov 2014 22:34:28 +0000 (23:34 +0100)]
Remove test_barbican from keymgr tests

Unfortunately it seems we have some very poorly
written keymgr unit tests, specifically
keymgr/test_barbican.py does this:
from barbicanclient.common import auth

First problem is that from a unit test perspective
that pretty much sucks, second problem is that
barbicanclient as of version 3.0.0.0 no longer
has an "auth" module, as a result Cinderunit tests
now fail.

The test_barbican.py unit tests need to be rewritten
to mock out the client components and actually test
Cinder components where needed without relying on
the barbicanclient.

For now in order to free up the gate, remove test_barbican.py

Change-Id: Id770c87c0d622ae4c1e0d71141ffa9aed29be2ec
Partial-Bug: #1389419

10 years agoMerge "Small typos"
Jenkins [Tue, 4 Nov 2014 11:09:25 +0000 (11:09 +0000)]
Merge "Small typos"

10 years agoMerge "Implementing the use of _L’x’/i18n markers"
Jenkins [Tue, 4 Nov 2014 10:38:10 +0000 (10:38 +0000)]
Merge "Implementing the use of _L’x’/i18n markers"

10 years agoMerge "LIO: Fix UnboundLocalError in ensure_export"
Jenkins [Tue, 4 Nov 2014 09:07:26 +0000 (09:07 +0000)]
Merge "LIO: Fix UnboundLocalError in ensure_export"

10 years agoImplementing the use of _L’x’/i18n markers
Mike Mason [Thu, 23 Oct 2014 13:16:42 +0000 (13:16 +0000)]
Implementing the use of _L’x’/i18n markers

Placing the _Lx markers back into the code.  No other cleaner solution has
has been implemented. Patches will be submitted in a series of sub
directories and in a fashion that is manageable.

Partial-Bug: #1384312

Change-Id: I62c708036a9cd5da431b7a95e9cd41167fb5273b

10 years agoDisable python-barbicanclient 3.0.0 version
ZhiQiang Fan [Sat, 1 Nov 2014 18:18:35 +0000 (02:18 +0800)]
Disable python-barbicanclient 3.0.0 version

python-barbicanclient 3.0.0 has introduced cliff module, but pins it
to 1.6.1, while global-requirements set it to >=1.7.0, now the whole
OpenStack projects depends on higher version of cliff, but
python-barbicanclient is needed by cinder, then grenade test will
fail because: pkg_resources.DistributionNotFound: cliff==1.6.1

As long as python-barbicanclient maintainers don't provide a patch
for 3.0.0 (which seems not happen FMPOV), we need to disbable this
version.

Change-Id: I02f055ae89989cef2bd0264c60279a1f1a141e01
Related-Bug: #1388414

10 years agoMerge "Cleanly override config in tests"
Jenkins [Fri, 31 Oct 2014 07:46:02 +0000 (07:46 +0000)]
Merge "Cleanly override config in tests"

10 years agoMerge "Fix NetApp AutoSupport Shortcomings."
Jenkins [Thu, 30 Oct 2014 21:44:30 +0000 (21:44 +0000)]
Merge "Fix NetApp AutoSupport Shortcomings."

10 years agoActivate pep8 check that _ is imported
James Carey [Thu, 30 Oct 2014 15:28:48 +0000 (15:28 +0000)]
Activate pep8 check that _ is imported

Removed the specification in tox.ini that _ is a builtin so that
it will no longer assume that _ does not need to be imported.

The correct import is:

    from cinder.i18n import _

Activating this check did not flag any violations in cinder.

Change-Id: Ifc789514d2462c059eb9f003fac288e751331ded

10 years agoLIO: Fix UnboundLocalError in ensure_export
Eric Harney [Thu, 30 Oct 2014 20:33:40 +0000 (16:33 -0400)]
LIO: Fix UnboundLocalError in ensure_export

If db.volume_get() fails here, volume_info (and chap_auth)
are unbound, and the below usages will fail.

volume_get() failing is the only way to land in the NotFound
handler, so just remove this debug line.  It won't ever have
info to print.

Move code not related to db lookup out of this try block, and
return when NotFound occurs.

Closes-Bug: #1387866

Change-Id: I13a88bec1a66d8a0794b08514cc9844d60f6c809

10 years agoMerge "Brick LVM: Rename get_all_volumes, further optimize"
Jenkins [Thu, 30 Oct 2014 15:56:34 +0000 (15:56 +0000)]
Merge "Brick LVM: Rename get_all_volumes, further optimize"

10 years agoBrick LVM: Rename get_all_volumes, further optimize
Eric Harney [Tue, 28 Oct 2014 21:03:42 +0000 (17:03 -0400)]
Brick LVM: Rename get_all_volumes, further optimize

This method can process all LVs, those in a VG, or an
individual LV.  Rename it to be more descriptive.

Optimize update_volume_group_info check for thin pool.

Remove volume.utils.get_all_volumes, which is unused.

Remove fake_lvm.get_all_volumes and
fake_lvm.get_all_volume_groups which don't appear to
have correct signatures/returns and are unused.

Change-Id: I412c62230517cbfc08cc0076aaeea45224e6b50e

10 years agoMerge "Fix wrong arg number for _fix_id_migration issue"
Jenkins [Wed, 29 Oct 2014 08:18:06 +0000 (08:18 +0000)]
Merge "Fix wrong arg number for _fix_id_migration issue"

10 years agoMerge "Brick LVM: Optimize get_volume"
Jenkins [Tue, 28 Oct 2014 23:06:05 +0000 (23:06 +0000)]
Merge "Brick LVM: Optimize get_volume"

10 years agoMerge "Verify the full interface of the context object"
Jenkins [Tue, 28 Oct 2014 22:13:29 +0000 (22:13 +0000)]
Merge "Verify the full interface of the context object"

10 years agoFix wrong arg number for _fix_id_migration issue
Mike Perez [Tue, 28 Oct 2014 21:48:50 +0000 (14:48 -0700)]
Fix wrong arg number for _fix_id_migration issue

If the provider_location doesn't contain the name of the volume, TGT and
ISER will fail on doing a id migration, due to wrong number of
arguments.

Change-Id: I420ceaf14edfb6a0e3b8fd1f50070dc70b6f16bd
Closes-Bug: #1386902

10 years agoCleanly override config in tests
Adrien Vergé [Tue, 28 Oct 2014 21:00:09 +0000 (22:00 +0100)]
Cleanly override config in tests

CONF.set_override() is often called in tests but CONF.clear_override()
is never. Create a override_config() method in the base TestCase class
that restores previous conf value after test, as it is done in other
OpenStack projects.

Change-Id: Id57b4502a2a37ea12047985cf2ea6c38c6f965fd

10 years agoMerge "Add debug output indicating provider_location"
Jenkins [Tue, 28 Oct 2014 21:01:09 +0000 (21:01 +0000)]
Merge "Add debug output indicating provider_location"

10 years agoMerge "LioAdm: Delete initiator from targets on terminate_connection"
Jenkins [Tue, 28 Oct 2014 21:01:01 +0000 (21:01 +0000)]
Merge "LioAdm: Delete initiator from targets on terminate_connection"

10 years agoMerge "TgtAdm: Don't change CHAP username/password on live migration"
Jenkins [Tue, 28 Oct 2014 21:00:52 +0000 (21:00 +0000)]
Merge "TgtAdm: Don't change CHAP username/password on live migration"

10 years agoMerge "Use look up service for auto zoning"
Jenkins [Tue, 28 Oct 2014 17:31:48 +0000 (17:31 +0000)]
Merge "Use look up service for auto zoning"

10 years agoAdd debug output indicating provider_location
John Griffith [Tue, 28 Oct 2014 16:21:52 +0000 (10:21 -0600)]
Add debug output indicating provider_location

Just add a simple debug statement to indicate the resultant
provider location of a tgtadm volume after create_export.

Change-Id: Ide12986400c54978ee5b387d615b203c0f93f029

10 years agoMerge "Fix for debugging c-vol in PyCharm"
Jenkins [Tue, 28 Oct 2014 15:07:35 +0000 (15:07 +0000)]
Merge "Fix for debugging c-vol in PyCharm"

10 years agoUse look up service for auto zoning
Xing Yang [Thu, 9 Oct 2014 05:26:28 +0000 (01:26 -0400)]
Use look up service for auto zoning

The VMAX FC driver didn't use the look up service for auto zoning.
Instead it built initiator target map itself. However, that
requires the initiator to log into the fabric before zoning
in order to find out target WWNs.

This patch is to use the look up service to find out valid initiator
target WWNS and use that to build initiator target map. With this fix,
the initiator is no longer required to log into the fabric ahead of time.

Change-Id: I76e1a8a2e7d4230b851b763f7d13dd1489b69364
Closes-Bug: #1379156

10 years agoFix for debugging c-vol in PyCharm
Clinton Knight [Thu, 23 Oct 2014 19:46:29 +0000 (15:46 -0400)]
Fix for debugging c-vol in PyCharm

Change-Id: I76a6bf44630d33fbc9e33cf79ab859621d215599
Closes-bug: 1384872

10 years agoMerge "Fix SolidFire inaccurate model on migrated vols"
Jenkins [Mon, 27 Oct 2014 03:05:29 +0000 (03:05 +0000)]
Merge "Fix SolidFire inaccurate model on migrated vols"

10 years agoMerge "CiscoFCSanLookupSerive uses extra argument in init"
Jenkins [Mon, 27 Oct 2014 01:39:48 +0000 (01:39 +0000)]
Merge "CiscoFCSanLookupSerive uses extra argument in init"

10 years agoMerge "Reserve 5 migrations for backports"
Jenkins [Sun, 26 Oct 2014 23:26:41 +0000 (23:26 +0000)]
Merge "Reserve 5 migrations for backports"

10 years agoMerge "Add ability to update migration info on backend"
Jenkins [Sun, 26 Oct 2014 23:26:32 +0000 (23:26 +0000)]
Merge "Add ability to update migration info on backend"

10 years agoCiscoFCSanLookupSerive uses extra argument in init
Xing Yang [Sun, 26 Oct 2014 21:29:26 +0000 (17:29 -0400)]
CiscoFCSanLookupSerive uses extra argument in init

This patch fixed two issues with the __init__ routine in
CiscoFCSanLookupService:

1. There's an extra argument in super(CiscoFCSanLookupService,
self).__init__(self, **kwargs). It should be changed to
super(CiscoFCSanLookupService, self).__init__(**kwargs).

2. The last line 'self.fabric_configs = ""' should be removed.
self.fabric_configs was created in self.create_configuration() in the
middle of the __init__ routine. It shouldn't be cleared out at the end
of the __init__ routine.

Change-Id: I2623f3b51af34d14849015e52e3676271c9fe414
Closes-Bug: #1385974

10 years agoFix SolidFire inaccurate model on migrated vols
John Griffith [Thu, 23 Oct 2014 16:37:11 +0000 (16:37 +0000)]
Fix SolidFire inaccurate model on migrated vols

The general migration impl in Cinder works
by creating a new volume, transfering the data
from the original volume to the new volume, and
then deleting the original and flipping the ID
of the new volume.

Turns out we missed the fact that this creates a
mismatch between the volume Cinder will later ask
for and what the volumes identity is on the backend
device.

This change adds a check on create_volume at the drivers
level to see if it's part of a migration and is infact
going to get renamed.  If so, just use the new name
and avoid all the headaches that come later with updating
provider auth and location.

The model info won't change in this case and is accessible
independent of the ID field in the Cinder base and the
crazy change that's going to take place on that value
in the Cinder DB.

Change-Id: If916df5fd986352ffb20f2dd74552e4d7dad4f60
Closes-Bug: #1381943

10 years agoEventlet green threads not released back to pool
abhishekkekane [Tue, 21 Oct 2014 09:31:15 +0000 (02:31 -0700)]
Eventlet green threads not released back to pool

Presently, the wsgi server allows persist connections hence even after
the response is sent to the client, it doesn't close the client socket
connection.
Because of this problem, the green thread is not released back to the pool.

In order to close the client socket connection explicitly after the
response is sent and read successfully by the client, you simply have to
set keepalive to False when you create a wsgi server.

DocImpact:
Added wsgi_keep_alive option (default=True).
In order to maintain the backward compatibility, setting wsgi_keep_alive
as True by default. Recommended is set it to False.

SecurityImpact

Closes-Bug: #1361360
Change-Id: Ic57b2aceb136e8626388cfe4df72b2f47cb0661c

10 years agoAdd ability to update migration info on backend
John Griffith [Tue, 21 Oct 2014 23:19:22 +0000 (23:19 +0000)]
Add ability to update migration info on backend

The current migration process creates a new volume,
xfr's it's contents, then deletes the original and
modifies the new volume to have the previous ID.

All in all this is kinda troublesome, but regardless
the bigger problem is that the generic impl doesn't
provide any method to tell the backend devices that
their device names/id's have changed.

This patch provides a method to inform backends
that a migration operation has been completed on
their target volume.

It shouldn't be necessary to do anything with the originating
or source volume because it's deleted as part of the process.

Change-Id: Ib5e6a47fe9eedab3e60e77a6c2d987355c0bf167
Closes-Bug: #1383499

10 years agoReserve 5 migrations for backports
John Griffith [Fri, 24 Oct 2014 14:19:19 +0000 (08:19 -0600)]
Reserve 5 migrations for backports

Reserve 5 migrations incase the need arises to backport any
fixes that require a db migration in stable/juno.

We've never set this up in the past and we did run into a case
last cycle where we had to hack some things around to make it work
without the place holder.

Why 5?  Why not?  For as little as we touch the DB historically
this number should be more than sufficient.

Change-Id: I2830f6557c65c4c9b3056bb5ee72b17346e21823

10 years agoVerify the full interface of the context object
Ivan Kolodyazhny [Mon, 22 Sep 2014 14:33:13 +0000 (17:33 +0300)]
Verify the full interface of the context object

Improved testcase for get_test_admin_context method
Change-Id: I8c99401150ed41cbf66b32cd00c7f8353ec4e267

10 years agoMerge "Imported Translations from Transifex"
Jenkins [Fri, 24 Oct 2014 12:11:46 +0000 (12:11 +0000)]
Merge "Imported Translations from Transifex"

10 years agoMerge "NFS Security Enhancements: allows secure NFS environment setup"
Jenkins [Fri, 24 Oct 2014 12:11:07 +0000 (12:11 +0000)]
Merge "NFS Security Enhancements: allows secure NFS environment setup"

10 years agoImported Translations from Transifex
OpenStack Proposal Bot [Fri, 24 Oct 2014 06:10:35 +0000 (06:10 +0000)]
Imported Translations from Transifex

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

Change-Id: I3fd4f684914909cd4fb35f7d0435a430c80ecfd6

10 years agoLioAdm: Delete initiator from targets on terminate_connection
Tomoki Sekiyama [Wed, 22 Oct 2014 22:30:06 +0000 (18:30 -0400)]
LioAdm: Delete initiator from targets on terminate_connection

In current LioAdm implementation, initiators are remained even if
terminate_connection is called. This keeps volumes exported to hosts
after instances attaching the volumes are live-migrated to another
host, which is not good for security. It also causes an error on the
migration back to the original host, because cinder-rtstool doesn't
update CHAP authentication if the initiator already exists.

With this patch, initiators are deleted on terminate_conection.
'initiator-delete' operation is added to cinder-rtstool.
It makes the following live-migration succeed.
Also, this adds unit tests for initialize_connection and
terminate_connection methods in LioAdm.

Change-Id: Ib273f0ba4f1ef553374c0433b049f18719f8c758
Closes-Bug: #1369541

10 years agoNFS Security Enhancements: allows secure NFS environment setup
Glenn M. Gobeli [Thu, 12 Jun 2014 13:31:25 +0000 (09:31 -0400)]
NFS Security Enhancements: allows secure NFS environment setup

This patch allows an OpenStack environment to run as a secure NAS
environment from the client and server perspective, including having
root squash enabled and not running file operations as the 'root'
user. This also sets Cinder file permissions as 660: removing
other/world file access.

The "nas_secure_file_permissions" option controls the setting of file
permissions when Cinder volumes are created. The option defaults to
"auto" to gracefully handle upgrade scenarios. When set to "auto",
a check is done during Cinder startup to determine if there are
existing Cinder volumes: no volumes will set the option to 'true',
and use secure file permissions. The detection of existing volumes will
set the option to 'false', and use the current insecure method of
handling file permissions.

The "nas_secure_file_operations" option controls whether file
operations are run as the 'root' user or the current OpenStack
'process' user. The option defaults to "auto" to gracefully handle
upgrade scenarios. When set to "auto", a check is done during Cinder
startup to determine if there are existing Cinder volumes: no volumes
will set the option to 'true', be secure and do NOT run as the 'root'
user. The detection of existing volumes will set the option to 'false',
and use the current method of running operations as the 'root' user.
For new installations, a 'marker file' is written so that subsequent
restarts of Cinder will know what the original determination had been.

This patch enables this functionality only for the NFS driver.
Other similar drivers can use this code to enable the same
functionality with the same config options.

DocImpact
Change-Id: I3d25f593beab7f5462576b14ab62d13d8c53e7c6
Implements: blueprint secure-nfs
Partial-Bug: 1260679

10 years agoBrick LVM: Optimize get_volume
Eric Harney [Thu, 23 Oct 2014 15:28:29 +0000 (11:28 -0400)]
Brick LVM: Optimize get_volume

When we only want the LV information for a single volume, call
"lvs" with the volume name specified.

This should reduce unnecessary load of calling "lvs" for the
whole VG.

Related-Bug: #1373513

Change-Id: Ifbb679e9160f44fe52ecba7bf19aa0eb5bb133f1

10 years agoTgtAdm: Don't change CHAP username/password on live migration
Tomoki Sekiyama [Mon, 20 Oct 2014 18:32:55 +0000 (14:32 -0400)]
TgtAdm: Don't change CHAP username/password on live migration

As tgtd doesn't update CHAP username/password while the initiator is
connected, CHAP username/password must not be changed while a Nova
instance are performing live-migration; otherwise the compute node
which the instance migrates to cannot login to the volume and the
migration process is aborted.

This fixes TgtAdm implementation not to regenerate random
username/password every time initialize_connection is called.
Also, it enables CHAP auth in unit tests of TargetAdmin helpers.

Change-Id: I48729a33fada62a7c8e4fe500b1e39533d898701
Closes-Bug: #1383509

10 years agoUpdate volume-type's quota when extending volume
Haomai Wang [Mon, 29 Sep 2014 05:36:54 +0000 (13:36 +0800)]
Update volume-type's quota when extending volume

Now cinder only update total "gigabytes" quota but not update special
volume-type's "gigabytes" quota.

Fix bug #1375120

Change-Id: Ibb0b91afc81ba8c864f3c56fbe8a31972edd9bfc
Signed-off-by: Haomai Wang <haomai@unitedstack.com>
10 years agoMerge "Cinder api service doesn't handle SIGHUP properly"
Jenkins [Wed, 22 Oct 2014 05:12:09 +0000 (05:12 +0000)]
Merge "Cinder api service doesn't handle SIGHUP properly"

10 years agoCinder api service doesn't handle SIGHUP properly
Zhiteng Huang [Tue, 21 Oct 2014 09:05:50 +0000 (17:05 +0800)]
Cinder api service doesn't handle SIGHUP properly

When SIGHUP signal is sent to cinder-api service, it doesn't complete
processing of all pending requests before terminating all the
processes.

This change is a copy of Abhishek Kekane's fix for nova api.

Change-Id: I049d2aa2f3ad1fe388e00213a71f374803ed409a
Closes-Bug: #1334647

10 years agoMerge "Remove outdated _ as a builting from pylintrc"
Jenkins [Wed, 22 Oct 2014 00:28:21 +0000 (00:28 +0000)]
Merge "Remove outdated _ as a builting from pylintrc"

10 years agoMerge "VMware: Fix initialization of datastore selector"
Jenkins [Tue, 21 Oct 2014 19:54:25 +0000 (19:54 +0000)]
Merge "VMware: Fix initialization of datastore selector"

10 years agoMerge "ProphetStor driver consistency group support"
Jenkins [Tue, 21 Oct 2014 10:27:13 +0000 (10:27 +0000)]
Merge "ProphetStor driver consistency group support"

10 years agoRemove outdated _ as a builting from pylintrc
Duncan Thomas [Mon, 20 Oct 2014 13:37:11 +0000 (14:37 +0100)]
Remove outdated _ as a builting from pylintrc

Closes-bug: #1383302
Change-Id: I35e73fcabf39a01b667d570478227c960e1c450c

10 years agoMerge "Improve Cinder API internal cache interface"
Jenkins [Sun, 19 Oct 2014 06:28:53 +0000 (06:28 +0000)]
Merge "Improve Cinder API internal cache interface"

10 years agoMerge "Turn on Flake-8 Complexity Checking"
Jenkins [Sun, 19 Oct 2014 05:15:58 +0000 (05:15 +0000)]
Merge "Turn on Flake-8 Complexity Checking"

10 years agoProphetStor driver consistency group support
Rick Chen [Fri, 26 Sep 2014 07:25:08 +0000 (15:25 +0800)]
ProphetStor driver consistency group support

Implement ProphetStor driver support for the new consistency group
feature in Cinder Kilo.

Change-Id: Id2f7a93cabcf4f54215a035b3ad8d30ea5439297
Implements: blueprint prophetstor-consistency-group

10 years agoTurn on Flake-8 Complexity Checking
John Griffith [Fri, 17 Oct 2014 04:43:20 +0000 (22:43 -0600)]
Turn on Flake-8 Complexity Checking

Flake8 provides the ability to measure code complexity. There are
a lot of modules in Cinder that are considered "too complex", the
worst being "cinder/tests/test_huawei_hvs.py:110:1:" with a complexity
ranking of 59.

There's some outlyers at the higher end here, but the majority of the
code checks in at under 30, so let's make that our threshold and ignore
the two offenders that are above that for now.

Granted this may or may not be valuable, but it doesn't hurt to try it
and if we all hate it or find there's no value but it makes life difficult
we can always turn it back off.

See flake8.readthedocs for more info on flake8 and McCabe complexity
checking.

Change-Id: Icc1b5f2ccf0b630c1e655f5e6abf4e25ee30afc4

10 years agoMerge "Add client_socket_timeout option"
Jenkins [Fri, 17 Oct 2014 16:05:47 +0000 (16:05 +0000)]
Merge "Add client_socket_timeout option"

10 years agoMerge "Log a warning when getting lvs and vgs takes longer than 60 seconds"
Jenkins [Fri, 17 Oct 2014 15:57:52 +0000 (15:57 +0000)]
Merge "Log a warning when getting lvs and vgs takes longer than 60 seconds"

10 years agoMerge "Fix unnecessary snap of glance image, with non-raw images"
Jenkins [Fri, 17 Oct 2014 02:24:50 +0000 (02:24 +0000)]
Merge "Fix unnecessary snap of glance image, with non-raw images"

10 years agoLog a warning when getting lvs and vgs takes longer than 60 seconds
Matt Riedemann [Thu, 16 Oct 2014 15:39:07 +0000 (08:39 -0700)]
Log a warning when getting lvs and vgs takes longer than 60 seconds

We know something is causing lvs/vgs commands to block while deleting a
volume and this is causing Tempest to timeout while waiting for the
volume to be deleted.  What we don't have right now is very good
(specific) logging when this happens, unless we get messages in syslog
for lvm tasks taking more than 120 seconds, but that doesn't always
happen when we see the volume delete timeout in Tempest.

This patch adds a check for when getting logical volumes and volume
groups takes longer than 60 seconds and logs a warning if that happens.
This is helpful in production also because the default interval for
periodic tasks is 60 seconds so having these take longer than that time
could cause periodic tasks to block up on each other and you'll get
warnings from the FixedIntervalLoopingCall in oslo which is controlling
the task runs.

Related-Bug: #1373513

Change-Id: I7ac5ddbbd9bda7744db33f0bb8d56879301f5538

10 years agoMerge "Multipath commands with error messages in stdout fail to parse"
Jenkins [Thu, 16 Oct 2014 19:53:06 +0000 (19:53 +0000)]
Merge "Multipath commands with error messages in stdout fail to parse"

10 years agoMerge "Fix display name change during backup restore"
Jenkins [Thu, 16 Oct 2014 10:08:52 +0000 (10:08 +0000)]
Merge "Fix display name change during backup restore"

10 years agoAdd client_socket_timeout option
Stuart McLaren [Fri, 5 Sep 2014 12:48:04 +0000 (12:48 +0000)]
Add client_socket_timeout option

Add a parameter to take advantage of the new(ish) eventlet socket timeout
behaviour.  Allows closing idle client connections after a period of
time, eg:

$ time nc localhost 8776
real    1m0.063s

Setting 'client_socket_timeout = 0' means do not timeout.

DocImpact

Change-Id: If492810a2f10fa5954f8c8bb708b14be0b77fb90
Closes-bug: #1371022

10 years agoMerge "Updated from global requirements"
Jenkins [Thu, 16 Oct 2014 05:56:27 +0000 (05:56 +0000)]
Merge "Updated from global requirements"

10 years agoMerge "IBM Storwize driver: Add local variable assignment to "ctxt""
Jenkins [Thu, 16 Oct 2014 05:56:19 +0000 (05:56 +0000)]
Merge "IBM Storwize driver: Add local variable assignment to "ctxt""

10 years agoMerge "Correct the message string"
Jenkins [Thu, 16 Oct 2014 05:55:25 +0000 (05:55 +0000)]
Merge "Correct the message string"

10 years agoMerge "NetApp fix to set non default server port in api"
Jenkins [Thu, 16 Oct 2014 05:55:16 +0000 (05:55 +0000)]
Merge "NetApp fix to set non default server port in api"