Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ public void addStoragePool(HAStoragePool pool) {
}
}

public void unregisterStoragePool(String uuid) {
synchronized (haStoragePools) {
haStoragePools.remove(uuid);
}
}

public void removeStoragePool(String uuid) {
synchronized (haStoragePools) {
HAStoragePool pool = haStoragePools.get(uuid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,12 @@ public synchronized boolean deleteStoragePool(StoragePoolType type, String uuid)

public boolean deleteStoragePool(StoragePoolType type, String uuid, Map<String, String> details) {
StorageAdaptor adaptor = getStorageAdaptor(type);
// For NetworkFilesystem, libvirt will take care of unmounting the nfs mount. If nfs mount has been removed before libvirt's pool
// delete, libvirt will throw an error.
boolean deleteStatus = adaptor.deleteStoragePool(uuid, details);
boolean deleteStatus;
if (type == StoragePoolType.NetworkFilesystem) {
_haMonitor.removeStoragePool(uuid);
_haMonitor.unregisterStoragePool(uuid);
deleteStatus = adaptor.deleteStoragePool(uuid);
} else {
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.

you removed this method in below change ?

@sandeeplocharla sandeeplocharla Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it was suggested on the PR (Ref: apache#13897 (comment))

@rajiv-jain-netapp rajiv-jain-netapp Oct 22, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

but you are still calling this method at line number 465

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

For NFS case, adaptor.deleteStoragePool(uuid) has to be called, while for all other pool types adaptor.deleteStoragePool(uuid, details) has to be called.

}
synchronized (_storagePools) {
_storagePools.remove(uuid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -891,11 +891,6 @@ private boolean destroyStoragePoolHandleException(Connect conn, String uuid)
return false;
}

@Override
public boolean deleteStoragePool(String uuid, Map<String, String> details) {
return deleteStoragePool(uuid);
}

@Override
public boolean deleteStoragePool(String uuid) {
logger.info("Attempting to remove storage pool " + uuid + " from libvirt");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ public PrimaryDataStoreInfo updateStoragePool(UpdateStoragePoolCmd cmd) throws I
if (capacityBytes != null) {
if (capacityBytes != pool.getCapacityBytes()) {
updatedCapacityBytes = capacityBytes;
details.put(PrimaryDataStoreLifeCycle.CAPACITY_BYTES, String.valueOf(updatedCapacityBytes));
details.put(PrimaryDataStoreLifeCycle.CAPACITY_BYTES, String.valueOf(updatedCapacityBytes));
changes = true;
}
}
Expand All @@ -1286,7 +1286,7 @@ public PrimaryDataStoreInfo updateStoragePool(UpdateStoragePoolCmd cmd) throws I
if (capacityIops != null) {
if (!capacityIops.equals(pool.getCapacityIops())) {
updatedCapacityIops = capacityIops;
details.put(PrimaryDataStoreLifeCycle.CAPACITY_IOPS, String.valueOf(updatedCapacityIops));
details.put(PrimaryDataStoreLifeCycle.CAPACITY_IOPS, String.valueOf(updatedCapacityIops));
changes = true;
}
}
Expand Down
Loading