epugh commented on code in PR #4320:
URL: https://github.com/apache/solr/pull/4320#discussion_r3333923784


##########
solr/core/src/java/org/apache/solr/cli/CreateTool.java:
##########
@@ -226,8 +231,10 @@ protected void createCollection(CloudSolrClient 
cloudSolrClient, CommandLine cli
           "No live nodes found! Cannot create a collection until "
               + "there is at least 1 live node in the cluster.");
 
-    String solrUrl = cli.getOptionValue(CommonCLIOptions.SOLR_URL_OPTION);
-    if (solrUrl == null) {
+    String solrUrl;
+    if (CLIUtils.hasConnectionOption(cli)) {
+      solrUrl = CLIUtils.normalizeSolrUrl(cli);
+    } else {
       String firstLiveNode = liveNodes.iterator().next();
       solrUrl = 
ZkStateReader.from(cloudSolrClient).getBaseUrlForNodeName(firstLiveNode);

Review Comment:
   okay, I put a comment on 
https://issues.apache.org/jira/browse/SOLR-17697?focusedCommentId=18085202&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-18085202
 about this.   And am going to flesh out the TODO to be more specific.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to