Commit Graph

23 Commits

Author SHA1 Message Date
haixin a73b299374 Remove usage of six lib for third party/vendors drivers.
Python2 is no longer supported, so in this patch
set we remove the usage of the six (py2 and py3
compatibility library) in favor of py3 syntax.

Change-Id: I3ddfad568a1b578bee23a6d1a96de9551e336bb4
2022-01-29 03:01:17 +00:00
Felipe Rodrigues 9f3c566a10 [NetApp] Add FlexGroup volume support
The NetApp driver has been working  with FlexVol ONTAP volumes.
The driver does not support scaling FlexVol volumes higher than
100 TiB, which was a theoretical limit for the large namespace that
these containers were meant to handle. ONTAP's Flexgroup volumes
eliminate such limitations. So, added the support for provisioning
share as FlexGroup in the NetApp driver.

The FlexGroup provision is enabled by new option
`netapp_enable_flexgroup`, which will make the driver report a single
pool represeting all aggregates. The selection on which aggregates the
FlexGroup share will reside is up to ONTAP. If the administrator desires
to control that selection through Manila scheduler, it must inform the set
of aggregates that formss FlexGroup pool in the new  option
`netapp_flexgroup_pool`.

Each NetApp pool will report now the capability: `netapp_flexgroup`
informing which type the pool is.

The following operations are allowed with FlexGroup shares (DHSS
True/False and NFS/CIFS):

- Create/Delete share;
- Shrink/Extend share;
- Create/Delete snapshot;
- Revert to snapshot;
- Manage/Unmanage snapshots;
- Create from snapshot;
- Replication[1]
- Manage/Unmanage shares;

The backend with one FlexGroup pool configured will drop the consistent
snapshot support for all pools.

The driver FlexGroup support requires ONTAP version 9.8 or greater.

[1] FlexGroup is limited to one single replica for ONTAP version
lower than 9.9.1.

DocImpact

Depends-On: If525e97a5d456d6ddebb4bf9bc8ff6190c95a555
Depends-On: I646f782c3e2be5ac799254f08a248a22cb9e0358
Implements: bp netapp-flexgroup-support
Change-Id: I4f68a9bb33be85f9a22e0be4ccf673647e713459
Signed-off-by: Felipe Rodrigues <felipefuty01@gmail.com>
2021-09-08 15:47:15 -03:00
Felipe Rodrigues 556c361558 [NetApp] Add readable replication type support
Implement the `readable` replication type for the NetApp driver.
The driver will keep having support for the `dr` type as well, being
the driver replication type a list containing them.

The replicas for readable style are mounted, created the export and
applied the QoS. When promoting, the original active replica does
not need to be unmounted. The user just loses the write access.

The update access interface is now applying rules for non active
replicas that are readable.

Implements: bp netapp-readable-replica
Change-Id: Icc74eaecc75c3064715f91bebb994e93c0053663
Signed-off-by: Felipe Rodrigues <felipefuty01@gmail.com>
2021-09-02 18:07:23 +00:00
Felipe Rodrigues 68ad590c37 [NetApp] Fix kerberos security service issues
- Fixes the zapi calls for setting up a kerberos, which have
changed since ONTAP 8.3.
- Fixes kerberos configuration cleanup when deleting a
share server.
- Fixes access rules authentication methods for NFS when a
share server is configured for Kerberos.

Change-Id: I60b4f92979045b1fdb90ad8df4f65c1dfe463ae8
Closes-Bug: #1901189
Closes-Bug: #1904746
Closes-Bug: #1907669
Co-Authored-By: Felipe Rodrigues <felipefuty01@gmail.com>
Signed-off-by: Douglas Viroel <viroel@gmail.com>
2021-01-22 09:29:29 -02:00
Zuul d08f1ae5d9 Merge "[NetApp] Fix CIFS promote back issue" 2020-09-22 08:23:57 +00:00
silvacarloss c3aed22f94 [NetApp] Fix CIFS promote back issue
This change fixes the NetApp promote back issue when using CIFS
protocol. When promoting a replica, the NetApp ONTAP driver
attempts to create a new CIFS share entity (an access point as
defined in [1]) for the new active replica. This behavior
causes a failure since the storage identifies that a current
backend CIFS share with the same name exists, considering
that the reffered replica was once the active one.

