php5-fpm init(.d) scripts don't report status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php5 (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
when running service php5-fpm status, we're not getting the correct status reported:
root@levix ~ # ps -cafe | grep -i [p]hp-
stats.a+ 23628 1 TS 19 14:11 ? 00:00:00 php-fpm: pool stats.acme.com
stats.a+ 23629 1 TS 19 14:11 ? 00:00:00 php-fpm: pool stats.acme.com
stats.a+ 23630 1 TS 19 14:11 ? 00:00:00 php-fpm: pool stats.acme.com
stats.a+ 23631 1 TS 19 14:11 ? 00:00:00 php-fpm: pool stats.acme.com
root@levix ~ # status php5-fpm
php5-fpm stop/waiting
root@levix ~ # start php5-fpm
php5-fpm start/running, process 15902
root@levix ~ # ps -cafe | grep -i [p]hp-
stats.a+ 23628 1 TS 19 14:11 ? 00:00:00 php-fpm: pool stats.acme.com
stats.a+ 23629 1 TS 19 14:11 ? 00:00:00 php-fpm: pool stats.acme.com
stats.a+ 23630 1 TS 19 14:11 ? 00:00:00 php-fpm: pool stats.acme.com
stats.a+ 23631 1 TS 19 14:11 ? 00:00:00 php-fpm: pool stats.acme.com
This is true regardless which init script we call:
root@levix ~ # /etc/init.
root@levix ~ # echo $?
1
That makes the whole thing very unusable in a configuration management setup, where puppet runs once an hour, configuring 18 pools, and then (re)starting the pool once an hour.
(then again, that might help with php apps leaking memory ;)
correction: the upstart script works. the init.d does not.
The upstart script only works if it's been started by upstart.