mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 01:32:18 +02:00
server: do not enable the disabled local storage(s) on host connection during mgmt server / agent start (#11722)
This commit is contained in:
parent
963a67b816
commit
823cb00a0a
@ -159,7 +159,9 @@ public class PrimaryDataStoreHelper {
|
||||
pool.setScope(scope.getScopeType());
|
||||
pool.setUsedBytes(existingInfo.getCapacityBytes() - existingInfo.getAvailableBytes());
|
||||
pool.setCapacityBytes(existingInfo.getCapacityBytes());
|
||||
if (pool.getStatus() != StoragePoolStatus.Disabled) {
|
||||
pool.setStatus(StoragePoolStatus.Up);
|
||||
}
|
||||
this.dataStoreDao.update(pool.getId(), pool);
|
||||
this.storageMgr.createCapacityEntry(pool, Capacity.CAPACITY_TYPE_LOCAL_STORAGE, pool.getUsedBytes());
|
||||
return dataStoreMgr.getDataStore(pool.getId(), DataStoreRole.Primary);
|
||||
|
||||
@ -500,7 +500,7 @@ public class CloudStackPrimaryDataStoreLifeCycleImpl extends BasePrimaryDataStor
|
||||
@Override
|
||||
public boolean attachHost(DataStore store, HostScope scope, StoragePoolInfo existingInfo) {
|
||||
DataStore dataStore = dataStoreHelper.attachHost(store, scope, existingInfo);
|
||||
if(existingInfo.getCapacityBytes() == 0){
|
||||
if (existingInfo.getCapacityBytes() == 0) {
|
||||
try {
|
||||
storageMgr.connectHostToSharedPool(hostDao.findById(scope.getScopeId()), dataStore.getId());
|
||||
} catch (StorageUnavailableException ex) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user