This issue is addressed by removing the related CIFS share
entity when the replica gets promoted.

[1] https://library.netapp.com/ecmdocs/ECMP1401220/html/GUID-1898D717-A510-4B3D-B2E3-CCDDD5BD0089.html

Closes-Bug: #1879368
Change-Id: Id9bdd5df0ff05ea08881dd2c83397f0a367d9945
2020-09-21 17:55:12 +00:00
Douglas Viroel 4bcf21eaf1 [NetApp] Add support for share server migration
This patch adds support for share server migration between NetApp
ONTAP drivers. This operation is now supported for migrating a share
server and all its resources between two different clusters.
Share server migration relies on ONTAP features available only in
versions equal and greater than ``9.4``. Also, in order to have share
server migration working across ONTAP clusters, they must be peered in
advance.
At this moment, share server migration doesn't support migrate a share
server without disrupting the access to shares, since the export locations
are updated at the migration complete phase.
The driver doesn't support changing security services while changing the
destination share network. This functionality can be added in the future.

Co-Authored-By: Andre Beltrami <debeltrami@gmail.com>

Implements: bp netapp-share-server-migration
Depends-On: Ic0751027d2c3f1ef7ab0f7836baff3070a230cfd
Change-Id: Idfac890c034cf8cbb65abf685ab6cab5ef13a4b1
Signed-off-by: Douglas Viroel <viroel@gmail.com>
2020-09-11 16:24:24 -03:00
Rodrigo Barbieri 5556bdb727 [NetApp] Add manage/unmanage of share servers
This patch implements the functionality of managing and
unmanaging of share servers to the NetApp driver,
allowing for shares and snapshots to be managed
and unmanaged in DHSS=True driver mode.

Implements: bp netapp-driver-manage-unmanage-with-share-servers
Change-Id: I6051cf038dcf9f175e0610fff0adf360230dc23c
Depends-On: I452c2a99b186f53d737cb7fbd7eabfcfd9b249d6
2019-03-05 19:18:01 +00:00
Ben Swartzlander ebeca4c035 Advertise IPv6 support in the NetApp driver
Escape IPv6 exports correctly and setup the default export
policy to allow both IPv4 and IPv6.

Partially implements: bp netapp-ontap-ipv6-support

Change-Id: I84437b140e2a9561cc4092683209800101f45815
2017-11-06 20:27:10 -05:00
junboli fb17422c86 Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don't put vim configuration in source files
[H203] Use assertIs(Not)None to check for None
[H904] Use ',' instead of '%', String interpolation should be
       delayed to be handled by the logging code, rather than
       being done at the point of the logging call.

Change-Id: Ie985fcf78997a86d41e40eacbb4a5ace8592a348
2017-08-03 16:13:32 +08:00
yfzhao 059fae0ed5 Remove log translations in share and share_group 4/5
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.
This is the 4/5 commit.
Old commit will be abandoned: https://review.openstack.org/#/c/447822/

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: Ia46e9dc4953c788274f5c9b763b2fed96c28d60e
Depends-On: I9fd264a443c634465b8548067f86ac14c1a51faa
Partial-Bug: #1674542
2017-03-31 10:20:11 +08:00
Goutham Pacha Ravi 20e89b9691 NetApp cDOT: Add Intra-Vserver migration support
Add migration support in the cDOT driver.

Change-Id: I72e045b1c978b752f38cc3018cb2a7084e3f3e36
Implements: blueprint netapp-cdot-driver-optimized-migration
2017-01-21 13:06:30 -05:00
Clinton Knight b0ecb2fca4 Support export location metadata in NetApp cDOT drivers
Since the export location metadata feature has merged in Manila core,
we can support it in the NetApp drivers. The initial need is to
report which paths are preferred.

