You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2018/03/29 18:16:55 UTC

[GitHub] mike-tutkowski commented on a change in pull request #2503: Support multiple volume access groups per compute cluster

mike-tutkowski 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_r178140585
 
 

 ##########
 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:
   @rafaelweingartner We could do that, but it's not technically a problem at this point in execution. For example, when we create a datastore on an iSCSI target, it can take up to 30 seconds or so for each host in the cluster to mount the new VMFS volume. When this code returns false, it is just telling the calling code that the VMFS volume is not mounted all all hosts in the cluster. The calling code will wait a bit longer and then re-invoke this method to see if the VMFS volume is now mounted on all hosts in the cluster. At two minutes of trying and failing, the calling code stops invoking this method and just fails the operation.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services