dhslove commented on a change in pull request #5862:
URL: https://github.com/apache/cloudstack/pull/5862#discussion_r795032903



##########
File path: 
plugins/storage/volume/default/src/main/java/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
##########
@@ -162,10 +168,18 @@ public DataStore initialize(Map<String, Object> dsInfos) {
                     throw new InvalidParameterValueException("host or path is 
null, should be sharedmountpoint://localhost/path");
                 }
             } else if (uri.getScheme().equalsIgnoreCase("rbd")) {
+                String uriHost = uri.getHost();
                 String uriPath = uri.getPath();
                 if (uriPath == null) {
                     throw new InvalidParameterValueException("host or path is 
null, should be rbd://hostname/pool");
                 }
+                if (multi) {
+                    String multiHost = uriHost + (uriPath.substring(0, 
uriPath.lastIndexOf("/")).replaceAll("/", ","));
+                    String[] hostArr = multiHost.split(",");
+                    if (hostArr.length > 5) {
+                        throw new InvalidParameterValueException("RADOS 
monitor can support up to 5.");

Review comment:
       @GutoVeronezi   I modified the code as you requested.




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