Commit Graph

18 Commits

Author SHA1 Message Date
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
Goutham Pacha Ravi 598223985a Use unittest.mock instead of third party lib
mock was adopted into standard python
in version 3.3 [1]. Since manila no longer
supports python2.7, we can use the inbuilt
mock package rather than the third party
lib.

Fix some issues with imports that weren't
following our import conventions of grouping
imports [3]

Add a hacking test to ensure we don't regress
on this.

[1] https://docs.python.org/3/library/unittest.mock.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2020-March/013281.html
[3] https://docs.openstack.org/hacking/latest/user/hacking.html#imports

Co-Authored-By: Sean McGinnis <sean.mcginnis@gmail.com>
Change-Id: If857a49fbf526983e712282a25d7e8bef5093533
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-04-17 16:24:27 -07: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
zhongjun 341161eead Use parenthesis instead of backslashes in tests folder
Use parenthesis instead of backslashes in tests folder

TrivialFix
Change-Id: I6c2ea07b0bfc5852b28e44989406cc10eb972e53
2017-06-19 17:56:01 +08: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 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 dc2aa75e7c Support Manila pools in NetApp Clustered Data ONTAP driver
The Cinder pools feature is being ported to Manila, and drivers must be
updated to report pools in order to use this feature.  This patch adds
support for pools to the NetApp Clustered Data ONTAP driver for Manila.

Implements blueprint support-pools-in-netapp-cdot-driver

Change-Id: Iba327a745227e6219e6e1fc77af407f097905d8f
2015-02-16 20:18:50 +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