Skip to content

CSTACKEX-114: Delete volume or qcow2 file NFS#32

Merged
piyush5netapp merged 6 commits intomainfrom
feature/CSTACKEX-114
Feb 17, 2026
Merged

CSTACKEX-114: Delete volume or qcow2 file NFS#32
piyush5netapp merged 6 commits intomainfrom
feature/CSTACKEX-114

Conversation

@piyush5netapp
Copy link

@piyush5netapp piyush5netapp commented Feb 10, 2026

Description

This PR...

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?

How did you try to break this feature and the system with this change?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

}
Map<String, String> details = storagePoolDetailsDao.listDetailsKeyPairs(store.getId());
if (ProtocolType.NFS3.name().equalsIgnoreCase(details.get(Constants.PROTOCOL))) {
// ManagedNFS qcow2 backing file deletion handled by KVM host/libvirt; nothing to do via ONTAP REST.

Choose a reason for hiding this comment

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

you can keep this comment since this stands valid

@github-actions
Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

}
}

private Answer deleteVolumeOnKVMHost(DataObject volumeInfo) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a way to include this in cloudstack core code, instead of having it here?
This looks like a good candidate for contributing to the community.

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.

  1. add the test cases you ran and update the JUnit coverage after the unit test changes.
  2. Include the test cases you executed and refresh the JUnit coverage following the recent unit test updates."

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.

Some comments, but they should not block this merge. Let's ensure we track these comment changes as part of jira task.


} else if (ProtocolType.NFS3.name().equalsIgnoreCase(details.get(Constants.PROTOCOL))) {
// For NFS, the hypervisor handles file creation; we only track pool association
createCmdResult = new CreateCmdResult(volInfo.getUuid(), new Answer(null, true, null));

Choose a reason for hiding this comment

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

these has to be refactored using strategy patterns. please create a task in the back log to be picked without fail.

String svmName = details.get(Constants.SVM_NAME);
String cloudStackVolumeName = volumeDetailsDao.findDetail(volumeVO.getId(), Constants.LUN_DOT_NAME).getValue();

if (ProtocolType.ISCSI.name().equalsIgnoreCase(details.get(Constants.PROTOCOL))) {

Choose a reason for hiding this comment

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

@sandeeplocharla @piyush5netapp these have to be handled with strategy implementation we already have instead if-else for protocol.

port = Constants.NFS3_PORT;
s_logger.info("Setting NFS path for storage pool: " + path + ", port: " + port);
// Force NFSv3 for ONTAP managed storage to avoid NFSv4 ID mapping issues
details.put("nfsmountopts", "vers=3");

Choose a reason for hiding this comment

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

lets put hardcoding in constants

@piyush5netapp
Copy link
Author

Create Jira https://jira.ngage.netapp.com/browse/CSTACKEX-119 to track the review comments.

@piyush5netapp piyush5netapp merged commit eace4ee into main Feb 17, 2026
16 checks passed
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