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_r178147553
##########
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:
There is only one method that currently calls
verifyAllHostsMountedDatastore2. If it times out (after two minutes of calling
verifyAllHostsMountedDatastore2 every five seconds), then it throws an
exception with details.
----------------------------------------------------------------
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