mirror of https://github.com/apache/cloudstack.git
parent
05db34bf44
commit
9f072f2f1c
|
|
@ -104,6 +104,10 @@ public class ScaleIOSDCManagerImpl implements ScaleIOSDCManager, Configurable {
|
|||
|
||||
@Override
|
||||
public String prepareSDC(Host host, DataStore dataStore) {
|
||||
if (Boolean.FALSE.equals(ConnectOnDemand.valueIn(host.getDataCenterId()))) {
|
||||
return getConnectedSdc(host, dataStore);
|
||||
}
|
||||
|
||||
String systemId = storagePoolDetailsDao.findDetail(dataStore.getId(), ScaleIOGatewayClient.STORAGE_POOL_SYSTEM_ID).getValue();
|
||||
if (systemId == null) {
|
||||
throw new CloudRuntimeException("Unable to prepare SDC, failed to get the system id for PowerFlex storage pool: " + dataStore.getName());
|
||||
|
|
@ -131,10 +135,6 @@ public class ScaleIOSDCManagerImpl implements ScaleIOSDCManager, Configurable {
|
|||
LOGGER.debug(String.format("SDC %s already connected for the pool: %d on host: %d, no need to prepare/start it", sdcId, poolId, hostId));
|
||||
return sdcId;
|
||||
}
|
||||
if (Boolean.FALSE.equals(ConnectOnDemand.valueIn(host.getDataCenterId()))) {
|
||||
LOGGER.debug("On-demand connect/disconnect disabled, no need to prepare it");
|
||||
return getConnectedSdc(host, dataStore);
|
||||
}
|
||||
|
||||
String storageSystemIdLockString = String.format(POWERFLEX_SDC_SYSTEMID_LOCK_FORMAT, systemId);
|
||||
storageSystemIdLock = GlobalLock.getInternLock(storageSystemIdLockString);
|
||||
|
|
@ -241,6 +241,9 @@ public class ScaleIOSDCManagerImpl implements ScaleIOSDCManager, Configurable {
|
|||
|
||||
@Override
|
||||
public boolean stopSDC(Host host, DataStore dataStore) {
|
||||
if(Boolean.FALSE.equals(ConnectOnDemand.valueIn(host.getDataCenterId()))) {
|
||||
return true;
|
||||
}
|
||||
String systemId = storagePoolDetailsDao.findDetail(dataStore.getId(), ScaleIOGatewayClient.STORAGE_POOL_SYSTEM_ID).getValue();
|
||||
if (systemId == null) {
|
||||
throw new CloudRuntimeException("Unable to unprepare SDC, failed to get the system id for PowerFlex storage pool: " + dataStore.getName());
|
||||
|
|
@ -265,10 +268,6 @@ public class ScaleIOSDCManagerImpl implements ScaleIOSDCManager, Configurable {
|
|||
LOGGER.debug("SDC not connected, no need to unprepare it");
|
||||
return true;
|
||||
}
|
||||
if (Boolean.FALSE.equals(ConnectOnDemand.valueIn(host.getDataCenterId()))) {
|
||||
LOGGER.debug("On-demand connect/disconnect disabled, no need to unprepare it");
|
||||
return true;
|
||||
}
|
||||
|
||||
return unprepareSDCOnHost(host, dataStore);
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Reference in New Issue