Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8649

Fail fast on wrong ZK chroot

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 5.5, 6.0
    • SolrCloud
    • None

    Description

      A typical scenario is when a user sets up ZK with a chroot /solr, runs Solr and then restarts Solr without specifying the chroot. In the default legacyCloud mode, Solr will happily start and create all ZK nodes as well as collections found on the local cores.

      I've been bit many times by this and so have more than a few Solr users. In a private discussion, Hoss gave the following idea:

      • We add a command to bin/solr to "prepare" ZooKeeper that accepts the zk host string
      • The command creates the chroot if it does not exist
      • Touches /my-chroot/solr.key file
      • Writes the complete zk host in the solr.in.sh or solr.in.cmd file

      Once we do this, Solr will complain and fail fast if the solr.key file is not found in the given chroot. We could also write a fixed string in the /my-chroot instead of creating a /my-chroot/solr.key file.

      We can do these things automatically when using embedded ZooKeeper.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              shalin Shalin Shekhar Mangar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: