forked from apache/cloudstack
-
Notifications
You must be signed in to change notification settings - Fork 0
feature/CSTACKEX-46: Create, Delete iSCSI type Cloudstack volumes, Enter, Cancel Maintenance mode #27
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
Merged
Merged
feature/CSTACKEX-46: Create, Delete iSCSI type Cloudstack volumes, Enter, Cancel Maintenance mode #27
Changes from all commits
Commits
Show all changes
274 commits
Select commit
Hold shift + click to select a range
3eea5c4
CSTACKEX-46: Fixed a check style issue which got introduced during re…
63addcd
CSTACKEX-46: Fixed a couple of issues observed while testing NFS3 sto…
dfc1ee9
CSTACKEX-46: Refactored driver class
5895ae3
CSTACKEX-46: Fixed code as per comments received
887e589
CSTACKEX-46: Added some code that was added to community PR for Prima…
1d1f596
UTs for NFS storage pool creation code (#29)
piyush5netapp 0e3a51e
uefi property typo (#11929)
sureshanaparti 5ef9a22
DB setup: support db schema creation (with --schema-only) without for…
sureshanaparti bb71248
Enable UEFI on KVM hosts (by default), and configure with some defaul…
sureshanaparti ce8b1e4
CKS: update cloud.kubernetes.cluster.network.offering to dynamic (#11…
weizhouapache c09aebd
consider Instance in Starting state for listPodsByUserConcentration (…
sudo87 6848e30
Veeam: get templateId from vm instance if vm is created from ISO (#10…
weizhouapache 8fc0c93
Veeam: use pre-defined object mapper (#10715)
weizhouapache da1e48b
UI: Update and reset domain level configuration (#11571)
Pearl1594 cea35ea
Track volume usage data at a vm granularity as well (#11531)
abh1sar 6fb5bdf
add isPerson check to query for AD (#11843)
DaanHoogland bdd32a2
ui: fix zone options for image instance deploy button (#12060)
shwstppr 1fd6d84
UI: fix list of zones if zone has icon (#12083)
weizhouapache 8e370c1
api,server,ui: improve listing public ip for associate (#11591)
shwstppr ce67143
Fix DB upgrade script for 4.22 (#12111)
abh1sar 2438877
fix API Request Parameters Logged Credential Masking in ApiServer (#1…
YLChen-007 98f5291
server: fix volume offering not updated after offering change (#12003)
shwstppr ab00a3e
fixed Password Exposure in IPMI Tool Command Execution (#12028)
YLChen-007 8f21ead
Fix upgrade files (#12155)
harikrishna-patnala 37ce77d
Rename PRE-COMMIT.md to PRE_COMMIT.md and fix link (#12157)
jbampton d3973c8
use upstream method for creating enums from strings (#12158)
DaanHoogland 58e28cc
ceph: fix offline volume migration between ceph pools (#12103)
weizhouapache 888f01b
ui: fix section search filter (#12146)
shwstppr 5a768a4
refactor: add null check for BroadcastDomainType retrievals (#11572)
shwstppr 2e6da57
Proxmox Extension : Make settings such as storage, disk_size,... (#12…
abh1sar 9dfae00
removed code in comments (#11145)
DaanHoogland 10555d7
java dependabot file (#11409)
DaanHoogland 3a8319f
Add license information to dependabot.yaml
DaanHoogland cb6e611
UI: Create Account form to set proper domain and role based on route …
Pearl1594 4fc0e0b
Standardize and auto add license headers to all Vue files with pre-co…
jbampton 341bd44
UI(vue) + extras: fix bugs/spelling and standardize (#12073)
jbampton abe7f68
yamllint use `extends: default` (#12066)
jbampton daa141b
pre-commit trailing-whitespace cleanup LICENSE/NOTICE (#12242)
jbampton 8d7abf7
.github: initial version of Code Owners (#12253)
DaanHoogland 837f809
api,server: normalize string empty value on config update (#11770)
shwstppr b4cb048
server: trim autoscale Windows VM hostname (#11327)
shwstppr d04d0b0
Changes error message when using invalid `endpoint.url` (#8603)
lucas-a-martins a9d4d5d
Enhance NFS mount option check for empty response (#11839)
DaanHoogland 27b137f
Prevent scaling of cluster if count / resources exceed account resour…
Pearl1594 ccd345c
Support iprange while creating remote access vpn (#12063)
sudo87 786ab73
ui: allow macaddress input for add nic to vm (#12145)
shwstppr 84648b2
Optimize drs plan generation (#12014)
vishesh92 97b8a6f
server,ui: prevent role change for default accounts (#11761)
shwstppr e51cebe
check for active MSses before starting DB upgrade (#12140)
DaanHoogland 8dce4a4
UI: Option to choose the isolation method when creating the public IP…
sureshanaparti 5c8cf89
.github: Move `dependabot.yml` to the correct directory (#12243)
jbampton 9205eed
unlink an ldap domain (#11962)
DaanHoogland 1bcdff8
Github Action: Add action to auto close issues/PRs after a certain ti…
vishesh92 54b2d83
Bump cs.aws.sdk.version from 1.12.439 to 1.12.795 (#12267)
dependabot[bot] 827a718
Bump `actions/cache` to `v5` (#12247)
jbampton bde548a
cleanup LDAP code according to warnings (#11436)
DaanHoogland 7d17c43
Bump org.influxdb:influxdb-java from 2.22 to 2.25 (#12270)
dependabot[bot] 6549cd1
security groups: conntrack only if needed (#10594)
phsm 85067bb
Log4j2 refactor cloud api module (#8728)
KlausDornsbach be21ad8
Feature s390x multiarch support (#12214)
viddya673 5ec72cf
Bump com.zaxxer:HikariCP from 5.1.0 to 7.0.2 (#12266)
dependabot[bot] 13968a7
KVM memballooning requires free page reporting and autodeflate (#11932)
bradh352 2d531c7
Python exception processing static routes fixed (#11967)
bradh352 b98c70e
kvm: use preallocation option for fat disk resize (#11986)
shwstppr 0e1989b
Show time correctly in the backup schedule UI (#12012)
abh1sar 5d82125
api:rename RegisterCmd.java => RegisterUserKeyCmd.java (#12259)
weizhouapache 4eb9666
api: create/register/upload template with empty template tag (#12234)
weizhouapache ae82055
Prioritize copying templates from other secondary storages instead of…
winterhazel fb7df08
packaging: use latest cmk release link directly (#11429)
shwstppr 2a0815b
Fix VM and volume metrics listing regressions (#12284)
winterhazel 74bcfcb
Fix terms, typos and grammar mistakes in the API, error messages, eve…
vladimirpetrov 7a6cc05
Cleanup userconcentratedpod_random and userconcentratedpod_firstfit a…
sudo87 4b0c32b
Replace deprecated 'egrep' commands with 'grep -E'. (#12306)
argusb 0e23a32
systemvm-template: support on-demand download during setup and regist…
shwstppr 5bc829e
api: fix response annotation for createBackupSchedule (#11950)
shwstppr 536d311
Add 'dataDiskController' VM setting/detail for KVM hypervisor (#12334)
sureshanaparti 862b42c
Removal of internal ID in backup event descriptions (#12197)
Tonitzpp 53e3528
Show volume UUIDs in the backup details page (#12156)
Tonitzpp c6a3fbd
webhook: fixes, filter enhancement (#12023)
shwstppr cc70f49
CKS: Fix issue with scaling down CKS Nodes when deployed in HA mode (…
Pearl1594 fa81b4c
Protect upgrades from failures (#12319)
Pearl1594 bd549bd
ui: fix test delivery params in create webhook form (#12318)
shwstppr 9e663b0
linstor: Provide /dev/drbd/by-res/ resource paths to CloudStack (#12300)
rp- f46f58a
Event typo fix (#12350)
sureshanaparti b8755b2
Refactor XML parsing to use safer document builders in multiple class…
YLChen-007 4a1927c
replace momentjs with dayjs and use watch instead of update (#12351)
sudo87 ec69dc3
Adjust close periods (#12376)
DaanHoogland 1855aef
Add mountopts to backup repository response (#12360)
sureshanaparti a4ad7fa
fix HMAC Signatures and API Keys Logged in Plaintext (#12021)
YLChen-007 444278b
Retry cloneVM task when any file access issue while cloning from volu…
sureshanaparti 172753b
Skip removal of offerings if in use during domain removal (#11780)
sudo87 ae8f1cf
Prevent NPE when removing NIC from a stopped VM using service offerin…
Pearl1594 918e8bb
[CI] Dependabot: add a cooldown period for new releases (#12384)
jbampton d28c64c
Standardize and auto add license headers to properties files (#12231)
jbampton 627ef23
Change migration volume exception messages (#12367)
Tonitzpp ef1c269
Change internal ID to UUID in user disable event (#11824)
erikbocks 3c38b50
Cleanup: Standardize logger message formatting in ApiServer.java (#11…
he1l0world 15e2e82
Change the `value` parameter of the `updateConfiguration` API to be r…
bernardodemarco 913baa6
Fix Linstor shrink qcow2 volumes (#12387)
nvazquez d611dcf
Avoid double counting primary storage allocated capacity for storage …
abh1sar 09a845d
kvm: allow skip forcing disk controller (#11750)
shwstppr 2256375
Fixed User type accounts being able to change resource limits of thei…
erikbocks 6550906
UI: Add info for 'Use primary storage replication' in snapshot view(s…
sureshanaparti 19a608d
Improve logs for VM migrations (#12332)
nvazquez ac2f256
[UI] Fix for the login url with nested redirect parameters (#12356)
sureshanaparti a9a7e43
Updated protobuf version to 3.25.5, and protobuf & jackson maven depe…
sureshanaparti ce335f7
fix location constraint ceph error (#12285)
abh1sar 175d9d3
[UI] Fix primary storage details display when the uuid has divergent …
sureshanaparti 3abccd8
Linstor fix host picking (#12047)
rp- 335bea0
ui: option to migrate vm with volumes to same pool (#11703)
shwstppr 3e00520
Reset modifier button's state (#12187)
vishesh92 91bc65e
Fix cloud-sysvmadmin hang (#12355)
abh1sar 5f47ac9
MAC address assignment improvements (#12349)
sureshanaparti d6a4b2b
Remove transaction from updateCapacityForHost cal (#12421)
abh1sar 20eaeb1
Review comment on pull request #12436
weizhouapache 961d85c
Revert "Review comment on pull request #12436"
weizhouapache 489a962
Add settings to mark cryptographic algorithms in vpn customer gateway…
abh1sar 0b2595a
Support dedicating backup offerings to domains (#12194)
Pearl1594 9547547
[Usage] Include accounts uuid on the cloud_usage accounts initial sav…
nvazquez fcfc36c
Cleanup snapshot files in datastores for Error-ed snapshots, and some…
sureshanaparti 31b5693
ui: fix form data double fetch/reset form data by ownership selection…
shwstppr 294d4d4
Bump commons-codec:commons-codec from 1.15 to 1.20.0 (#12303)
dependabot[bot] a4a8fa8
Bump ads.version from 2.0.0.AM25 to 2.0.0.AM27 (#12269)
dependabot[bot] 5d06b33
CKS: fix resource limitation check on cpu when scale cks cluster (#12…
weizhouapache f0669b2
ui: fix 404 on login after forgot password (#12448)
shwstppr aa7624a
Mask vncPasswd being logged in agent.log (#12404)
sudo87 f82ccc0
Adds url kubernetes iso (#10862)
vits-hugs 1954a96
Fix NPE on primary storage delete (#11817)
hsato03 af00864
CKS: Add image store validation for Kubernetes version registration (…
Damans227 1a67edb
Set nfsVersion in ssvm agent.properties only if it is not null (#12445)
abh1sar e0288a8
Fix: Condition for aborting migration, resume paused VMs on destinati…
nvazquez ee5fc98
Fix NPE on adding new columns in the tables (#12464)
harikrishna-patnala 0f47c88
UI: fix issues when deploy VNF applicance on network with SG (#12436)
weizhouapache 96d3942
Fix potential leaks in executePipedCommands (#12478)
abh1sar 7a2d9d7
Remove redundant Exceptions from logs for vm schedules (#12428)
vishesh92 c8f52c0
Fix update network offering domainids size limitation (#12431)
nvazquez b443402
Fix for zoneids parameters length on updateAPIs (#12440)
nvazquez b7a6023
improve error handling for template upload notifications (#12412)
Damans227 a5611f2
limit iso filename to have 251 chars at max (#12430)
sudo87 b0c05a4
snapshot: fix listSnapshots for volume which got delete and whose sto…
yadvr 09ddd19
NPE fix while deleting storage pool when pool has detached volumes (#…
sureshanaparti 9724279
Allow modification of user vm details if user.vm.readonly.details is …
Pearl1594 65915cc
Fix: proper permissions for systemvm template registrations on harden…
artem-sidorenko 956cf78
Notify user if template upgrade is not required (#12483)
sudo87 ce430ce
Add log for null templateVO (#12406)
sudo87 5e98346
ConfigDrive: use file absolute path instead of canonical path to crea…
weizhouapache afef5c3
Fix snapshot physical size after migration (#12166)
hsato03 74a85dd
fix Sensitive Data Exposure Through Exception Logging in OVM Hypervis…
YLChen-007 9a73688
fix install path for systemvm templates when introducing new sec stor…
bernardodemarco ec82012
merge forward error
1fe7e94
Standardize and auto add license headers to all cfg files with pre-co…
jbampton fb40be3
Fix/prometheus metadata sorting (#12112)
Sinscerly bc7aeb9
api,server,ui: support tags for domains (#11964)
shwstppr 7720620
Fix typo in finalyzeAccountId (#11990)
erikbocks 6b51e3c
Implement SSVM storage network IP to API response and GUI details tab…
erikbocks 55d50ba
fix template id unmanaged vm (#12288)
tanganellilore 85b44e9
Refactor configuration SystemVMDefaultHypervisor (#8934)
GaOrtiga f014e92
Implemented auto refresh button for VM metrics (#10900)
erikbocks f82d60b
server: fix remove management server (#12147)
shwstppr b66ec15
Fix logging of forwarded IPs in logs (#11854)
abh1sar 865edb3
ui: fix form data double fetch/reset DeployVMFromBackup form data by …
shwstppr 9f8db32
debian/control: remove python2 as dependency of build environment (#1…
weizhouapache 127efb1
add missing label text for label.aclname (#12511)
sudo87 f5edd2c
api/server: support deploy-as-is template as VNF template (#12499)
weizhouapache b04b1b0
do not add disk cache mode from an empty string (#12248)
DaanHoogland 55b70de
Fix saml bug unable to login (#10868)
vits-hugs 121335d
Add ability to filter by version for listHosts and listMgmtServers AP…
nvazquez a074b3d
VM Power state optimization (#12463)
nvazquez 0f844ec
Consider secondary storage selectors during template synchronization …
winterhazel 2a8e844
server: do not run dhcp and dns check if VR is not provider (#12272)
weizhouapache f340e77
CKS: Use Zone MTUs when network is created at the time of CKS cluster…
Pearl1594 039ab32
Initialize template status='Processing' (#11970)
sudo87 bb89ace
fix Host Password Exposed in Command-Line Logging (#12016)
YLChen-007 a02eb01
ui: reset configuration allowed only when value not default (#11728)
shwstppr 82625f2
Changed error message when snapshot is not on secondary when trying t…
Tonitzpp f25a4f7
fix: clean magic value, and update if-else to switch (#8848)
cheng102e f13265e
Apply reordered ACL list to VR router (#12525)
sudo87 9cb0f6c
ui: show usage server restart message on usage config change (#11969)
shwstppr d5f5698
CKS: skip default egress policy check for vpc network offerings (#11998)
weizhouapache e4b7719
server: add options for kvm.guest.os.machine.type (#12414)
weizhouapache 2eb53a4
sensitive information leak to log (#12018)
YLChen-007 4ba24fd
Consider secondary storage selectors during cold volume migration (#1…
winterhazel 458b9ce
Bump org.codehaus.mojo:properties-maven-plugin from 1.0-alpha-2 to 1.…
dependabot[bot] 83c0bba
Change to display if public IPs are reserved in the tab (#12461)
Tonitzpp 8f0010a
Add configuration for archiving stale issues (#12293)
DaanHoogland 5cab0f8
Add support for vTPM for XenServer and XCP-ng 8.3/8.4 (#12263)
Pearl1594 b8f59ad
address warnings in capacity manager (#11971)
DaanHoogland 5b22441
server,engine-schema: make config - use.https.to.upload zone scoped (…
shwstppr 57f4185
Improve message "Network is unavailable. Please contact administrator…
daviftorres e5955d2
Bump com.vmware.vapi:vapi-runtime from 2.40.0 to 2.61.2 (#12495)
dependabot[bot] 598c08a
Remove unnecessary stubbings in ManagementServerMaintenanceManagerImp…
harikrishna-patnala e6eb688
gha: fix duplicate key for stale workflow
shwstppr 41a2dab
ui: introduce section-level “advisories” with quick-fix actions (#11763)
shwstppr 5d409d0
api,server: apis return their http request type (#11382)
shwstppr 374fe1e
Change `vmsnapshot.max` setting scope to the account level (#11616)
bernardodemarco ba2901a
ui: add cache for oslogo request using osId (#11422)
shwstppr 3f02773
ui: bump nodejs v24 LTS usage (#12471)
yadvr c7b11c9
Fix url in password reset email (#12078)
sureshanaparti 2a59658
VR: fix dns list in redundant VPC VRs (#12161)
weizhouapache 219399c
ui: allow actions for other users of root admin (#11319)
shwstppr ecd6104
Add the procedure files for insert extensions and update guest os cat…
sureshanaparti 1776926
Fix delete snapshot policy expunged volume (#12474)
Damans227 1dcf89a
Veeam: Use restore timeout as an interval as opposed to a counter (#1…
Pearl1594 03975f1
Show parent snapshot (along with the chain size) for incremental snap…
sureshanaparti a4dcc86
ui: clear selected resource when no items in listview (#11946)
shwstppr ba3d603
ui: allow viewing hosts from management server connected agents (#12149)
shwstppr 6a4f43c
import network acl rules using csv (#12013)
sudo87 46d518b
Fix that Sensitive information logged in SshHelper.sshExecute method …
YLChen-007 8162736
Allow copy of templates from secondary storages of other zone when ad…
harikrishna-patnala c641425
Update alert id for VR public and private interface (#12527)
sureshanaparti a7378e8
Update the snapshot physical size for the primary storage resource af…
sureshanaparti 3741ecc
fix that log sensitive infomation in cmd of script (#12024)
YLChen-007 c3589d3
Usage server should takeover immediately if the other Usage server ha…
abh1sar b1659c1
Add batch deletion support to `removeRawUsageRecords` (#12522)
winterhazel 796c824
Fix KvmSshToAgentEnabled setting description and make it dynamic (#12…
nvazquez 618b6d0
Deployment plan fixes for VM with last host, and last host in mainten…
sureshanaparti 5907152
Add cloud image downloader script (#11918)
sudo87 85f5d07
Fix query filter and units tests (#12184)
GutoVeronezi c2f39d9
server: fix listing resource limits (#12188)
shwstppr b1ca91f
Linstor: support live migration from other primary storage (#12532)
rp- 039e9d1
server: pass network label of physical network when plug nic for priv…
weizhouapache 8f646f9
Fix calculation of the next time that Usage will execute in `removeRa…
winterhazel 7011fb5
pre-commit: fix inconsistent license (#12551)
shwstppr 94ae724
UI: Show applied search filters (#9520)
vishesh92 5fc8c11
kvm: honour disk controller for vm during attach volume (#12452)
shwstppr ef6d62d
api,server: allow configuring repetitive alerts (#11325)
shwstppr 7224af5
Fixed: unnecessary regeneration of SSH keys in developer mode when t…
pavanaravapalli 1a28863
test: increase timeout in test_human_readable_logs.py (#11972)
weizhouapache de90911
Bump org.apache.maven.plugins:maven-war-plugin from 3.4.0 to 3.5.1 (#…
dependabot[bot] 45dd567
api,server: allow cleaning up vm extraconfig (#11974)
shwstppr 4413f6a
Fix mvn warnings (#10909)
vishesh92 3223ada
Add s390x Support for Cloudstack Simulator (#12337)
viddya673 8b43a9b
eofFix
2be8758
engine/schema: prepend algorithm to checksum during systemvm template…
weizhouapache 08b3300
extension: improve host vm power reporting (#11619)
shwstppr 7f5444e
Set CORS headers for both http/https in SSVM apache config (#9389)
salfers 6aa69ca
Restart xl2tpd service when the VPN configuration is modified (#12422)
vishesh92 b5cba90
Update search filter size dynamically (#12552)
vishesh92 077c70f
UI: Prevent extra API calls in search filter on scrolling (#12553)
vishesh92 81e945c
Update physical size for the snapshots of the volumes on ceph primary…
sureshanaparti 892706a
Update storage usage / size in backup usage response (#12539)
sureshanaparti b88a6cb
CSTACKEX-46: Added UTs and variables to pass maxRetries and delay to …
2e8c287
CSTACKEX-46: Removed the unused json dependency from pom.xml
459a5a8
CSTACKEX-46: Added UTs and variables to pass maxRetries and delay to …
835a740
CSTACKEX-46: Removed the unused json dependency from pom.xml
698b4ce
Merge branch 'main' of https://github.com/NetApp/cloudstack into feat…
a6aed97
CSTACKEX-46:removed unrelated changes
5e28662
CSTACKEX-46: Rebase and resolving conflicts
0b4a5d6
Merge remote-tracking branch 'refs/remotes/origin/feature/CSTACKEX-46…
e35f0a1
CSTACKEX-46: Rebase changes
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,8 @@ | |
| import java.util.HashMap; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
| import java.nio.file.Files; | ||
| import java.nio.file.Paths; | ||
|
|
||
| import org.apache.cloudstack.utils.qemu.QemuImg; | ||
| import org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat; | ||
|
|
@@ -96,10 +98,15 @@ public boolean connectPhysicalDisk(String volumeUuid, KVMStoragePool pool, Map<S | |
| String result = iScsiAdmCmd.execute(); | ||
|
|
||
| if (result != null) { | ||
| logger.debug("Failed to add iSCSI target " + volumeUuid); | ||
| System.out.println("Failed to add iSCSI target " + volumeUuid); | ||
| // Node record may already exist from a previous run; accept and proceed | ||
| if (isNonFatalNodeCreate(result)) { | ||
| logger.debug("iSCSI node already exists for {}@{}:{}, proceeding", getIqn(volumeUuid), pool.getSourceHost(), pool.getSourcePort()); | ||
| } else { | ||
| logger.debug("Failed to add iSCSI target " + volumeUuid); | ||
| System.out.println("Failed to add iSCSI target " + volumeUuid); | ||
|
|
||
| return false; | ||
| return false; | ||
| } | ||
| } else { | ||
| logger.debug("Successfully added iSCSI target " + volumeUuid); | ||
| System.out.println("Successfully added to iSCSI target " + volumeUuid); | ||
|
|
@@ -123,21 +130,28 @@ public boolean connectPhysicalDisk(String volumeUuid, KVMStoragePool pool, Map<S | |
| } | ||
| } | ||
|
|
||
| // ex. sudo iscsiadm -m node -T iqn.2012-03.com.test:volume1 -p 192.168.233.10:3260 --login | ||
| iScsiAdmCmd = new Script(true, "iscsiadm", 0, logger); | ||
| final String host = pool.getSourceHost(); | ||
| final int port = pool.getSourcePort(); | ||
| final String iqn = getIqn(volumeUuid); | ||
|
|
||
| // Always try to login; treat benign outcomes as success (idempotent) | ||
| iScsiAdmCmd = new Script(true, "iscsiadm", 0, logger); | ||
| iScsiAdmCmd.add("-m", "node"); | ||
| iScsiAdmCmd.add("-T", getIqn(volumeUuid)); | ||
| iScsiAdmCmd.add("-p", pool.getSourceHost() + ":" + pool.getSourcePort()); | ||
| iScsiAdmCmd.add("-T", iqn); | ||
| iScsiAdmCmd.add("-p", host + ":" + port); | ||
| iScsiAdmCmd.add("--login"); | ||
|
|
||
| result = iScsiAdmCmd.execute(); | ||
|
|
||
| if (result != null) { | ||
| logger.debug("Failed to log in to iSCSI target " + volumeUuid); | ||
| System.out.println("Failed to log in to iSCSI target " + volumeUuid); | ||
| if (isNonFatalLogin(result)) { | ||
| logger.debug("iSCSI login returned benign message for {}@{}:{}: {}", iqn, host, port, result); | ||
| } else { | ||
| logger.debug("Failed to log in to iSCSI target " + volumeUuid + ": " + result); | ||
| System.out.println("Failed to log in to iSCSI target " + volumeUuid); | ||
|
|
||
| return false; | ||
| return false; | ||
| } | ||
| } else { | ||
| logger.debug("Successfully logged in to iSCSI target " + volumeUuid); | ||
| System.out.println("Successfully logged in to iSCSI target " + volumeUuid); | ||
|
|
@@ -158,8 +172,23 @@ public boolean connectPhysicalDisk(String volumeUuid, KVMStoragePool pool, Map<S | |
| return true; | ||
| } | ||
|
|
||
| // Removed sessionExists() call to avoid noisy sudo/iscsiadm session queries that may fail on some setups | ||
|
|
||
| private boolean isNonFatalLogin(String result) { | ||
| if (result == null) return true; | ||
| String msg = result.toLowerCase(); | ||
| // Accept messages where the session already exists | ||
| return msg.contains("already present") || msg.contains("already logged in") || msg.contains("session exists"); | ||
| } | ||
|
|
||
| private boolean isNonFatalNodeCreate(String result) { | ||
| if (result == null) return true; | ||
| String msg = result.toLowerCase(); | ||
| return msg.contains("already exists") || msg.contains("database exists") || msg.contains("exists"); | ||
| } | ||
|
|
||
| private void waitForDiskToBecomeAvailable(String volumeUuid, KVMStoragePool pool) { | ||
| int numberOfTries = 10; | ||
| int numberOfTries = 30; | ||
| int timeBetweenTries = 1000; | ||
|
|
||
| while (getPhysicalDisk(volumeUuid, pool).getSize() == 0 && numberOfTries > 0) { | ||
|
|
@@ -238,6 +267,15 @@ public KVMPhysicalDisk getPhysicalDisk(String volumeUuid, KVMStoragePool pool) { | |
| } | ||
|
|
||
| private long getDeviceSize(String deviceByPath) { | ||
| try { | ||
| if (!Files.exists(Paths.get(deviceByPath))) { | ||
| logger.debug("Device by-path does not exist yet: " + deviceByPath); | ||
| return 0L; | ||
| } | ||
| } catch (Exception ignore) { | ||
| // If FS check fails for any reason, fall back to blockdev call | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets add a logger here |
||
| } | ||
|
|
||
| Script iScsiAdmCmd = new Script(true, "blockdev", 0, logger); | ||
|
|
||
| iScsiAdmCmd.add("--getsize64", deviceByPath); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| <!-- | ||
| 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. | ||
| --> | ||
|
|
||
| # 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.1 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 current version 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 | | ||
|
|
||
| ### Example URL Format | ||
|
|
||
| ``` | ||
| username=admin;password=secretpass;svmName=svm1;protocol=ISCSI;managementLIF=192.168.1.100 | ||
| ``` | ||
|
|
||
| ## 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.