Implements: blueprint netapp-cdot-export-location-metadata
Depends-On: Ibb88c64ddd899c09cd148f398e21ac613be9f15b
Change-Id: I77e3a6464c6da59cfafa34bd23c23740efbcf7c1
2016-02-26 17:33:20 +00:00
Clinton Knight 6ef6482822 Implement update_access() in NetApp cDOT drivers
This commit replaces the allow_access and deny_access methods
in the NetApp cDOT drivers with the new update_access method.  Due
to how cDOT works, the driver always uses the full update path
instead of adding or removing access rules one at a time.

The rules are added in an order that guarantees no transient
interruptions occur, and the IP addresses for NFS are sorted such
that single addresses and smaller subnets take precedence over
larger networks.

Change-Id: I040690895ca1a60f5964a6d01a799b613f7f6a30
Implements: blueprint netapp-cdot-update-access
2016-02-21 14:50:09 +00:00
Clinton Knight d6b1c143b4 NetApp cDOT driver should support read-only CIFS shares
Read-only shares are now a required Manila feature.  The cDOT driver
supports read-only access for NFS shares but not CIFS.  This commit
adds CIFS read-only support.

Closes-Bug: #1513509
Change-Id: Ib7367d80c263331341ca136b61fa8185e894db3b
2015-12-09 15:02:38 +00:00
Clinton Knight 153154c60c Add manage/unmanage support to NetApp cDOT driver
This commit adds support to the cDOT driver for the driver methods
manage_existing and unmanage.  The logic follows three sections:

1. Locate the resource to be managed, which is specified as the
cDOT flexvol name in the export_path argument.
2. Ensure the flexvol to be brought under Manila management is
of the appropriate type, the extra specs from the share type are
valid and match the specified pool, and the flexvol has no LUNs
or other flexvols mounted underneath it.
3. Rename the flexvol using normal Manila naming conventions,
remount it on a new path matching the new name, update it to
conform to all relevant qualified extra specs, and remove any
existing export rules.

Implements blueprint netapp-cdot-driver-manage-unmanage-share

Change-Id: Ib6832baf24585791bf7ec292e5c6cdeb83fe280d
2015-08-20 16:52:49 +00:00
Clinton Knight b907ca09f1 NetApp cDOT driver clones NFS export policy
When clustered Data ONTAP clones a flexvol, the clone gets the
NFS export policy of its parent. Manila expects the clone to be
independent of its parent, so it should be given its own export
policy. This isn't happening in the Kilo cDOT driver.

Change-Id: I5067fc5729bec62de19d1aeaed7ed60d2224e498
Closes-Bug: #1446369
2015-04-22 18:42:31 +00:00
Clinton Knight 9b6771a580 NetApp cDOT driver uses deprecated APIs for NFS exports
The nfs-exportfs-* APIs that the NetApp cDOT driver currently uses
for NFS export management are 7-mode APIs which were left in for
backwards compatibility. It's not the recommended/supported way
to do NFS export management. We need to modify the driver to use
the supported set of export-policy-* and export-rule-* APIs.

Closes-Bug: #1370761
Closes-Bug: #1437509
Change-Id: I91347d27ba69d4a20fe73ce7e75f58c9818ea6d8
2015-04-06 21:53:14 +00:00
Clinton Knight 725a9ced55 cDOT driver should report all share export locations
Manila has the ability for shares to report multiple export locations.
This is an important capability for drivers that manage storage
backends that export shares on multiple network interfaces.  This
commit adds this capability to the cDOT driver.  This commit also
updates the cDOT driver to use backslashes in CIFS export paths.

