Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@
<artifactId>cloud-plugin-storage-volume-adaptive</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-volume-ontap</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-volume-solidfire</artifactId>
Expand Down
1 change: 1 addition & 0 deletions plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
<module>storage/volume/default</module>
<module>storage/volume/nexenta</module>
<module>storage/volume/sample</module>
<module>storage/volume/ontap</module>
<module>storage/volume/solidfire</module>
<module>storage/volume/scaleio</module>
<module>storage/volume/linstor</module>
Expand Down
106 changes: 106 additions & 0 deletions plugins/storage/volume/ontap/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Apache CloudStack - NetApp ONTAP Storage Plugin

## Overview

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.

## Features

- **Primary Storage Support**: Provision and manage primary storage pools on NetApp ONTAP
- **Multiple Protocols**: Support for NFS 3.0 and iSCSI protocols
- **Unified Storage**: Integration with traditional ONTAP unified storage architecture
- **KVM Hypervisor Support**: Supports KVM hypervisor environments
- **Managed Storage**: Operates as managed storage with full lifecycle management
- **Flexible Scoping**: Support for Zone-wide and Cluster-scoped storage pools

## Architecture

### Component Structure

| Package | Description |
|---------|-------------------------------------------------------|
| `driver` | Primary datastore driver implementation |
| `feign` | REST API clients and data models for ONTAP operations |
| `lifecycle` | Storage pool lifecycle management |
| `listener` | Host connection event handlers |
| `provider` | Main provider and strategy factory |
| `service` | ONTAP Storage strategy implementations (NAS/SAN) |
| `utils` | Constants and helper utilities |

## Requirements

### ONTAP Requirements

- NetApp ONTAP 9.15 or higher
- Storage Virtual Machine (SVM) configured with appropriate protocols enabled
- Management LIF accessible from CloudStack management server
- Data LIF(s) accessible from hypervisor hosts and are of IPv4 type
- Aggregates assigned to the SVM with sufficient capacity

### CloudStack Requirements

- Apache CloudStack 4.23.0 or higher
- KVM hypervisor hosts
- For iSCSI: Hosts must have iSCSI initiator configured with valid IQN
- For NFS: Hosts must have NFS client packages installed

### Minimum Volume Size

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.

## Configuration

### Storage Pool Creation Parameters

When creating an ONTAP primary storage pool, provide the following details in the URL field (semicolon-separated key=value pairs):

| Parameter | Required | Description |
|-----------|----------|-------------|
| `username` | Yes | ONTAP cluster admin username |
| `password` | Yes | ONTAP cluster admin password |
| `svmName` | Yes | Storage Virtual Machine name |
| `protocol` | Yes | Storage protocol (`NFS3` or `ISCSI`) |
| `managementLIF` | Yes | ONTAP cluster management LIF IP address |
| `isDisaggregated` | Yes | Set to `false` (disaggregated not supported) |

### Example URL Format

```
username=admin;password=secretpass;svmName=svm1;protocol=ISCSI;managementLIF=192.168.1.100;isDisaggregated=false
```

## Port Configuration

| Protocol | Default Port |
|----------|--------------|
| NFS | 2049 |
| iSCSI | 3260 |
| ONTAP Management API | 443 (HTTPS) |

## Limitations

- Supports only **KVM** hypervisor
- Supports only **Unified ONTAP** storage (disaggregated not supported)
- Supports only **NFS3** and **iSCSI** protocols
- IPv6 type and FQDN LIFs are not supported

## Troubleshooting

### Common Issues

1. **Connection Failures**
- Verify management LIF is reachable from CloudStack management server
- Check firewall rules for port 443

2. **Protocol Errors**
- Ensure the protocol (NFS/iSCSI) is enabled on the SVM
- Verify Data LIFs are configured for the protocol

3. **Capacity Errors**
- Check aggregate space availability
- Ensure requested volume size meets minimum requirements (1.56 GB)

4. **Host Connection Issues**
- For iSCSI: Verify host IQN is properly configured in host's storage URL
- For NFS: Ensure NFS client is installed and running

172 changes: 172 additions & 0 deletions plugins/storage/volume/ontap/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>cloud-plugin-storage-volume-ontap</artifactId>
<name>Apache CloudStack Plugin - Storage Volume ONTAP Provider</name>
<parent>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloudstack-plugins</artifactId>
<version>4.23.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<properties>
<spring-cloud.version>2021.0.7</spring-cloud.version>
<openfeign.version>11.0</openfeign.version>
<json.version>20230227</json.version>
<httpclient.version>4.5.14</httpclient.version>
<swagger-annotations.version>1.6.2</swagger-annotations.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
<jackson-databind.version>2.13.4</jackson-databind.version>
<assertj.version>3.24.2</assertj.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-plugin-storage-volume-default</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>${json.version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-core</artifactId>
<version>${openfeign.version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>${openfeign.version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-jackson</artifactId>
<version>${openfeign.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-databind.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-engine-storage-volume</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-annotations.version}</version>
</dependency>
<!-- JUnit 5 -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.8.1</version>
<scope>test</scope>
</dependency>

<!-- Mockito -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.12.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>

<!-- Mockito Inline (for static method mocking) -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>3.12.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>central</id>
<name>Maven Central</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<skipTests>false</skipTests>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading
Loading