35 Commits

Author SHA1 Message Date
Jenkins
fdc1158562 Merge "Add gateway in network_info and share network API" 2016-07-01 04:04:51 +00:00
Jenkins
1e24c27317 Merge "Manage / unmanage snapshot in NetApp cDOT drivers" 2016-07-01 01:40:17 +00:00
Clinton Knight
4bac8b64e0 Manage / unmanage snapshot in NetApp cDOT drivers
With snapshot manage / unmanage in Manila core, we can
support that in the NetApp single-SVM driver.

Implements: blueprint netapp-cdot-snapshot-manage-unmanage
Change-Id: I7c6c005fb3fd8613da9e9ac04b9dd832781e35ca
2016-06-30 16:25:14 +00:00
Jay Xu
d98222a654 Add gateway in network_info and share network API
Get gateway information from network plugin and put it into network_info.
It is required by EMC Unity storage to create a interface.

APIImpact
DocImpact

Change-Id: I8614b8686af7fa5764b49e8e3cb4a4855dc3a5f4
Implements: blueprint add-gateway-info
2016-06-30 12:08:12 -04:00
Marc Koderer
33ebd2742c Change user_id and project_id to 255 length
In case keystone is used with LDAP the user_id/project_id can be more
than 60 characters. This will cause the issue that users cannot create
any share-network or security_service.

Change-Id: I2e2ccce32bf31850c9ffd74d9612cf5237d782fe
Closes-bug: #1594824
2016-06-22 16:00:06 +02:00
Jenkins
62e01f076a Merge "Add user_id and project_id to snapshot APIs" 2016-06-20 13:26:40 +00:00
Jenkins
58970a603c Merge "Huawei: Add manage share snapshot in Huawei driver" 2016-06-17 13:33:23 +00:00
Goutham Pacha Ravi
eb784f1807 Add user_id and project_id to snapshot APIs
In a cloud with multi-tenancy, administrators
would like to see the project_id of the tenant
while listing snapshots of all tenants.

Likewise, we also should expose the user_id field
as it would help in cases where tenants have multiple
users.

DocImpact
User and administrator references need to capture
this information.

APIImpact
API changes are micro-versioned.

Change-Id: I3ad655dc9ab7440f205b0e153fccaa99abb79bbd
Closes-Bug: #1587161
2016-06-16 18:38:15 -04:00
Jenkins
4c85f6a99c Merge "Delete VLAN on delete_vserver in Netapp cmode" 2016-06-13 15:35:57 +00:00
liucheng
d1303438e9 Huawei: Add manage share snapshot in Huawei driver
Manage share snapshot on the array,
before managing the snapshot, make sure that the
source share is managed by OpenStack.

Implements: blueprint huawei-driver-manage-snapshot
Change-Id: I085106dccec5d371771fa112898e980bae182d11
2016-06-12 01:07:19 +00:00
Tom Patzig
a1f33c9e8f Delete VLAN on delete_vserver in Netapp cmode
Currently when DHSS=true with a Netapp cmode backend
during vserver creation, lifs and VLANs get created.
But on cleanup everything gets removed except the VLANs.
This patch removes the vlans at the end of vserver deletion.
Netapp prevents deleting VLANs with existing lifs on it.

Change-Id: Id0b56bbce8e5e9b8707f22d401d99c7867372a50
Closes-Bug: #1580163
2016-06-10 17:10:43 +02:00
Ramana Raja
05dcc06dde cephfs_native: Fix client eviction
During deny access, the driver evicts client based on its auth ID
and the share its accessing. It does not make the correct use of
ceph_volume_client library to do this. So fix the evict method call.

Closes-Bug: #1567298

Change-Id: I707d1f2d455106f45c35aa28ca2a30fb0460f9e8
2016-06-09 13:16:10 -04:00
Jenkins
94bf149b43 Merge "HPE3PAR driver doesn't decrease fstore capacity" 2016-06-04 01:58:46 +00:00
Jenkins
18640f689c Merge "Fix badly formatted release note" 2016-06-02 13:17:20 +00:00
stack
e603ef064e HPE3PAR driver doesn't decrease fstore capacity
1.This patch reduces the fsquota when a share is deleted
for shared fstores.

Change-Id: Ib20646696e6ee6c7c216530697c35a54eabede43
Closes-Bug:#1582931
2016-06-01 23:24:19 -07:00
Jenkins
6eb8844d97 Merge "Fix HDS HNAS errors caused by incorrect IDs" 2016-06-01 20:39:50 +00:00
Goutham Pacha Ravi
33f4e3d06a Fix badly formatted release note
TrivialFix

Change-Id: I4e8903124ff2ea932cd0d2d7937b8a78b3722a72
2016-06-01 14:24:21 -04:00
Rodrigo Barbieri
081fc4860b Fix HDS HNAS errors caused by incorrect IDs
When attempting to allow_access on a managed share, it fails
because the proper share ID is not retrieved from private storage
prior to attempting to validate that the share exists in the
backend. The same happens when trying to create a share from a
snapshot created from a managed share, the proper share ID is
not retrieved from private storage. While we are dealing with
two possible different IDs it is important to properly display
the API share ID in log messages so it can be matched to the
share instances ID, and not all log messages are accurately doing
so.

This change addresses this by retrieving the ID from
private storage first for update_access and
create_share_from_snapshot operations. The proper unit test changes
included in this patch required a refactor of several IDs to ensure
this problem is addressed in unit tests, thus it made sense to
address several bugs caused by the same problem, having the same fix
and requiring modifications to the same lines of code.

Closes-bug: #1581541
Closes-bug: #1584179
Closes-bug: #1583785
Change-Id: I8cdb1a8a72a4ac7e710f57e3c288d48cd2adf0dd
2016-05-30 15:27:45 -03:00
zhongjun
548975ee2d Huawei: Fix exception in update_access not found
When share is deleted in the backend, user is unable to delete
share because of error thrown in update_access(). Make backend raise
ShareResourceNotFound exception in case share not found during
"update_access" operation, because share manager expects it for
proper handling of share deletion, thus allowing share to be
deleted in this case, without having to use force-delete.

After add ShareResourceNotFound exception, it will need a parameter
named share id(share['id']), so add share id to share info in
create_share_from_snapshot function.

Change-Id: I9756ff882e6960b07f5f0abac94057c687830ad0
Closes-Bug: #1585035
2016-05-26 09:19:09 +08:00
Jenkins
b771466cba Merge "Fix share server info in CGs created from CGs" 2016-05-12 16:19:30 +00:00
Jenkins
27b2974cb4 Merge "Delete Snapshot: status wrongly set when busy" 2016-05-12 11:50:51 +00:00
Jenkins
fc518706c0 Merge "Remove deprecated manila RequestBodySizeLimiter" 2016-05-11 17:00:44 +00:00
Jenkins
14a5581748 Merge "Add user_id echo in manila show/create/manage API" 2016-05-11 16:32:14 +00:00
zhongjun
4334a067f0 Add user_id echo in manila show/create/manage API
Add "user_id" detail when we run command
"manila show/create/manage ...". Make the operator know
which user created this share.

APIImpact

Closes-Bug: #1562846
Change-Id: I2858c7f63182288f354b96448f0970d3642d4bf7
2016-05-11 09:16:21 +08:00
Tom Barron
e03d3d2ebe Remove deprecated manila RequestBodySizeLimiter
In kilo, the manila  functionality for limiting request body size was
was moved to oslo.middleware library [1] and compatibility shims and
deprecation log messages were added for the manila
RequestBodySizeLimiter, whose function had been superceded by the
equivalent oslo library object.

It has now been more than two releases since the deprecation so
this commit removes the compatibility shims and log messages.

[1] I10c3cbeb9d43b504f14375df4dac87b323fab5bf

Change-Id: I01cc6585c15af9b13b178e26d4b469825dbd562c
2016-05-09 17:09:18 -04:00
Goutham Pacha Ravi
118d440a90 Fix share server info in CGs created from CGs
Currently when a POST request is made to /consistency-groups
with a source cg-snapshot, the API does not register the share
network information (share_server_id and share_network_id) in
the database row newly created for the CG being created.

This information is essential to any shares that are being created
along with the consistency group.

- Disallow providing a share_network_id when using a source cg_snapshot_id
- Copy share network information from the parent CG
- Fix the share_server_id that was incorrect in the API response

 APIImpact

 Closes-Bug: #1571594
 Closes-Bug: #1572742

Change-Id: I1c3581c81e0b845f46eef3cd0acddb55850447a5
2016-05-09 16:58:44 +00:00
nidhimittalhada
69eaebc774 Delete Snapshot: status wrongly set when busy
This fix sets the snapshot status correctly to 'error_deleting',
when snapshot reported to be busy by backend driver.

Change-Id: Iecfd32b8265ce9f7cdfcba6d89397f269024b75d
Closes-Bug: #1564623
2016-05-09 11:51:49 +05:30
Rodrigo Barbieri
0d6de50888 Fix HNAS error with unconfined filesystems
Unconfined filesystems created through CLI in HNAS caused driver's
parser to break. It was found that the command breaking could be
replaced by another, already used command, which also retrieves
filesystem information, and it is preferred, so previous command
has been replaced.

Additionally, administrator may not want to automatically mount
an unmounted filesystem in DHSS=False mode, which may be unmounted
for maintenance, so changed behavior to not mount automatically.

Change-Id: I69e7a51ed4485783868c44e58b93bc69b58c8ac2
Closes-bug: #1571000
2016-05-06 09:00:33 -03:00
yogesh
53364e07a3 Handle manage/unmanage for replicated shares
Managing a share with a share type that has replication_type
extra_spec must be allowed. Drivers are expected to fail
this operation if the share was part of a replication relationship
that Manila does not know about.

Unmanaging a share with replicas must not be permitted
until all replicas are removed.

Managing and unmanaging of snapshots must not
be permitted for a share that has replicas.

Modify the NetApp driver for manage_existing to check
for existing replicas.

Also fix issue with manage retry where the share
data was being altered inappropriately by a DB API.

Closes-Bug: #1561641
Closes-Bug: #1565903

Co-Authored-By: Goutham Pacha Ravi <gouthamr@netapp.com>

Change-Id: I82f1fef1e30114e017efd00fa7da70aceecab94c
2016-04-15 19:00:23 +00:00
Goutham Pacha Ravi
35648819aa Fix force-delete on snapshot resource
When using snapshot-delete API, if the share driver
logs an exception, the status of the snapshot is set
to 'error_deleting'. If an administrator wants to remove
this snapshot, he/she would expect to use the
snapshot-force-delete API. However, if the share
driver still cannot delete the resource, it will remain
in 'error_deleting' state; leaving the administrator
with no choice but to resort to making changes to
the snapshot record in Manila's database.

Propagate the force flag to the share manager and log
driver exceptions, while ignoring them to obliterate
the snapshot on Manila's database if the delete
operation is forced.

Also fix data being sent in create/delete snapshot
driver interfaces and refactor corresponding unit tests.

Change-Id: Ic2494e1f9eb9104f96ef3a50f12d0f304735ee4f
Closes-Bug: #1560119
2016-04-01 18:33:26 +00:00
Abhilash Divakaran
a8c5b41ab4 Add share driver for Tegile IntelliFlash Arrays
The Tegile driver will support the NAS shares and it will
include the minimum set of features.
[Supported Protocols]
 - CIFS, NFS
The driver supports Manila driver mode
(driver_handles_share_servers = False).

Tegile has setup a CI. It will report as "Tegile Storage CI".

DocImpact
Implements: blueprint tegile-share-driver
Change-Id: I2e9154454e2a34f9a0653a173846ce554026f33b
2016-03-03 01:13:54 -08:00
Xing Yang
c91f27f4e1 Manage and unmanage snapshot
Add APIs to support manage and unmanage share snapshots.
Also add support in the Generic driver.
This only supports for DHSS=False driver mode.

Add provider_location column to the share_snapshots table
to save data used to identify the snapshot on the backend.

Also need to bump microversion.

APIImpact
DocImpact
Change-Id: I87a066173c85d969607d132accd9f0e9bd49c235
Implements: blueprint manage-unmanage-snapshot
2016-02-18 04:09:05 -05:00
Goutham Pacha Ravi
f858e537dd Share Replication API and Scheduler Support
This patch provides the scheduler support to filter share
backends matching replication capabilities reported by the
hosts and the replication_type extra_spec provided via the
share_type during share creation.

It also adds wsgi routes, API endpoints and driver entry
routines to support the actions: list, show, create, delete
and promote share replicas. It augments the ShareInstance
DB model with a 'replica_state' attribute and the Share DB
Model with 'replication_type' attribute to support these
workflows.

Replica states are periodically updated from the respective
backends that the replicas are created on.

APIImpact
Impact on existing APIs:
In Microversion 2.11, the /shares APIs return 2 additional
fields during index and show calls for each share: 'has_replicas'
and 'replication_type'. Similarly, the field 'replica_state' is
added to the API response for /share-instances.
Also, deletion of a share that has replicas is forbidden,
returning error code 403.

DocImpact

Co-Authored-By: Alex Meade <mr.alex.meade@gmail.com>

Implements: blueprint manila-share-replication

Change-Id: I10515d55b1291c34777a31d8c6a3a1954f551235
2016-02-11 19:45:37 +00:00
Valeriy Ponomaryov
dcbdcf3534 Implement export location metadata feature
Some upcoming features require more than one export location and
possibility to mark them with specific labels like fast/slow or
rw/ro.

So, implement 'export locations metadata' feature:
- It allows to set any key-value pairs for each export location.
- These key-value pairs can be set only by share manager using
  response from various share driver methods.
- Example of update is implemented using Generic driver
  "create_instance" method.
- Metadata can be updated for any export location in any place
  of share manager where db function "share_export_locations_update"
  is called.
- Keys from export location metadata table will be added to 'share' and
  'share instances' views as export location attributes.

Also:
- Add new attr 'is_admin_only' for existing export locations model.
  If set to True, then only admins will be able to see them. Unless
  policy is changed.
- Add APIs for reading export locations by share and share instance IDs.
- Remove 'export_location' and 'export_locations' attrs
  from 'share' and 'share instance' views.
- Bump microversion as new APIs implemented.

APIImpact

Implements bp export-location-metadata

Change-Id: I36d1aa8d9302e097ffb08d239cf7a81101d2c1cb
2016-01-15 12:29:12 +02:00
Thomas Bechtold
1dac1ac49e Add reno for release notes management
See mailing list announcement:

http://lists.openstack.org/pipermail/openstack-dev/\
        2015-November/078301.html

Change-Id: Iac50ba371fcf6cb890bddbef30d846304056f317
2015-11-26 07:16:03 +01:00