Using property legacyCloud=true, coreNodeNames are well written by Solr in core.properties file.

We are wondering if the problem comes from our configuration or the bugfix https://issues.apache.org/jira/browse/SOLR-11503 ?


_*Without legacyCloud=true:*_

> Our configuration before Solr start:

.../cores/fr_green/core.properties on both hosts:

    shard=shard1
    dataDir=/opt/kookel/data/searchSolrNode/solrindex/fr_green

> Our configuration after Solr start:

.../cores/fr_green/core.properties host1:

    #Written by CorePropertiesLocator
    #Wed Apr 04 13:41:10 UTC 2018
    name=fr_green
    shard=shard1
    dataDir=/opt/kookel/data/searchSolrNode/solrindex/fr_green
    coreNodeName=core_node1

.../cores/fr_green/core.properties host2:

    #Written by CorePropertiesLocator
    #Wed Apr 04 13:41:10 UTC 2018
    name=fr_green
    shard=shard1
    dataDir=/opt/kookel/data/searchSolrNode/solrindex/fr_green
    coreNodeName=core_node1

--------------

_*With legacyCloud=true:*_

> Our configuration before Solr start:

.../cores/fr_green/core.properties on both hosts:

    shard=shard1
    dataDir=/opt/kookel/data/searchSolrNode/solrindex/fr_green

> Our configuration after Solr start:

.../cores/fr_green/core.properties host1:

    #Written by CorePropertiesLocator
    #Wed Apr 04 13:41:10 UTC 2018
    name=fr_green
    shard=shard1
    dataDir=/opt/kookel/data/searchSolrNode/solrindex/fr_green
    coreNodeName=core_node1

.../cores/fr_green/core.properties host2:

    #Written by CorePropertiesLocator
    #Wed Apr 04 13:41:10 UTC 2018
    name=fr_green
    shard=shard1
    dataDir=/opt/kookel/data/searchSolrNode/solrindex/fr_green
    coreNodeName=core_node2

=> coreNodeName for host2 is correct





On 03/04/18 15:46, Gael Jourdan-Weil wrote:
Hello,

We are trying to upgrade from Solr 6.6 to Solr 7.2.1 and we are using Solr 
Cloud.

Doing some tests with 2 replicas, ZooKeeper doesn't know which one to elect as 
a leader:

ERROR org.apache.solr.cloud.ZkController:getLeader:1206  - Error getting leader 
from zk
org.apache.solr.common.SolrException: There is conflicting information about 
the leader of shard: shard1 our state 
says:http://host1:8080/searchsolrnodefr/fr_blue/ but zookeeper 
says:http://host2:8080/searchsolrnodefr/fr_blue/

solr.xml file:
<bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>

In the core.properties files, each replica has the same coreNodeName value: 
"core_node1".
When changing this property on host2 with value "core_node2", ZooKeeper can 
elect a leader and everything is fine.

Do we need to set genericCoreNodeNames to false in solr.xml ?

Gaël

Reply via email to