| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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
Sorry, something went wrong.
| 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?
Sorry, something went wrong.
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.
Sorry, something went wrong.
| 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?
Sorry, something went wrong.
There was a problem hiding this comment.
fixed
Sorry, something went wrong.
| miniops: [{ | ||
| validator: async (rule, value) => { | ||
| if (value && (isNaN(value) || value <= 0)) { | ||
| if (value && (isNaN(value) || Number(value) < 0)) { |
There was a problem hiding this comment.
Even here
Sorry, something went wrong.
There was a problem hiding this comment.
fixed
Sorry, something went wrong.
🔴 Test Coverage Grade: D — Marginal
Grade Scale
|
Sorry, something went wrong.
🔴 Test Coverage Grade: D — Marginal
Grade Scale
|
Sorry, something went wrong.
🔴 Test Coverage Grade: D — Marginal
Grade Scale
|
Sorry, something went wrong.
🔴 Test Coverage Grade: D — Marginal
Grade Scale
|
Sorry, something went wrong.
| } | ||
| 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 ?
Sorry, something went wrong.
There was a problem hiding this comment.
ontap allows but we keept this for basic hygiene purpose
Sorry, something went wrong.
There was a problem hiding this comment.
i have modified the code now, it will accept min == max also
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
There was a problem hiding this comment.
fixed
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
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
Sorry, something went wrong.
There was a problem hiding this comment.
Have a lun check for qospolicy here so that we call patch of lun only when someone is passing qospolicy, same for nasstrategy. Without null check we are forcing caller of this method to pass qos policy.
Sorry, something went wrong.
There was a problem hiding this comment.
fixed
Sorry, something went wrong.
| } | ||
|
|
||
| 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?
Sorry, something went wrong.
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
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
There was a problem hiding this comment.
fixed
Sorry, something went wrong.
| 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?
Sorry, something went wrong.
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
Sorry, something went wrong.
…ate for min IOPS and delete QoS
🔴 Test Coverage Grade: D — Marginal
Grade Scale
|
Sorry, something went wrong.
There was a problem hiding this comment.
Let's discuss allowing minIops=0 in other disk offering forms next week.
Sorry, something went wrong.
| } | ||
| 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.
As discussed, let's confirm the equality check. If CloudStack supports min = max, we should not block this configuration, as ONTAP supports it as well.
Sorry, something went wrong.
There was a problem hiding this comment.
I have checked from cloudstack side and it is accepting that so i have added the fix.
Sorry, something went wrong.
| getAuthHeader(), cloudstackVolume.getLun().getUuid(), lunUpdate); | ||
| pollJobIfPresent(response, "update QoS policy on LUN [" + cloudstackVolume.getLun().getUuid() + "]"); | ||
| } catch (FeignException e) { | ||
| throw new CloudRuntimeException("Failed to apply QoS policy to LUN: " + e.getMessage(), e); |
There was a problem hiding this comment.
what would happen if exception is other than fiegn exception? what is the impact on the workflow?
Sorry, something went wrong.
There was a problem hiding this comment.
fixed
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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?