Change-Id: I772caaad2871a072bb5bc4a505678d9fbf0c579c
Closes-Bug: #1429246
2015-03-18 13:44:20 +00:00
Clinton Knight 96d6262065 NetApp cDOT driver should not create useless export-policy rule
When using manila with a cDOT backend, the 'manila create' command
creates an export-policy for every newly created NFS share and adds
a policy rule with "localhost".  This is not necessary.

Change-Id: If4b54255328ed7384a195609d7e4e99c79d10638
Closes-Bug: #1427791
2015-03-10 18:50:48 +00:00
Clinton Knight f27538323b Single-SVM Manila driver for NetApp Clustered Data ONTAP
The extant Manila driver for cDOT supports multi-svm mode only
(i.e. driver_handles_share_servers = True).  This commit adds
a single-svm cDOT driver (driver_handles_share_servers = False)
for simpler operation without network plug-ins.  To work in this
mode the storage admin must pre-create a vserver with the desired
LIFs and protocols configured, and specify the vserver in
the config variable 'netapp_vserver'.

To configure this driver, use a config like the following:

[cmode]
share_driver = manila.share.drivers.netapp.common.NetAppDriver
driver_handles_share_servers = False
netapp_storage_family = ontap_cluster
netapp_server_hostname=192.168.228.42
netapp_login=admin
netapp_password=cluster3
netapp_server_port=443
netapp_transport_type=https
netapp_aggregate_name_search_pattern=manila
netapp_vserver = manila_svm

Implements blueprint netapp-cdot-driver-without-handling-share-servers

Change-Id: I0cfafe3d64a9a9b52f1eca9f28a0e937b3b84f44
2015-03-02 19:24:41 +00:00
Clinton Knight 2e2b718edd Manila cDOT storage service catalog
Like Cinder, Manila has a scheduler that operates (among other things)
on extra spec values in share types to determine which backend should
receive a new share.  In Kilo, Manila will adopt the pools feature from
Cinder, such that the scheduler may choose from more than one storage
destination per backend.  This commit adds a couple of per-pool
attributes to the share stats reported by the cDOT driver to the scheduler,
including aggregate disk type and RAID type.

Implements blueprint cdot-storage-service-catalog

Change-Id: Ice616d4189832d0e4b1a0fdfdd31b82b8c0a831d
2015-02-21 18:08:08 +00:00
Clinton Knight 12eeedb639 Manila NetApp cDOT driver refactoring
The Manila cDOT driver is a single file exceeding 1200 lines.  It contains
multiple things (driver code, protocol helpers, ZAPI invocation code,
options) that should be split apart to allow for easier maintenance and
readability and add the potential for code sharing when we reintroduce
a 7-mode driver, add a single-SVM cDOT driver, etc.

We recently refactored NetApp's DOT Cinder drivers into a 4-layer
structure (interface, library, client, API) that separates concerns and
achieves the goals set forth above.  This commit satisfies a plan to
do the same thing in Manila.  The implementation steps are:

1. Update directory structure to match that of the Cinder NetApp drivers
2. Create driver interface shim
3. Move driver code to library (with base & C-mode classes, to allow for
   7-mode code sharing later)
4. Move protocol helpers to separate files (already organized by base &
   C-mode classes)
5. Split out ZAPI code to client layer (with base & C-mode classes, to
   allow for 7-mode code sharing later)
6. Implement NetApp driver factory as in Cinder
7. Implement common NetApp options file as in Cinder
8. Implement cDOT API call optimizations
9. Update all unit tests as needed

Note that this patch appears to treble the total number of code lines.
This is due to the addition of many more unit tests plus a large amount
of fake controller API data to feed the API client tests.

Implements: blueprint netapp-manila-cdot-driver-refactoring
Closes-Bug: #1410317
Partial-Bug: #1396953
Closes-Bug: #1370965
Closes-Bug: #1418690
Closes-Bug: #1418696

Change-Id: I3fc0d09adf84a3708f110a89a7c8c760f4ce3588
2015-02-10 12:30:24 +00:00