Repository navigation
[CSTACKEX-328] QoS Support Part 2 - #121
suryag1201 wants to merge 7 commits into
Conversation
sandeeplocharla
left a comment
There was a problem hiding this comment.
Please add 'info/debug' loggers everywhere. And add some testing done section and screenshots for the exception changes done?
Also, do update the feature severity and other details in the PR description.
Apart from these I'm good with the changes
| maxIops = 0L; | ||
| } else { | ||
| if (minIops == null || minIops <= 0) { | ||
| if (minIops == null || minIops < 0) { |
There was a problem hiding this comment.
Why do we want to allow 0 for minIops?
There was a problem hiding this comment.
For FAS, we need to set 0 as a min IOPS
but UI is allowing this during VM create time but not volume create, resize and disk offering change time.
| type: 'number', | ||
| validator: async (rule, value) => { | ||
| if (value && (isNaN(value) || value <= 0)) { | ||
| if (value && (isNaN(value) || Number(value) < 0)) { |
There was a problem hiding this comment.
why do we need the typecasting here?
| miniops: [{ | ||
| validator: async (rule, value) => { | ||
| if (value && (isNaN(value) || value <= 0)) { | ||
| if (value && (isNaN(value) || Number(value) < 0)) { |
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 24.86% |
| Branch coverage | 19.03% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 24.86% |
| Branch coverage | 19.02% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 24.86% |
| Branch coverage | 19.03% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
5fcdc44 to
d402fb6
Compare
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 24.86% |
| Branch coverage | 19.02% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
| } | ||
| if (min > 0 && max > 0 && min > max) { | ||
| throw new CloudRuntimeException("Minimum IOPS cannot be greater than maximum IOPS"); | ||
| if (min > 0 && max > 0 && min >= max) { |
There was a problem hiding this comment.
why is this equal to restriction ? does ontap not allow this ? or for basic hygiene purpose ?
There was a problem hiding this comment.
ontap allows but we keept this for basic hygiene purpose
| return null; | ||
| if (cloudstackVolume == null || cloudstackVolume.getLun() == null | ||
| || cloudstackVolume.getLun().getUuid() == null) { | ||
| throw new CloudRuntimeException("Invalid iSCSI volume QoS update request"); |
There was a problem hiding this comment.
I think this method is intended to update any attribute of lun not necessarily qos only, please remove the qos logger. I see the same in UnifiedNASStrategy also.
| throw new CloudRuntimeException("Invalid iSCSI volume QoS update request"); | ||
| } | ||
| Lun lunUpdate = new Lun(); | ||
| lunUpdate.setQosPolicy(cloudstackVolume.getLun().getQosPolicy()); |
There was a problem hiding this comment.
I think , qos update or other update should be a private mtethod and this method should be responsible to call ONTAP API for patch.
There was a problem hiding this comment.
For file case, we have to make diff call to attach a QoS but for lun, we can pass in the same request also as ONTAP accepts that.
otherwise it will be 2 diff call on for ISCSI, 1st of create/clone and 2nd for attach
| } | ||
|
|
||
| StorageStrategy storageStrategy = OntapStorageUtils.getStrategyByStoragePoolDetails(details); | ||
| boolean iscsi = isIscsi(details); |
There was a problem hiding this comment.
poolProtocol already has the protocol, right? do we need this again?
There was a problem hiding this comment.
we get the protocol info but we have to compare with NFS, ISCSI string so that we know this is ISCSI protocol,
So this method call is fine
| void testUpdateCloudStackVolume_InvalidRequest_ThrowsException() { | ||
| CloudRuntimeException ex = assertThrows(CloudRuntimeException.class, | ||
| () -> unifiedSANStrategy.updateCloudStackVolume(new CloudStackVolume())); | ||
| assertTrue(ex.getMessage().contains("Invalid iSCSI volume QoS update request")); |
There was a problem hiding this comment.
Did this test go through? The message content looks different from that in the implementation.
| miniops: [{ | ||
| validator: async (rule, value) => { | ||
| if (value && (isNaN(value) || value <= 0)) { | ||
| if (value && (isNaN(value) || value < 0)) { |
There was a problem hiding this comment.
Can you add this change in other DiskOffering forms also?
There was a problem hiding this comment.
bcz cloudstack does not support min as 0, so i have not included the disk offering and included the resize, create Volume screens only but this point is valid, we can check on this
…ate for min IOPS and delete QoS
4baa76f to
8a24278
Compare
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 25.78% |
| Branch coverage | 20.07% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
sandeeplocharla
left a comment
There was a problem hiding this comment.
Let's discuss allowing minIops=0 in other disk offering forms next week.
Description
Following changes are included:
1- Change Disk Offering
2- Accept Min as zero in create volume, resize volume and change disk offering for min iops field
3- Delete QoS
4- Create Volume from Snapshot with QoS
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
1- Created a VM with root on AFF with custom IOPS - Success
2- Created a VM with root on FAS with custom IOPS with min 0 and max 1000 - Success
3- Created a VM with root on FAS with custom IOPS with min 100 and max 1000 - Throw error on UI, Expected Behaviour
4- Created a VM with root on AFF with Fix IOPS - Success
5- Created a VM with root on FAS with Fix IOPS with min 100 and max 1000 - Throw error on UI, Expected Behaviour
6- Created a volume with Custom IOPS on AFF with min 200 and max 400 and attache to VM- success
7- Created a volume with Custom IOPS on FAS with min 0 and max 400 and attache to VM - success
8- Created a Volume on FAS with Fix IOPS with min 100 and max 1000 - Throw error on UI, Expected Behaviour
9- Resize the Volume and change the QoS IOPS for AFF- Success
10- Resize the Volume and change the QoS IOPS for FAS with min 0 - Success
11- Resize the Volume and change the QoS IOPS for FAS with min 100 - Throw error on UI, Expected Behaviour
12- Change Disk Offering - Change from Custom to Fix on AFF - Success
13- Change Disk Offering - Change from Custom to Fix on FAS with min > 0 - Throw error on UI, Expected Behaviour
14- Change Disk Offering - Change from Fix to Custom on AFF - Success
15- Change Disk Offering - Change from Custom to Custom on FAS with min with 0 - Success
16- Delete VM - Delete QoS Policy - Success
17- Delete Volume - Delete QoS Policy - Success
18- Snapshot: Create a Snapshot of a volume which has QoS and created a volume from snapshot - success
How did you try to break this feature and the system with this change?