mirror of https://github.com/apache/cloudstack.git
Back port fixes from upstream 4.19 (#466)
* Fixed src datastore on copy check for PowerFlex/ScaleIO storage driver (#9310) * Ignore non-managed pools for storage pool access preparation (#9376)
This commit is contained in:
parent
5c682677fc
commit
d1faa59677
|
|
@ -1182,7 +1182,7 @@ public class ScaleIOPrimaryDataStoreDriver implements PrimaryDataStoreDriver {
|
|||
|
||||
@Override
|
||||
public boolean canCopy(DataObject srcData, DataObject destData) {
|
||||
DataStore srcStore = destData.getDataStore();
|
||||
DataStore srcStore = srcData.getDataStore();
|
||||
DataStore destStore = destData.getDataStore();
|
||||
if ((srcStore.getRole() == DataStoreRole.Primary && (srcData.getType() == DataObjectType.TEMPLATE || srcData.getType() == DataObjectType.VOLUME))
|
||||
&& (destStore.getRole() == DataStoreRole.Primary && destData.getType() == DataObjectType.VOLUME)) {
|
||||
|
|
|
|||
|
|
@ -2327,14 +2327,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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue