Commit 104b769
[CSTACKEX-216] Review Comments for Igroup Name Length (#79)
### Description
Issue: "getIgroupName() truncates the full "cs__" string as a whole. If
svmName is long, this can truncate away most or all of the hostUuid
portion, increasing the chance of igroup name collisions across
different hosts (and also throws a NullPointerException if hostUuid is
null). Consider validating inputs and truncating svmName first so the
host UUID remains intact (or, if hostUuid itself is too long, truncate
only the UUID)."
Fix: In typical deployments, truncation likely never triggers bcz total
length will remain less than 96. But to avoid any issues for future
where svm limits get exceeded, will change the igroup format to
cs_hostUuid_svmName
Note: This is a breaking change for existing deployments. Igroups
already on ONTAP use the old format (cs_svm1_hostname). After this
change, CloudStack will look for cs_<uuid>_svm1 and may not find
existing igroup
<!---
*******************************************************************************
-->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE
DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!---
*******************************************************************************
-->
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] Build/CI
- [ ] Test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
### Screenshots (if appropriate):
<img width="1383" height="321" alt="image"
src="https://github.com/user-attachments/assets/d051a3d3-7069-4936-a21c-d53b1ba368f6"
/>
<img width="1505" height="766" alt="image"
src="https://github.com/user-attachments/assets/128256ef-d000-41a3-9359-78f48d45eced"
/>
### How Has This Been Tested?
1- Created 1st VM on ISCSI Storage pool - Igroup got create with new
name format attached a screen shot and lun got mapped
2- Create 2nd VM on same storage pool - Igroup got reused and lun got
mapped
3- Storage Pool to enter maintenance mode - All Luns got unmapped and
igroup also got deleted
4- Storage Pool to cancel maintenance mode - New Igroup got created with
same name format and All Luns got mapped again.
5-Create a new CloudStack volume and attched to the instance - used the
existing igroup and mapped the lun
6- Delete All VMs - Igroup got deleted
#### How did you try to break this feature and the system with this
change?
<!-- see how your change affects other areas of the code, etc. -->
<!-- Please read the
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
document -->
Co-authored-by: Gupta, Surya <Surya.Gupta@netapp.com>1 parent a59b49e commit 104b769
2 files changed
Lines changed: 8 additions & 8 deletions
File tree
- plugins/storage/volume/ontap/src
- main/java/org/apache/cloudstack/storage/utils
- test/java/org/apache/cloudstack/storage/utils
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments