Skip to content

Conversation

@sandeeplocharla
Copy link
Collaborator

@sandeeplocharla sandeeplocharla commented Jan 9, 2026

Description

This PR...
Has changes to choose an aggregate based on the max available space while creating ontap volume for Primary StoragePool creation.

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?

Test-1: With Default aggregate sizes in 2vSim ONTAP Cluster
Screenshot 2026-01-12 at 9 52 41 AM
Screenshot 2026-01-12 at 9 53 02 AM
Test-2: After expanding one aggr's size
Screenshot 2026-01-12 at 10 18 12 AM
Screenshot 2026-01-12 at 10 18 50 AM

@sandeeplocharla sandeeplocharla self-assigned this Jan 9, 2026
throw new CloudRuntimeException("No aggregates are assigned to SVM " + svmName);
}
// Set the aggregates which are according to the storage requirements
int maxAvailableAggregateSpace = storage.getSize().intValue();

Choose a reason for hiding this comment

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

Since size isn’t assigned before connect executes, the process cannot succeed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Storage is already assigned but the other comment makes sense, aggregate selection should be in Volume creation code. So, have modified the code accordingly

Choose a reason for hiding this comment

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

Let’s go over the code in the scrum meeting. My review was limited to the merged changes and the code review raised, so I’d appreciate your input on the code as it appears in your IDE.

// Set the aggregates which are according to the storage requirements
int maxAvailableAggregateSpace = storage.getSize().intValue();
Aggregate aggrChosen = null;
for (Aggregate aggr : aggrs) {

Choose a reason for hiding this comment

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

Why does the connect method handle aggregate selection? This logic should ideally reside in the volume creation process.

Copy link

@rajiv-jain-netapp rajiv-jain-netapp left a comment

Choose a reason for hiding this comment

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

lets have online review

}
// TODO: Implement logic to select appropriate aggregate based on storage requirements

List<Aggregate> aggrs = svm.getAggregates();

Choose a reason for hiding this comment

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

Let’s test both scenarios: a direct SVM case and an SVM onboarded with cluster credentials. In the latter, the SVM may not have aggregates explicitly assigned but should still be able to access available aggregates within the cluster.

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.

3 participants