Skip to content

Commit f2d41f8

Browse files
committed
Update 11773: update db only
1 parent 4313060 commit f2d41f8

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

engine/components-api/src/main/java/com/cloud/storage/StorageManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ static Boolean getFullCloneConfiguration(Long storeId) {
294294

295295
Answer sendToPool(StoragePool pool, long[] hostIdsToTryFirst, Command cmd) throws StorageUnavailableException;
296296

297+
void updateStoragePoolHostVOAndBytes(StoragePool pool, long hostId, ModifyStoragePoolAnswer mspAnswer);
298+
297299
CapacityVO getSecondaryStorageUsedStats(Long hostId, Long zoneId);
298300

299301
CapacityVO getStoragePoolUsedStats(Long poolId, Long clusterId, Long podId, Long zoneId);

server/src/main/java/com/cloud/storage/StorageManagerImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2688,7 +2688,8 @@ private void handleRemoveChildStoragePoolFromDatastoreCluster(Set<String> childD
26882688

26892689
}
26902690

2691-
private void updateStoragePoolHostVOAndBytes(StoragePool pool, long hostId, ModifyStoragePoolAnswer mspAnswer) {
2691+
@Override
2692+
public void updateStoragePoolHostVOAndBytes(StoragePool pool, long hostId, ModifyStoragePoolAnswer mspAnswer) {
26922693
StoragePoolHostVO poolHost = _storagePoolHostDao.findByPoolHost(pool.getId(), hostId);
26932694
if (poolHost == null) {
26942695
poolHost = new StoragePoolHostVO(pool.getId(), hostId, mspAnswer.getPoolInfo().getLocalPath().replaceAll("//", "/"));

server/src/main/java/com/cloud/storage/StoragePoolAutomationImpl.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,7 @@ public boolean cancelMaintain(DataStore store) {
346346
if (logger.isDebugEnabled()) {
347347
logger.debug("ModifyStoragePool add succeeded");
348348
}
349-
try {
350-
storageManager.connectHostToSharedPool(host, pool.getId());
351-
} catch (Exception e) {
352-
logger.warn("Unable to establish a connection between {} and {}", host, pool, e);
353-
}
349+
storageManager.updateStoragePoolHostVOAndBytes(pool, host.getId(), (ModifyStoragePoolAnswer) answer);
354350
if (pool.getPoolType() == Storage.StoragePoolType.DatastoreCluster) {
355351
logger.debug("Started synchronising datastore cluster storage pool {} with vCenter", pool);
356352
storageManager.syncDatastoreClusterStoragePool(pool.getId(), ((ModifyStoragePoolAnswer) answer).getDatastoreClusterChildren(), host.getId());

0 commit comments

Comments
 (0)