shwstppr commented on code in PR #12678:
URL: https://github.com/apache/cloudstack/pull/12678#discussion_r2839014797


##########
server/src/main/java/com/cloud/storage/StorageManagerImpl.java:
##########
@@ -3990,6 +3993,37 @@ public ImageStore discoverImageStore(String name, String 
url, String providerNam
             throw new CloudRuntimeException("Failed to add data store: " + 
e.getMessage(), e);
         }
 
+        // Validate secondary storage mount immediately using SSVM
+if (zoneId != null) {
+    List<HostVO> ssvmHosts = _hostDao.listByType(Host.Type.SecondaryStorageVM);
+    boolean mountSuccess = false;
+    String failureReason = "No Secondary Storage VM available to validate the 
NFS mount.";
+
+    for (HostVO ssvm : ssvmHosts) {
+        if (ssvm.getDataCenterId() != zoneId.longValue()) {
+            continue;
+        }
+

Review Comment:
   The whole validation could be a separate method.
   And could it be an issue for a newly deployed zone which will not have a 
SSVM until a secondary store is added?



-- 
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