rafaelweingartner commented on a change in pull request #2503: Support multiple 
volume access groups per compute cluster
URL: https://github.com/apache/cloudstack/pull/2503#discussion_r178145283
 
 

 ##########
 File path: 
plugins/hypervisors/vmware/src/main/java/com/cloud/storage/resource/VmwareStorageProcessor.java
 ##########
 @@ -2684,6 +2701,30 @@ private boolean 
verifyAllHostsMountedDatastore(List<Pair<ManagedObjectReference,
         return lstHosts.size() == numHostsChecked;
     }
 
+    private boolean verifyAllHostsMountedDatastore2(List<HostMO> lstHosts, 
DatastoreMO dsMO) throws Exception {
+        int numHostsChecked = 0;
+
+        for (HostMO hostToMatchMO : lstHosts) {
+            List<DatastoreHostMount> datastoreHostMounts = 
dsMO.getHostMounts();
+
+            for (DatastoreHostMount datastoreHostMount : datastoreHostMounts) {
+                ManagedObjectReference morHost = datastoreHostMount.getKey();
+                HostMO hostMO = new HostMO(dsMO.getContext(), morHost);
+
+                if (hostMO.getHostName().equals(hostToMatchMO.getHostName())) {
+                    if (datastoreHostMount.getMountInfo().isMounted() && 
datastoreHostMount.getMountInfo().isAccessible()) {
+                        numHostsChecked++;
+                    }
+                    else {
 
 Review comment:
   I know it is not a problem, but it felt like a good thing to log. 
   I mean, I did not check others methods that use this block of code to see if 
they would log meaningful messages in case of a false return here. Reading your 
explanation it seems that when the operation fails there is some sort of 
logging to help administrators to understand the problem.  If that is the case, 
I agree that we do not need to add anything here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to