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_r178035358
##########
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:
What about a log here to show the admin when a data storage is either not
mounted or not accessible?
----------------------------------------------------------------
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