Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
I have a situation where puppet is continually attempting to restart zookeeper. It appears as if /etc/init.d/zookeeper-server status returns the wrong answer in some cases. I can workaround this by setting the COLUMNS environment variable just before the ps in hadoop_is_process_alive().
What is actually setting (or unsetting) this is a mystery, but I don't think its right for the init script to break.
$ COLUMNS=80 ps -fp 2539 | grep 2539 | grep zookeeper >/dev/null ; echo $? 1 $ COLUMNS=1000 ps -fp 2539 | grep 2539 | grep zookeeper >/dev/null ; echo $? 0
It seems to me as if this method of using ps to check the daemon status is too fragile.