Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1593

Add Debian style /etc/default/zookeeper support to init script

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 3.4.5
    • None
    • scripts
    • None
    • Debian Linux 6.0

    • Patch for supporting /etc/default/zookeeper in Debian init script

    Description

      In our configuration we use a different data directory for Zookeeper. The problem is that the current Debian init.d script has the default location hardcoded:

      ZOOPIDDIR=/var/lib/zookeeper/data
      ZOOPIDFILE=${ZOOPIDDIR}/zookeeper_server.pid

      By using the standard Debian practice of allowing for a /etc/default/zookeeper we can redefine these variables to point to the correct location:

      ZOOPIDDIR=/var/lib/zookeeper/data
      ZOOPIDFILE=${ZOOPIDDIR}/zookeeper_server.pid

      [ -r /etc/default/zookeeper ] && . /etc/default/zookeeper

      This currently can't be done through /usr/libexec/zkEnv.sh, since that is loaded before ZOOPIDDIR and ZOOPIDFILE are set. Any change there would therefore undo the setup made in for example /etc/zookeeper/zookeeper-env.sh.

      Attachments

        1. zookeeper_debian_default.patch
          0.5 kB
          Dirkjan Bussink

        Activity

          People

            Unassigned Unassigned
            dbussink Dirkjan Bussink
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: