Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Be able to define snapshot policy in storage class #93

Closed
per-steinar opened this issue Feb 19, 2018 · 3 comments
Closed

Comments

@per-steinar
Copy link

Both ONTAP-SAN and ONTAP-NAS supports provisioning volumes with and without snapshotting enabled based on the snapshot policy configured in the backend or in the PVC. It would be more practical to be able to define the snapshot policy in storage classes because then the storage class can provide all the information about the available snapshot policies.

Today the user need to know about all available snapshot policies or all volumes in one backend need to have the same snapshot policy.

@kangarlou
Copy link
Contributor

It would be good to address this issue with US2958.

@trulleberg
Copy link

+1 from me! We would need the same feature

@kangarlou
Copy link
Contributor

@per-steinar @trulleberg @kapilarora @si-heger We have made the decision to keep the storage class definitions generic so that they're not tied to a specific platform (e.g., ONTAP, SolidFire, E-Series). Snapshot policy is currently only supported by ONTAP backends, so we couldn't make it a storage class parameter. However, starting with release 18.04, you can add multiple instances of the same storage backend under different names using the new backendName field in the backend JSON config file.
Here is the description and an example for an ONTAP NAS backend:
https://netapp-trident.readthedocs.io/en/stable-v18.04/kubernetes/operations/tasks/backends/ontap.html#backend-configuration-options
https://github.com/NetApp/trident/blob/master/trident-installer/sample-input/backend-ontap-nas.json#L4.

With this option, you can have the same storage endpoint offer different snapshot policies, export policies, etc under different backends in Trident. Then you can define Kubernetes storage classes using the storagePools parameter such that they map to the instance of the backend that has the desired set of policies.

We have also added the capability to rename an existing backend. You can use the tridentctl update backend command for this purpose (see updating a backend). Here is an example:

$ cat backend-ontapnas.json 
{
    "version": 1,
    "storageDriverName": "ontap-nas",
    "managementLIF": "10.*.*.*",
    "dataLIF": "10.1.2.3",
    "svm": "svm1",
    "username": "vsadmin",
    "password": "***"
}
$ tridentctl create backend -f backend-ontapnas.json 
+------------------------+----------------+--------+---------+
|          NAME          | STORAGE DRIVER | ONLINE | VOLUMES |
+------------------------+----------------+--------+---------+
| ontapnas_10.1.2.3      | ontap-nas      | true   |       0 |
+------------------------+----------------+--------+---------+
$ cat backend-ontapnas-NetAppAFF.json 
{
    "version": 1,
    "storageDriverName": "ontap-nas",
    "backendName": "NetAppAFF",
    "managementLIF": "10.*.*.*",
    "dataLIF": "10.1.2.3",
    "svm": "svm1",
    "username": "vsadmin",
    "password": "***"
}
$ tridentctl update backend ontapnas_10.1.2.3 -f backend-ontapnas-NetAppAFF.json
+-----------+----------------+--------+---------+
|   NAME    | STORAGE DRIVER | ONLINE | VOLUMES |
+-----------+----------------+--------+---------+
| NetAppAFF | ontap-nas      | true   |       0 |
+-----------+----------------+--------+---------+
$ tridentctl get backend
+---------------------------+-------------------+--------+---------+
|           NAME            |  STORAGE DRIVER   | ONLINE | VOLUMES |
+---------------------------+-------------------+--------+---------+
| NetAppAFF                 | ontap-nas         | true   |       0 |
+---------------------------+-------------------+--------+---------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants