harikrishna-patnala commented on a change in pull request #4640:
URL: https://github.com/apache/cloudstack/pull/4640#discussion_r664236652



##########
File path: 
engine/storage/volume/src/main/java/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java
##########
@@ -100,9 +110,48 @@ public boolean hostConnect(long hostId, long poolId) 
throws StorageConflictExcep
         updateStoragePoolHostVOAndDetails(poolVO, hostId, mspAnswer);
 
         if (pool.getPoolType() == Storage.StoragePoolType.DatastoreCluster) {
+            for (ModifyStoragePoolAnswer childDataStoreAnswer : 
((ModifyStoragePoolAnswer) answer).getDatastoreClusterChildren()) {
+                StoragePoolInfo childStoragePoolInfo = 
childDataStoreAnswer.getPoolInfo();
+                StoragePoolVO dataStoreVO = 
primaryStoreDao.findPoolByUUID(childStoragePoolInfo.getUuid());
+                if (dataStoreVO != null) {
+                    continue;
+                }
+                dataStoreVO = new StoragePoolVO();
+                
dataStoreVO.setStorageProviderName(poolVO.getStorageProviderName());
+                dataStoreVO.setHostAddress(childStoragePoolInfo.getHost());
+                dataStoreVO.setPoolType(Storage.StoragePoolType.PreSetup);
+                dataStoreVO.setPath(childStoragePoolInfo.getHostPath());
+                dataStoreVO.setPort(poolVO.getPort());
+                dataStoreVO.setName(childStoragePoolInfo.getName());
+                dataStoreVO.setUuid(childStoragePoolInfo.getUuid());
+                dataStoreVO.setDataCenterId(poolVO.getDataCenterId());
+                dataStoreVO.setPodId(poolVO.getPodId());
+                dataStoreVO.setClusterId(poolVO.getClusterId());
+                dataStoreVO.setStatus(StoragePoolStatus.Up);
+                dataStoreVO.setUserInfo(poolVO.getUserInfo());
+                dataStoreVO.setManaged(poolVO.isManaged());
+                dataStoreVO.setCapacityIops(poolVO.getCapacityIops());
+                
dataStoreVO.setCapacityBytes(childDataStoreAnswer.getPoolInfo().getCapacityBytes());
+                
dataStoreVO.setUsedBytes(childDataStoreAnswer.getPoolInfo().getCapacityBytes() 
- childDataStoreAnswer.getPoolInfo().getAvailableBytes());
+                dataStoreVO.setHypervisor(poolVO.getHypervisor());
+                dataStoreVO.setScope(poolVO.getScope());
+                dataStoreVO.setParent(poolVO.getId());

Review comment:
       yes @sureshanaparti these are not part of this PR. This might have 
happened while rebasing @Spaceman1984 please check with the latest main and 
rebase it appropriately. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to