Ignore non-managed pools for storage pool access preparation (#9376)

This commit is contained in:
Suresh Kumar Anaparti 2024-07-14 14:50:26 +05:30 committed by GitHub
parent c71ab9598e
commit d9f77b841c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2788,14 +2788,10 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
@Override
public boolean canHostPrepareStoragePoolAccess(Host host, StoragePool pool) {
if (host == null || pool == null) {
if (host == null || pool == null || !pool.isManaged()) {
return false;
}
if (!pool.isManaged()) {
return true;
}
DataStoreProvider storeProvider = _dataStoreProviderMgr.getDataStoreProvider(pool.getStorageProviderName());
DataStoreDriver storeDriver = storeProvider.getDataStoreDriver();
return storeDriver instanceof PrimaryDataStoreDriver && ((PrimaryDataStoreDriver)storeDriver).canHostPrepareStoragePoolAccess(host, pool);