FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[CSTACKEX-328] QoS Support Part 2 by suryag1201 · Pull Request #121 · NetApp/cloudstack · GitHub

Repository navigation

[CSTACKEX-328] QoS Support Part 2 - #121

Merged
suryag1201 merged 10 commits into
mainfrom
feature/CSTACKEX-328
Oct 26, 2026
Merged

suryag1201 merged 10 commits into
mainfrom
feature/CSTACKEX-328

Conversation

suryag1201 commented Oct 13, 2026 •
edited
Loading

Copy link
Copy Markdown

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

  • 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):

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?

sandeeplocharla left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why do we want to allow 0 for minIops?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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)) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

why do we need the typecasting here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

fixed

Comment thread ui/src/views/storage/CreateVolume.vue Outdated
miniops: [{
validator: async (rule, value) => {
if (value && (isNaN(value) || value <= 0)) {
if (value && (isNaN(value) || Number(value) < 0)) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Even here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

fixed

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

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

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

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

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

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

suryag1201 force-pushed the feature/CSTACKEX-328 branch from 5fcdc44 to d402fb6 Compare October 15, 2026 08:58

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

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) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

why is this equal to restriction ? does ontap not allow this ? or for basic hygiene purpose ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

ontap allows but we keept this for basic hygiene purpose

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

i have modified the code now, it will accept min == max also

return null;
if (cloudstackVolume == null || cloudstackVolume.getLun() == null
|| cloudstackVolume.getLun().getUuid() == null) {
throw new CloudRuntimeException("Invalid iSCSI volume QoS update request");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

fixed

throw new CloudRuntimeException("Invalid iSCSI volume QoS update request");
}
Lun lunUpdate = new Lun();
lunUpdate.setQosPolicy(cloudstackVolume.getLun().getQosPolicy());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think , qos update or other update should be a private mtethod and this method should be responsible to call ONTAP API for patch.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

fixed

}

StorageStrategy storageStrategy = OntapStorageUtils.getStrategyByStoragePoolDetails(details);
boolean iscsi = isIscsi(details);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

poolProtocol already has the protocol, right? do we need this again?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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"));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Did this test go through? The message content looks different from that in the implementation.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

fixed

miniops: [{
validator: async (rule, value) => {
if (value && (isNaN(value) || value <= 0)) {
if (value && (isNaN(value) || value < 0)) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can you add this change in other DiskOffering forms also?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

suryag1201 force-pushed the feature/CSTACKEX-328 branch from 4baa76f to 8a24278 Compare October 16, 2026 05:59

github-actions Bot commented Oct 16, 2026 •
edited
Loading

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 25.77%
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Let's discuss allowing minIops=0 in other disk offering forms next week.

}
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) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I have checked from cloudstack side and it is accepting that so i have added the fix.

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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

what would happen if exception is other than fiegn exception? what is the impact on the workflow?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

fixed

suryag1201 merged commit a55d982 into main Oct 26, 2026
12 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL