Skip to content

Commit 3a2c43b

Browse files
Locharla, SandeepLocharla, Sandeep
authored andcommitted
Create & Delete, Enable & Disable, Enter & Cancel maintenance of Primary StoragePool with ONTAP storage
Co-authored-by: Rajiv Jain <Rajiv.Jain@netapp.com>
1 parent 7b94ccc commit 3a2c43b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+7130
-0
lines changed

client/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@
121121
<artifactId>cloud-plugin-storage-volume-adaptive</artifactId>
122122
<version>${project.version}</version>
123123
</dependency>
124+
<dependency>
125+
<groupId>org.apache.cloudstack</groupId>
126+
<artifactId>cloud-plugin-storage-volume-ontap</artifactId>
127+
<version>${project.version}</version>
128+
</dependency>
124129
<dependency>
125130
<groupId>org.apache.cloudstack</groupId>
126131
<artifactId>cloud-plugin-storage-volume-solidfire</artifactId>

plugins/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
<module>storage/volume/default</module>
130130
<module>storage/volume/nexenta</module>
131131
<module>storage/volume/sample</module>
132+
<module>storage/volume/ontap</module>
132133
<module>storage/volume/solidfire</module>
133134
<module>storage/volume/scaleio</module>
134135
<module>storage/volume/linstor</module>
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Apache CloudStack - NetApp ONTAP Storage Plugin
2+
3+
## Overview
4+
5+
The NetApp ONTAP Storage Plugin provides integration between Apache CloudStack and NetApp ONTAP storage systems. This plugin enables CloudStack to provision and manage primary storage on ONTAP clusters, supporting both NAS (NFS) and SAN (iSCSI) protocols.
6+
7+
## Features
8+
9+
- **Primary Storage Support**: Provision and manage primary storage pools on NetApp ONTAP
10+
- **Multiple Protocols**: Support for NFS 3.0 and iSCSI protocols
11+
- **Unified Storage**: Integration with traditional ONTAP unified storage architecture
12+
- **KVM Hypervisor Support**: Supports KVM hypervisor environments
13+
- **Managed Storage**: Operates as managed storage with full lifecycle management
14+
- **Flexible Scoping**: Support for Zone-wide and Cluster-scoped storage pools
15+
16+
## Architecture
17+
18+
### Component Structure
19+
20+
| Package | Description |
21+
|---------|-------------------------------------------------------|
22+
| `driver` | Primary datastore driver implementation |
23+
| `feign` | REST API clients and data models for ONTAP operations |
24+
| `lifecycle` | Storage pool lifecycle management |
25+
| `listener` | Host connection event handlers |
26+
| `provider` | Main provider and strategy factory |
27+
| `service` | ONTAP Storage strategy implementations (NAS/SAN) |
28+
| `utils` | Constants and helper utilities |
29+
30+
## Requirements
31+
32+
### ONTAP Requirements
33+
34+
- NetApp ONTAP 9.15 or higher
35+
- Storage Virtual Machine (SVM) configured with appropriate protocols enabled
36+
- Management LIF accessible from CloudStack management server
37+
- Data LIF(s) accessible from hypervisor hosts and are of IPv4 type
38+
- Aggregates assigned to the SVM with sufficient capacity
39+
40+
### CloudStack Requirements
41+
42+
- Apache CloudStack 4.23.0 or higher
43+
- KVM hypervisor hosts
44+
- For iSCSI: Hosts must have iSCSI initiator configured with valid IQN
45+
- For NFS: Hosts must have NFS client packages installed
46+
47+
### Minimum Volume Size
48+
49+
ONTAP requires a minimum volume size of **1.56 GB** (1,677,721,600 bytes). The plugin will automatically adjust requested sizes below this threshold.
50+
51+
## Configuration
52+
53+
### Storage Pool Creation Parameters
54+
55+
When creating an ONTAP primary storage pool, provide the following details in the URL field (semicolon-separated key=value pairs):
56+
57+
| Parameter | Required | Description |
58+
|-----------|----------|-------------|
59+
| `username` | Yes | ONTAP cluster admin username |
60+
| `password` | Yes | ONTAP cluster admin password |
61+
| `svmName` | Yes | Storage Virtual Machine name |
62+
| `protocol` | Yes | Storage protocol (`NFS3` or `ISCSI`) |
63+
| `managementLIF` | Yes | ONTAP cluster management LIF IP address |
64+
| `isDisaggregated` | Yes | Set to `false` (disaggregated not supported) |
65+
66+
### Example URL Format
67+
68+
```
69+
username=admin;password=secretpass;svmName=svm1;protocol=ISCSI;managementLIF=192.168.1.100;isDisaggregated=false
70+
```
71+
72+
## Port Configuration
73+
74+
| Protocol | Default Port |
75+
|----------|--------------|
76+
| NFS | 2049 |
77+
| iSCSI | 3260 |
78+
| ONTAP Management API | 443 (HTTPS) |
79+
80+
## Limitations
81+
82+
- Supports only **KVM** hypervisor
83+
- Supports only **Unified ONTAP** storage (disaggregated not supported)
84+
- Supports only **NFS3** and **iSCSI** protocols
85+
- IPv6 type and FQDN LIFs are not supported
86+
87+
## Troubleshooting
88+
89+
### Common Issues
90+
91+
1. **Connection Failures**
92+
- Verify management LIF is reachable from CloudStack management server
93+
- Check firewall rules for port 443
94+
95+
2. **Protocol Errors**
96+
- Ensure the protocol (NFS/iSCSI) is enabled on the SVM
97+
- Verify Data LIFs are configured for the protocol
98+
99+
3. **Capacity Errors**
100+
- Check aggregate space availability
101+
- Ensure requested volume size meets minimum requirements (1.56 GB)
102+
103+
4. **Host Connection Issues**
104+
- For iSCSI: Verify host IQN is properly configured in host's storage URL
105+
- For NFS: Ensure NFS client is installed and running
106+
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
<artifactId>cloud-plugin-storage-volume-ontap</artifactId>
23+
<name>Apache CloudStack Plugin - Storage Volume ONTAP Provider</name>
24+
<parent>
25+
<groupId>org.apache.cloudstack</groupId>
26+
<artifactId>cloudstack-plugins</artifactId>
27+
<version>4.23.0.0-SNAPSHOT</version>
28+
<relativePath>../../../pom.xml</relativePath>
29+
</parent>
30+
<properties>
31+
<spring-cloud.version>2021.0.7</spring-cloud.version>
32+
<openfeign.version>11.0</openfeign.version>
33+
<json.version>20230227</json.version>
34+
<httpclient.version>4.5.14</httpclient.version>
35+
<swagger-annotations.version>1.6.2</swagger-annotations.version>
36+
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
37+
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
38+
<jackson-databind.version>2.13.4</jackson-databind.version>
39+
<assertj.version>3.24.2</assertj.version>
40+
</properties>
41+
<dependencyManagement>
42+
<dependencies>
43+
<dependency>
44+
<groupId>org.springframework.cloud</groupId>
45+
<artifactId>spring-cloud-dependencies</artifactId>
46+
<version>${spring-cloud.version}</version>
47+
<type>pom</type>
48+
<scope>import</scope>
49+
</dependency>
50+
</dependencies>
51+
</dependencyManagement>
52+
<dependencies>
53+
<dependency>
54+
<groupId>org.apache.cloudstack</groupId>
55+
<artifactId>cloud-plugin-storage-volume-default</artifactId>
56+
<version>${project.version}</version>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.json</groupId>
60+
<artifactId>json</artifactId>
61+
<version>${json.version}</version>
62+
</dependency>
63+
<dependency>
64+
<groupId>io.github.openfeign</groupId>
65+
<artifactId>feign-core</artifactId>
66+
<version>${openfeign.version}</version>
67+
</dependency>
68+
<dependency>
69+
<groupId>io.github.openfeign</groupId>
70+
<artifactId>feign-httpclient</artifactId>
71+
<version>${openfeign.version}</version>
72+
</dependency>
73+
<dependency>
74+
<groupId>io.github.openfeign</groupId>
75+
<artifactId>feign-jackson</artifactId>
76+
<version>${openfeign.version}</version>
77+
</dependency>
78+
<dependency>
79+
<groupId>com.fasterxml.jackson.core</groupId>
80+
<artifactId>jackson-databind</artifactId>
81+
<version>${jackson-databind.version}</version>
82+
</dependency>
83+
<dependency>
84+
<groupId>org.apache.httpcomponents</groupId>
85+
<artifactId>httpclient</artifactId>
86+
<version>${httpclient.version}</version>
87+
</dependency>
88+
<dependency>
89+
<groupId>org.apache.cloudstack</groupId>
90+
<artifactId>cloud-engine-storage-volume</artifactId>
91+
<version>${project.version}</version>
92+
</dependency>
93+
<dependency>
94+
<groupId>io.swagger</groupId>
95+
<artifactId>swagger-annotations</artifactId>
96+
<version>${swagger-annotations.version}</version>
97+
</dependency>
98+
<!-- JUnit 5 -->
99+
<dependency>
100+
<groupId>org.junit.jupiter</groupId>
101+
<artifactId>junit-jupiter-engine</artifactId>
102+
<version>5.8.1</version>
103+
<scope>test</scope>
104+
</dependency>
105+
106+
<!-- Mockito -->
107+
<dependency>
108+
<groupId>org.mockito</groupId>
109+
<artifactId>mockito-core</artifactId>
110+
<version>3.12.4</version>
111+
<scope>test</scope>
112+
</dependency>
113+
<dependency>
114+
<groupId>org.mockito</groupId>
115+
<artifactId>mockito-junit-jupiter</artifactId>
116+
<version>5.2.0</version>
117+
<scope>test</scope>
118+
</dependency>
119+
120+
<!-- Mockito Inline (for static method mocking) -->
121+
<dependency>
122+
<groupId>org.mockito</groupId>
123+
<artifactId>mockito-inline</artifactId>
124+
<version>3.12.4</version>
125+
<scope>test</scope>
126+
</dependency>
127+
<dependency>
128+
<groupId>org.assertj</groupId>
129+
<artifactId>assertj-core</artifactId>
130+
<version>${assertj.version}</version>
131+
<scope>test</scope>
132+
</dependency>
133+
</dependencies>
134+
<repositories>
135+
<repository>
136+
<id>central</id>
137+
<name>Maven Central</name>
138+
<url>https://repo.maven.apache.org/maven2</url>
139+
</repository>
140+
</repositories>
141+
<build>
142+
<plugins>
143+
<plugin>
144+
<groupId>org.apache.maven.plugins</groupId>
145+
<artifactId>maven-compiler-plugin</artifactId>
146+
<version>${maven-compiler-plugin.version}</version>
147+
<configuration>
148+
<source>11</source>
149+
<target>11</target>
150+
</configuration>
151+
</plugin>
152+
<plugin>
153+
<artifactId>maven-surefire-plugin</artifactId>
154+
<version>${maven-surefire-plugin.version}</version>
155+
<configuration>
156+
<skipTests>false</skipTests>
157+
<includes>
158+
<include>**/*Test.java</include>
159+
</includes>
160+
</configuration>
161+
<executions>
162+
<execution>
163+
<phase>integration-test</phase>
164+
<goals>
165+
<goal>test</goal>
166+
</goals>
167+
</execution>
168+
</executions>
169+
</plugin>
170+
</plugins>
171+
</build>
172+
</project>

0 commit comments

Comments
 (0)