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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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