Uploaded image for project: 'CDH (READ-ONLY)'
  1. CDH (READ-ONLY)
  2. DISTRO-221

HBASE PID DIR creation in init script can be overzealous

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: CDH3u0
    • Fix Version/s: CDH3u2
    • Component/s: HBase, Packaging
    • Labels:
      None

      Description

      A user of CDH3u0 reported to me that he found, after using CDH HBase, his /tmp directory owned by user 'hbase'. I haven't been able to reproduce it, but, staring at the code, I suspect the following bits of /etc/rc.d/init.d/hadoop-hbase-regionserver

      source /etc/default/hbase
      
      PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
      DAEMON_SCRIPT="/usr/lib/hbase/bin/hbase-daemon.sh"
      NAME=HBase
      DESC="HBase daemon"
      
      if [ -f /usr/lib/hbase/bin/hbase-config.sh ] ; then
        . /usr/lib/hbase/bin/hbase-config.sh
      fi
      install -d -m 0755 -o hbase -g hbase ${HBASE_PID_DIR}
      
      

      If the user has specified an alternate HADOOP_PID_DIR in either hbase-config.sh or /etc/defaults/hbase, the wrong dir is used. More to the point, /tmp is a default (admittedly this grep was in CDH3b4, but I saw it yesterday too).

      bin/hbase-config.sh
      75:HBASE_PID_DIR="${HBASE_PID_DIR:-/tmp}"
      

      I suspect the thing to do is to remove the parameterization of HADOOP_PID_DIR. We don't allow specifying the pid dir for other services in CDH.

        Attachments

          Activity

            People

            • Assignee:
              rvs Roman V Shaposhnik
              Reporter:
              philip Philip Zeyliger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: