[ 
https://issues.apache.org/jira/browse/SOLR-8522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15119067#comment-15119067
 ] 

Arcadius Ahouansou commented on SOLR-8522:
------------------------------------------

Hello again [~noble.paul]
>From my understanding, a server could have multiple host names and multiple 
>public IPs.

And by simply starting solr without the {{-Dhost}} switch, Solr will grab one 
of the assigned IPs and use it.
This sometimes is not desirable as it leads to issues ... and that is when  
{{-Dhost}}  is used to force Solr to use a provided host name or IP.

I downloaded solr 5.4.1 and I ran

{{solr-5.4.1/bin$ ./solr start -e cloud -a "-Dhost=linux01"}}

Then, the output of 
{{curl 
"http://localhost:8983/solr/admin/collections?action=clusterstatus&wt=json&indent=on"}}

is:
{code}
{
   "responseHeader":{
      "status":0,
      "QTime":2
   },
   "cluster":{
      "collections":{
         "gettingstarted":{
            "replicationFactor":"2",
            "shards":{
               "shard1":{
                  "range":"80000000-ffffffff",
                  "state":"active",
                  "replicas":{
                     "core_node1":{
                        "core":"gettingstarted_shard1_replica1",
                        "base_url":"http://linux01:8983/solr";,
                        "node_name":"linux01:8983_solr",
                        "state":"active"
                     },
                     "core_node4":{
                        "core":"gettingstarted_shard1_replica2",
                        "base_url":"http://linux01:7574/solr";,
                        "node_name":"linux01:7574_solr",
                        "state":"active",
                        "leader":"true"
                     }
                  }
               },
               "shard2":{
                  "range":"0-7fffffff",
                  "state":"active",
                  "replicas":{
                     "core_node2":{
                        "core":"gettingstarted_shard2_replica1",
                        "base_url":"http://linux01:8983/solr";,
                        "node_name":"linux01:8983_solr",
                        "state":"active"
                     },
                     "core_node3":{
                        "core":"gettingstarted_shard2_replica2",
                        "base_url":"http://linux01:7574/solr";,
                        "node_name":"linux01:7574_solr",
                        "state":"active",
                        "leader":"true"
                     }
                  }
               }
            },
            "router":{
               "name":"compositeId"
            },
            "maxShardsPerNode":"2",
            "autoAddReplicas":"false",
            "znodeVersion":8,
            "configName":"gettingstarted"
         }
      },
      "live_nodes":[
         "linux01:7574_solr",
         "linux01:8983_solr"
      ]
   }
}
{code}

Please note the line with
{{"base_url":"http://linux01:8983/solr"}}

So, any client (curl or apache httpClient) will be using URL of the form 
{{http://linux01:8983/solr}} 
which as you said will be resolved into in IP, but this will happen outside of 
Solr IMHO.
 
So, in my humble opinion (and correct me if I am wrong), Solr and the cluster 
assignment rules will know only about the host name "linux01"?


Thank you very much [~noble.paul] for your time.


> ImplicitSnitch to support IPv4 fragment and host name  fragment tags
> --------------------------------------------------------------------
>
>                 Key: SOLR-8522
>                 URL: https://issues.apache.org/jira/browse/SOLR-8522
>             Project: Solr
>          Issue Type: Improvement
>          Components: SolrCloud
>    Affects Versions: 5.4
>            Reporter: Arcadius Ahouansou
>            Assignee: Noble Paul
>            Priority: Minor
>         Attachments: SOLR-8522.patch, SOLR-8522.patch, SOLR-8522.patch
>
>
> This is a description from [~noble.paul]'s comment on SOLR-8146
> h3. IPv4 fragment tags
> Lets assume a Solr node IPv4 address is {{192.93.255.255}} .
> This is about enhancing the current {{ImplicitSnitch}}  to support IP based 
> tags like:
> - {{hostfrag_1 = 255}}
> - {{hostfrag_2 = 255}}
> - {{hostfrag_3 = 93}}
> - {{hostfrag_4 = 192}}
> Note that IPv6 support will be implemented by a separate ticket
> h3. Host name fragment tags
> Lets assume a Solr node host name {{serv1.dc1.country1.apache.org}} .
> This is about enhancing the current {{ImplicitSnitch}}  to support  tags like:
> - {{hostfrag_1 = org}}
> - {{hostfrag_2 = apache}}
> - {{hostfrag_3 = country1}}
> - {{hostfrag_4 = dc1}}
> - {{hostfrag_5 = serv1}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to