Tom Barron [Sun, 21 Feb 2016 12:00:54 +0000 (07:00 -0500)]
Trim 50s from huawei ISCSIDriver unit tests
The HuaweiISCSIDriver unit tests take almost a minute to run
on my machine because several negative test cases wait for
timeouts.
This commit leverages the utility method introduced in [1]
as well as the ZeroIntervalLoopingCall for mocks in the Huawei
unit tests to reduce total execution time for this set of
tests from about a minute to under 10s
Matt Riedemann [Mon, 29 Feb 2016 17:31:22 +0000 (12:31 -0500)]
Copy StandardLogging fixture from Nova
This code was originally written for Nova by Joe Gordon
<joe.gordon0@gmail.com> and Sean Dague <sean@dague.net>.
This enables debug logging that is exercised by unit test
runs to be handled and detect formatting errors. The debug
logging does not actually go to the console unless the
OS_DEBUG environment variable is set.
As a result, a few formatting errors are detected and
cleaned up with this change.
This also fixes a problem where debug logging from stevedore
is dumped to the console every time an extension is loaded,
which in a gate-cinder-python27 job is 65K+ times.
John Griffith [Fri, 26 Feb 2016 01:09:21 +0000 (01:09 +0000)]
Add ability to failback for replication V2.1
Initially we had setup replication V2.1 (Cheesecake) to NOT
do fail-back at least in the initial version.
It turns out that fail-back in the Cinder code is rather easy,
we just enable calling failover-host on a host that's already
failed-over and use the *special* keyword of "default" as the
backend_id argument which signifies we want to switch back to
whatever is configured as the default in the cinder.conf file.
To do this we just add some logic that checks the secondary_backend_id
param in volume.manager:failover_host and set service fields
appropriately. Note that we're sending the call to the driver
first and giving it a chance to raise an exception if it can't
satisfy the request at the current time.
We also needed to modify the volume.api:failover_host to allow
failed-over as a valid transition state, and again update the
Service query to include disabled services.
It's up to drivers to figure out if they want to require some
extra admin steps and document exactly how this works. It's also
possible that during an initial failover that you might want to
return a status update for all volumes NOT replicated and mark
their volume-status to "error".
Expected behavior is depicted in the service output here:
http://paste.openstack.org/show/488294/
Jacob Gregor [Wed, 24 Feb 2016 17:06:32 +0000 (11:06 -0600)]
Storwize SVC multiple management IPs
Right now Storwize SVC does not support multiple management IPs.
This patch adds this feature so that if the primary IP fails, it
will switch to the secondary IP that the user sets.
Xiaoqin Li [Thu, 25 Feb 2016 08:36:11 +0000 (00:36 -0800)]
IBM Storwize with pool-aware-cinder-scheduler
Storwize cinder driver only supports config one pool
within one backend right now. This change adds support
for multi-pools aware for scheduler.
storwize_svc_volpool_name accepts a list of pools
separated by comma in cinder.conf now.
User-Visible Change
-------------------
DocImpact
The configuration flag storwize_svc_volpool_name
should be updated to a ListOpt.
Implements: bp Storwize-pool-aware-support
Change-Id: If6f1decf4d6244b1e04b05b8662d891fb16c6790
Angela Smith [Wed, 24 Feb 2016 19:18:42 +0000 (11:18 -0800)]
Fix HTTP sessions left open in Brocade zone driver
Add missing call to logout html page on FC switch to close the HTTP
session on the FC switch in HTTP connector. Also, move the session
cleanup calls in the zone driver so that it is invoked for all code
paths.
Michał Dulko [Mon, 29 Feb 2016 13:25:54 +0000 (14:25 +0100)]
Clean up replication v2.1 (Cheesecake) RPC API
We've merged replication v2.1 (Cheesecake) code with two little issues
in RPC API layer:
* volume.rcpapi have list_replication_targets method, which is unused
and not handled by volume.manager.
* There are no tests for new methods in test_volume_rpcapi module.
Andreas Jaeger [Fri, 26 Feb 2016 18:44:07 +0000 (19:44 +0100)]
always use pip constraints
This flips the tox.ini to always use constraints installation for
all targets. It drops the extra -constraints targets in the process.
This makes it so there is no developer change required to operate in our
new world order.
Michał Dulko [Tue, 16 Feb 2016 14:16:02 +0000 (15:16 +0100)]
Remove unused columns from Service ORM model
rpc_available_version and object_available_version columns were part of
previous design of our RPC API compatibility layer. We've decided to go
in a little different direction so these two are currently unused.
With our live-schema-upgrades guidelines (related to rolling upgrades
support) it's a lot easier to readd something to the DB than to drop it.
Let's take the chance to actually drop these unused DB columns in early
Newton. To do that we need to remove them from the SQLAlchemy model in
Mitaka and this commit does so.
Chuck Fouts [Sat, 27 Feb 2016 18:46:59 +0000 (13:46 -0500)]
NetApp: Fix SSH Client File Creation in Unit Test
A bug was introduced where ssh_known_hosts file is created when the unit
tests in test_netapp.py are run. This patch adds mocks to the ssh init
calls to prevent this file creation.
Tom Barron [Sat, 27 Feb 2016 10:20:18 +0000 (05:20 -0500)]
Trim 12s from disco unit tests
The unit tests under cinder/tests/unit/volume/drivers/disco
contain three "timeout" tests, each of which runs more than 4s
while waiting for timeouts to expire.
This commit mocks time.time() in those tests using a utility
method that ensures an immediate timeout.
Helen Walsh [Mon, 16 Nov 2015 20:31:53 +0000 (20:31 +0000)]
EMC VMAX - get iscsi ip from port in existing MV
This patch fixes bug in getting the iscsi ip address from
an existing masking view. In this scenario we must query
the port(s) in the portgroup belonging to the masking view
and not the random port group from the xml file.
Evgeny Antyshev [Sat, 27 Feb 2016 12:14:37 +0000 (12:14 +0000)]
Misprint in policy.json
Erroneous space in "rule: admin_api" was introduced in change Ibbd6f47c370d8f10c08cba358574b55e3059dcd1
oslo_policy regards space as a separator,
and fails to parse this rule: http://paste.openstack.org/show/488452/
Ryan McNair [Tue, 16 Feb 2016 17:12:53 +0000 (17:12 +0000)]
Re-enable -1 child limits for nested quotas
Add back support for -1 limits of child projects. The way that we
support the -1 child limits requires the following changes:
* Continue quota validation up the hierarchy if the current limit is
-1 until we hit a hard limit or no more parents, and update the
any relevant parents' allocated value along the way
* When updating limits, special care needs to be taken when updating
child limit to be -1, or when changing from a -1 limit
* Enable support for creating reservations for "allocated" values
to support the scenario that:
- a volume is created on a project with a limit of -1
- the parent's allocated value has been updated appropriately
- the volume create fails and the child's in_use quota rolls back
- now we must also rollback the parent's allocated value
NOTE: There is a race condition between validation the NestedQuotas
and when the driver may be switched into use, and if -1 quotas are used
the validation could be out of date. Will look into better support for
switching on of NestedQuotas on live deployment with -1 limits, which
would likely leverage the "allocated" reservation system.
Wilson Liu [Thu, 25 Feb 2016 03:27:19 +0000 (11:27 +0800)]
Huawei: delete_snapshot need not return any value
Currently delete_snapshot return True or False to indicate
whether the snapshot is really deleted on the array. This
is useless and just write for unit tests. Now we will remove
the return value and add another unit test for delete_snapshot.
Wilson Liu [Mon, 22 Feb 2016 08:09:33 +0000 (16:09 +0800)]
Huawei: Consider bandwidth when selecting port
Currently we count the weight of each FC port when
selecting port for zoning, but if all the weights
are equal, for example, at the very beginning when
all ports' weight are zero, we should select the
ports which have the bigger bandwidth.
Wilson Liu [Sat, 23 Jan 2016 02:58:46 +0000 (10:58 +0800)]
Add description when rename LUN in Huawei driver
Sometimes when we rename a LUN on the array, we should
add some description to record some information like
volume id on cinder side. This patch will enable this.
Wilson Liu [Mon, 22 Feb 2016 02:50:12 +0000 (10:50 +0800)]
Huawei: Code cleanup
Some codes are useless, we need to clean them up:
1. add_host_with_check have been called at line 1653
to get host_id in huawei_driver.py, the another
two are no longer need.
2. Remove duplicated codes in test_huawei_drivers.py,
also change FACK_XXX to FAKE_XXX.
3. Two constants in constants.py are not used anywhere,
need to delete them.
Helen Walsh [Wed, 18 Nov 2015 15:40:11 +0000 (15:40 +0000)]
EMC VMAX - Changing PercentSynced to CopyState in isSynched
In SE 8.x PercentSynced no longer works for VMAX3 as a criteria to
determine whether a device is synched or not. Luckily 'CopyState'
works for both VMAX2 and VMAX3 and is backward compatible with 7.6.x.
John Griffith [Wed, 3 Feb 2016 16:11:58 +0000 (16:11 +0000)]
Replication v2.1 (Cheesecake)
This focuses the replication work on a specific use case,
and eliminates some of the ambiguity in earlier versions.
Additionally this implementation addresses needs for
devices that do replication based on the whole backend-device
or on Pools.
Use case:
DR scenario, where a storage device is rendered inoperable.
This implementation allows the preservation of user data
for those volumes that are of type replication-enabled.
The goal is NOT to make failures completely transparent
but instead to preserve data access while an Admin tries
to rebuild/recover his/her cloud.
It's very important to note that we're no longer interested in
dealing with replication in Cinder at a Volume level. The concept
of have "some" volumes failover, and "others" left behind, proved
to not only be overly complex and difficult to implement, but we
never identified a concrete use-case where one would use failover
in a scenario where some volumes would stay and be accessible on
a primary but other may be moved and accessed via a secondary.
In this model, it's host/backend based. So when you failover,
you're failing over an entire backend. We heavily leverage
existing resources, specifically services, and capabilities.
Michael Price [Fri, 8 Jan 2016 17:04:35 +0000 (11:04 -0600)]
NetApp: Add Consistency Group support for E-Series
Add Consistency Group support to the E-Series driver. This
implementation utilizes the native Consistency Group feature
available on the E-Series backend to support Cinder
Consistency Groups.
CGs and standalone snapshots both utilize snapshot groups.
There is a limit of 3 snapshot groups per volume, so the number
of standalone snapshots will be limited by the number of
consistency groups that are created, and likewise the reverse.
Each CG/Snapshot Group will support up to 32 snapshots, so each
CG that a volume is a part of will reduce the number of available
standalone snapshots that can be created by 32 (from a maximum
of 96).
mannuray [Fri, 26 Feb 2016 14:11:20 +0000 (19:41 +0530)]
Return BadRequest for invalid Unicode names
If the database fails to insert values due to them
containing Unicode that the database can't support (or other
similar errors that fall under DBDataError), return an
HTTP 400 Bad Request rather than HTTP 500.
this patch give fix for
1. backup-create Creates a volume backup.
2. cgsnapshot-create Creates a cgsnapshot.
3. consisgroup-create Creates a consistency group.
4. encryption-type-create Creates encryption-type
5. qos-create Creates a qos specs.
6. snapshot-create Creates a snapshot.
7. type-create Creates a volume type.
8. update/edit of entities mentioned in step1-7 update/edit name.
( is already taken care)
this patch also fix volume create as is taken care by
Victor Stinner [Wed, 24 Feb 2016 17:34:43 +0000 (18:34 +0100)]
Enable all unit tests on Python 3.4
* Remove tests-py3.txt: all unit tests now pass on Python 3
* tox.ini: remove specific command for py34 test environment, it now
inherits testenv commands (same command than Python 2.7)
Michał Dulko [Fri, 26 Feb 2016 09:27:07 +0000 (10:27 +0100)]
Adding general notes about rolling upgrades
There are some known problems that may happen during rolling (live)
upgrade. Even though feature is considered a tech-preview there's no
harm in communicating them in the release notes.
This commits adds also a note on the fact that now Cinder services
detect lowest RPC version and that it is needed to keep the `services`
table up to date.
Michał Dulko [Fri, 26 Feb 2016 08:29:24 +0000 (09:29 +0100)]
Move deprecation release notes to correct section
During the cycle reno was updated to include "deprecations" section. We
should use this one instead of "upgrades" to add release notes about
deprecations of features or config options.
This commit moves deprecation relase notes added during the cycle to
this section.
Yucong Feng [Fri, 19 Feb 2016 21:25:19 +0000 (22:25 +0100)]
Return all target_wwpns for FC storwize
Storwize FC terminate_connection was using 'lsfabric' to lookup
target_wwpns, active on the fabric, to be used to terminate
the connection. However during a delete of a NPIV VM, the target_wwpns
is no longer active, it is not logged onto the fabric. The target list
will return empty. Fix is to return all the available wwpns
from 'storage_nodes'.