nginx init script should support the 'status' action
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| nginx (Ubuntu) |
Low
|
Unassigned |
Bug Description
Binary package hint: nginx
nginx needs to have 'status' action on init script
Related branches
Changed in nginx: | |
assignee: | nobody → andreserl |
status: | New → In Progress |
Launchpad Janitor (janitor) wrote : | #2 |
This bug was fixed in the package nginx - 0.6.31-2ubuntu2
---------------
nginx (0.6.31-2ubuntu2) intrepid; urgency=low
* debian/control: Add Depend on lsb >= 3.2-14, which has the
status_
* debian/init.d:
- Add sourcing to '. /lib/lsb/
- Add the 'status' action (LP: #251985).
-- Andres Rodriguez <email address hidden> Fri, 25 Jul 2008 13:48:49 -0500
Changed in nginx: | |
status: | Confirmed → Fix Released |
Changed in nginx (Ubuntu): | |
status: | Fix Released → Incomplete |
Michael H. Oshita (ijinpublic+lp) wrote : | #3 |
Calling the status action returns 4 (program or service is unknown) when the service is stopped.
This needs to return 3 (program is not running) to be LSB compatible in order to
function properly as a LSB Resource Agent in HA (heartbeat).
Daniel Hahler (blueyed) wrote : | #4 |
First of all, "status" is not supported anymore in Karmic!
0.6.31-2ubuntu2 (which introduced this fix) is not mentioned in the current (0.7.59-1) changelog either, this looks like it got accidentally lost.
Then, about the patch from Michael, regarding the exit status on "status", it looks like a hack, to drop the "-p" (pidfile) param to status_of_proc (which likely has other side effects).
Andres, will you look into getting this fixed?
Changed in nginx (Ubuntu): | |
status: | Incomplete → Triaged |
importance: | Undecided → Low |
Andres Rodriguez (andreserl) wrote : | #5 |
Hello Daniel,
Sure thing. I'll look into getting this fixed.
Changed in nginx (Ubuntu): | |
status: | Triaged → In Progress |
Andres Rodriguez (andreserl) wrote : | #6 |
Andres Rodriguez (andreserl) wrote : | #7 |
After doing some further testing and comparisons, dropping the "-p" (pidfile) param to status_of_proc() in karmic is not needed since it actually returns 3 (program is not running), when the service is stopped.
This seems to be a problem with Jaunty, because in jaunty it returns 4 (program or service is unknown) instead of 3 (program is not running). I've also seen this behaviour in other scripts, such as /etc/init.d/ssh and /etc/init.
Now, I'm guessing this could be a bug in LSB. I'll consult this issue with Dustin Kirkland to find the adequate solution for Jaunty. Meanwhile, please sponsor this upload.
Michael H. Oshita (ijinpublic+lp) wrote : | #8 |
Andres,
Yes, that was the problem I was having in Jaunty, returning 4 instead of 3.
This makes heartbeat fail the monitor action.
I did have look at /lib/lsb/
for other programs, so I referred to how status_of_proc was used (without the -p pidfile param)
in atd and acpid under /etc/init.d/ and applied it to nginx.
Andres Rodriguez (andreserl) wrote : | #9 |
Hello Michael,
This problem is not actually with the nginx init script (or with the scripts of other packages). This is actually a problem of the /lib/lsb/
The problem here seems to be that in the latest update of lsb for Jaunty and Hardy ( 4.0-0), which is the same version in karmic, looks like that the init-functions script was not updated accordingly.
Something I've done to verify this, is that I've replaced the "init-functions" script (/lib/lsb/
Thanks for your report, which has lead us to find this bug.
Cheers
Changed in nginx (Ubuntu): | |
status: | In Progress → Confirmed |
assignee: | Andres E. Rodriguez Lazo (andreserl) → nobody |
Michael H. Oshita (ijinpublic+lp) wrote : | #10 |
Hi Andres,
As you proposed, I tested Karmic's init-functions script by replacing it with Jaunty's, and this does indeed seem to fix the status problem I was encountering. Thanks for looking into this.
I'll be looking forward for a fix in Jaunty soon.
=)
Launchpad Janitor (janitor) wrote : | #11 |
This bug was fixed in the package nginx - 0.7.59-1ubuntu1
---------------
nginx (0.7.59-1ubuntu1) karmic; urgency=low
* Readd status action to init script: (LP: #251985)
- debian/init.d:
+ Add sourcing to '. /lib/lsb/
+ Add 'status' action.
- debian/control: Add Depend on lsb >= 3.2-14, which has the
statuc_
* Added a UFW profile set: (LP: #308695)
- debian/
- debian/control: nginx: Suggests ufw.
- debian/dirs: Added 'etc/ufw/
- debian/rules: Added install rule for the nginx UFW profile.
* Added support for gzip_static module: (LP: #346010)
- debian/rules: Added '--with-
* debian/control: Update Maintainer field to match Ubuntu Developers.
-- Andres Rodriguez <email address hidden> Tue, 04 Aug 2009 11:28:00 -0500
Changed in nginx (Ubuntu): | |
status: | Confirmed → Fix Released |
Attaching debdiff.