Michal Jura [Mon, 7 Mar 2016 10:29:32 +0000 (11:29 +0100)]
Fix failure with rbd on slow ceph clusters
Make rados connection interval and retries configurable
for _try_remove_volume() function
Otherwise on slow ceph clusters, we can get following problem:
"ImageBusy error raised while deleting rbd volume. This may have been
caused by a connection from a client that has crashed and, if so,
may be resolved by retrying the delete after 30 seconds has elapsed."
Javeme [Wed, 18 Nov 2015 08:26:08 +0000 (16:26 +0800)]
Remove those unnecessary statements "return True"
The reasons to remove them:
* These asynchronous API is not necessary to return a value.
* We do not see the purpose of the statements, because it always
returns true regardless of success or failure.
These statements are unnecessary and misleading, this commit we will
remove these "return True" (Or just remove "True" if it's not at the
end of a function, in order not to change the execution path).
stack [Fri, 4 Mar 2016 09:13:06 +0000 (04:13 -0500)]
Fixes creating volume issue for multiple management IPs
Currently there is an issue with the multiple management IPs in
Storwize SVC where volume creation would fail when
storwize_san_sencondory_ip switch to san_ip.
This patch adds a condition to check the sshpool.ip, if the
sshpool.ip equals to storwize_san_sencondory_ip, switch it back
to san_ip.
wanghao [Tue, 8 Mar 2016 05:57:15 +0000 (13:57 +0800)]
Add volumes table definition when migrating to 67
When migrating DB to 67 readd_iscsi_targets_table,
we will add foreign key "volumes.id", but we miss
to define the volumes table, that will cause the
migrating process fail: 'NoReferencedTableError'.
Fix this issue by adding volume table definition
before creating iscsi_targets table. test is
added as well.
Tom Barron [Mon, 7 Mar 2016 20:05:21 +0000 (15:05 -0500)]
Trim 5s+ from storwize unit tests
The test test_run_ssh_fail_to_secondary_ip test case in the StorWize
Driver does a greenthread.sleep(random.randint()) inside a retry loop.
Its execution time often approaches 5s.
This commit mocks random.randint() in this test so that the
greenthread.sleep() duration is always zero, reducing execution time for
the test to under half a second.
The various test_storwize_consistency_group* tests trigger
FixedIntervalLoopingCalls. Mocking them with ZeroIntervalLoopingCalls
reduces their total execution time from about 8s to under 3s.
We also fix the fake user and project ids in this file so that
it no longer emits FutureWarnings from oslo.versionedobjects about
invalid uuids as documented here [1].
scottda [Fri, 4 Mar 2016 13:45:25 +0000 (06:45 -0700)]
microversion header for legacy endpoints removed
With the current implementation, a microversion header will be returned
even if /v1 or /v2 API endpoints are used.
This is wrong, and constitutes an API change. Remove this header for
legacy endpoints /v1 and /v2.
Ryan McNair [Tue, 1 Mar 2016 18:54:37 +0000 (18:54 +0000)]
Update quotas to handle domain acting as project
The Keystone change Ib22a0f3007cb7ef6b4df6f48da5f4d018e905f55 sets
the domain_id as the top-level parent project. However, since a
domain is not a project and therefore has no effect on quota nesting,
the domain "parent" should not be considered in the nested quota code.
This patch updates the quota code to ignore the domain_id if it's
present in the parent tree.
note: Servers must be prepared to deal with multiple
OpenStack-API-Version headers. This could happen when a client
designed to address multiple services always sends the headers it
thinks it needs. Most Python frameworks will handle this by setting
the value of the header to the values of all matching headers,
joined by a ',' (comma). For example ``compute 2.11,identity
2.114``.
Gorka Eguileor [Thu, 3 Mar 2016 13:37:29 +0000 (14:37 +0100)]
Readd iscsi_target table
Rolling upgrades was broken when iscsi_target table was dropped on
https://review.openstack.org/268320
We cannot stop using a table and drop it in the same release for rolling
upgrades to work, we have to stop using it in one release and then drop
it in the next or in the post rolling upgrade mechanism (which is still
not in place).
So this patch fixes this by removing the dropping and adding another
migration that ensure that the table is really there. That way we can
be sure that anyone using M will have the table, which then will get
dropped in N.
Patrick East [Fri, 4 Mar 2016 05:47:22 +0000 (21:47 -0800)]
Fix issue with Pure drivers delete_snapshot exception handling
We were checking for only a single possible error that can occur when
the snapshot was missing. We now check for both which helps prevent
any snapshots or volumes deleted out from underneath Cinder to get
things stuck in an error state.
This also adjusts the warning message to be a little more descriptive.
Patrick East [Fri, 4 Mar 2016 00:15:49 +0000 (16:15 -0800)]
Add backend id to Pure Volume Driver trace logs
With multi-backend deployments it was very hard to follow which backend
was making which calls. When there was an error it was often unhelpful
to look at the tracing to know which backend had the problem.
This will now print out the active backend id with the tracing log
messages.
Kurt Martin [Wed, 2 Mar 2016 22:57:06 +0000 (14:57 -0800)]
Don't fail on clearing 3PAR object volume key
The 3PARs drivers write a key value pair on the 3PAR backend volumes
to track the instance that the volume is exported to. However, in
certain cases the key is not present and we would throw an
exception and not allow the detach to continue. If the key is not
present then we do not need to clear it. This patch will just
log a warning that it wasn't present and continue with the detaching
the volume.
Ryan McNair [Wed, 2 Mar 2016 00:07:14 +0000 (00:07 +0000)]
Update quota_utils with import for keystone_auth
Currently, keystone_auth config group is only getting defined in
the cinder-api service. In order to be able to use the quota_utils
helper from both the c-api and c-vol, we need to make sure that
the CONF.keystone_authtoken always gets imported. This is needed
to properly handle nested quota deletes which occur in the c-vol
service.
Tom Barron [Wed, 2 Mar 2016 17:29:47 +0000 (12:29 -0500)]
Fix invalid uuid warnings in test_volume.py
Currently 'tox -epy27 -- -n cinder.tests.unit.test_volume'
emits 36 FutureWarnings from oslo.versionedobjects about invalid
uuids as documented here [1].
This commit changes this module to use valid uuids so that when its
tests are run these warnings are no longer emitted.
apoorvad [Wed, 23 Dec 2015 23:07:30 +0000 (15:07 -0800)]
Tintri image direct clone
Fix for the bug 1400966 prevents user from specifying image nfs
share location as location value for an image.
This broke Tintri's image direct clone feature.
This addresses the issue by using provider_location of image
metadata to specify image nfs share location.
John Griffith [Wed, 2 Mar 2016 04:03:33 +0000 (04:03 +0000)]
Use get_by_args instead of host_and_topic
The replication v2.1 code (cheesecake) requires a number
of service queries. The default by_host_and_topic however
doesn't include an interface to get disabled services which
is required at times.
Rather than adding a new version of get_by_host_and_topic and
introduce the arg, we probably shouldn't have been using this
particular query at all. The only service we're interested in
is the cinder-volume service, granted in most cases volume_topic
is set to this as a default but we shouldn't be relying on it.
This patch changes the get_by_host_and_topic to use the more
appropriate (in this case) get_by_args and specifically requests
the cinder-volume binary.
Note that for manage_existing, we check the resturned service and
ensure that it disabled == False, otherwise we raise an exception.
When multipath is enabled, and the 3PAR driver is configured
to export a VLUN over N iSCSI IP(ports), we now use the same
LUN ID for each iSCSI IP export. Previously, when we would
export a volume over N iSCSI ports, we would get a new LUN ID
for each iSCSI port.
Gorka Eguileor [Thu, 3 Mar 2016 13:00:34 +0000 (14:00 +0100)]
Fix oslo.service config generation
Cinder generation configuration sample does not contain any of
oslo.service configuration options.
This is because we are not using the right namespace when calling
oslo-config-generator since oslo.service is not a valid entrypoint as
mentioned in the documentation:
Wilson Liu [Tue, 23 Feb 2016 08:35:31 +0000 (16:35 +0800)]
Huawei: Check the real size before extend volume
Currently we not check the real size before we do the
extend on array. But in fact, users may change the
LUN size directly on the backend, not throuth Cinder
api, although the LUN is created from Cinder side.
wangxiyuan [Thu, 3 Mar 2016 03:37:25 +0000 (11:37 +0800)]
Make query to quota usage table order preserved
Currently, the query to quota usage table is not order
preserved. This might cause deadlock in large-scale
deployment: different calls may lock rows in different
order, and deadlock will happen.
This patch adds order_by to the query and make the query
to the table order preserved.