Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
5.0.0b1
-
None
-
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.