Skip to content
Open
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 @@ -417,7 +417,7 @@ public boolean deleteStoragePool(StoragePoolType type, String uuid) {
if (type == StoragePoolType.NetworkFilesystem) {
_haMonitor.removeStoragePool(uuid);
}
boolean deleteStatus = adaptor.deleteStoragePool(uuid);;
boolean deleteStatus = adaptor.deleteStoragePool(uuid);
synchronized (_storagePools) {
_storagePools.remove(uuid);
}
Expand All @@ -426,10 +426,12 @@ public 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);
if (type == StoragePoolType.NetworkFilesystem) {
_haMonitor.removeStoragePool(uuid);
}
boolean deleteStatus = adaptor.deleteStoragePool(uuid, details);
synchronized (_storagePools) {
_storagePools.remove(uuid);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,11 @@ 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