Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-3151

PID file does not end with a new line

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 5.0.0b1
    • None
    • scripts
    • None

    Description

      Currently Oozie PID file does not end with a new line.

      As a result read pid < /var/run/oozie/oozie.pid would return 1. It is not desirable in certain situations. For example: Bigtop tries to determine whether Oozie is running in the following way:

      is_oozie_alive() {
        if [ ! -f "$OOZIE_PID" ]; then
          #not running
          STATUS=3
        elif read pid < "$OOZIE_PID" && ps -p "$pid" > /dev/null 2>&1; then
          #running
          STATUS=0
        else
          #pid file but not running
          STATUS=1
        fi
      }
      

      In this case, the Oozie init script by bigtop would consider Oozie dead and remove the PID file leaving the actual process running.

      Reading file content in oozie-jetty-server.sh (like catalina.sh in Tomcat) with PID=$(cat "${JETTY_PID_FILE}") is also suboptimal; there is no need to start a new process.

      Attachments

        Activity

          People

            Unassigned Unassigned
            asasvari Attila Sasvári
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: