Skip to content

Commit 3f400a4

Browse files
update changes, to not remove/disconnect MDMs on maintenance
1 parent bf5755e commit 3f400a4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/driver/ScaleIOPrimaryDataStoreDriver.java

+6
Original file line numberDiff line numberDiff line change
@@ -1497,6 +1497,12 @@ public boolean canDisconnectHostFromStoragePool(Host host, StoragePool pool) {
14971497
return false;
14981498
}
14991499

1500+
List<StoragePoolHostVO> poolHostVOsBySdc = storagePoolHostDao.findByLocalPath(sdcId);
1501+
if (CollectionUtils.isNotEmpty(poolHostVOsBySdc) && poolHostVOsBySdc.size() > 1) {
1502+
logger.debug(String.format("There are other connected pools with the same SDC of the host %s, shouldn't disconnect SDC", host));
1503+
return false;
1504+
}
1505+
15001506
try {
15011507
final ScaleIOGatewayClient client = getScaleIOClient(pool);
15021508
return client.listVolumesMappedToSdc(sdcId).isEmpty();

0 commit comments

Comments
 (0)