Skip to content

Fix for NFS3 primary storage pool is failing to come out of maintenan…#71

Open
sandeeplocharla wants to merge 1 commit into
mainfrom
feature/CSTACKEX-146
Open

Fix for NFS3 primary storage pool is failing to come out of maintenan…#71
sandeeplocharla wants to merge 1 commit into
mainfrom
feature/CSTACKEX-146

Conversation

@sandeeplocharla

Copy link
Copy Markdown
Collaborator

…ce mode

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?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the KVM storage pool deletion flow to properly handle the deleteStoragePool(uuid, details) code path (notably for libvirt-backed pools), which previously could fall back to the StorageAdaptor default implementation and skip actual deletion.

Changes:

  • Added a LibvirtStorageAdaptor#deleteStoragePool(String, Map<String,String>) override to route to the existing libvirt deletion logic.
  • Adjusted KVMStoragePoolManager#deleteStoragePool(type, uuid, details) ordering around deletion vs HA monitor removal.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java Adds an overload so deletion with details actually invokes libvirt pool removal logic.
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java Changes when the adaptor delete call is executed relative to HA monitor removal for NFS pools.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 428 to 432
StorageAdaptor adaptor = getStorageAdaptor(type);
boolean deleteStatus = adaptor.deleteStoragePool(uuid, details);
if (type == StoragePoolType.NetworkFilesystem) {
_haMonitor.removeStoragePool(uuid);
}

public boolean deleteStoragePool(StoragePoolType type, String uuid, Map<String, String> details) {
StorageAdaptor adaptor = getStorageAdaptor(type);
boolean deleteStatus = adaptor.deleteStoragePool(uuid, details);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

please add brief comment about this change


public boolean deleteStoragePool(StoragePoolType type, String uuid, Map<String, String> details) {
StorageAdaptor adaptor = getStorageAdaptor(type);
boolean deleteStatus = adaptor.deleteStoragePool(uuid, details);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Also, update testing section

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