status_of_proc is returning incorrect error code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lsb (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Lucid |
Fix Released
|
Medium
|
Unassigned | ||
Natty |
Won't Fix
|
Undecided
|
Unassigned | ||
Oneiric |
Won't Fix
|
Undecided
|
Unassigned | ||
Precise |
Fix Released
|
High
|
Adam Stokes | ||
Quantal |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Binary package hint: lsb
[Impact]
When status_of_proc is called with -p $PIDFILE and the service is not presently started, error code 4 is always returned because the process does not have the PID file existant until it is started, and it's deleted after stopping.
This fails LSB compliance because it should report 0 if the service is stopped as expected.
[Test Case]
status_of_proc should /optionally/ check if a pid file exists or not, not make it mandatory to exist before throwing an error code. If pid file does exist, check it, verify it's associated with $DAEMON, and if not try to determine if the process is actually running under a different pid, if not, then return error code 0 because it is determined that it is /not/ running.
Error code 4 in LSB is reserved for total permanent failure that requires manual intervention to correct. Such as, the process daemon isn't executable due to permissions, or it tried to start but fails.. error code 4 is likely never used on checking status is very basic. Either it's running, or it's not. That's all status_of_proc should report, nothing more, nothing less.
[Regression]
Minimal, changes the behavior of checking against a pid file existance.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: lsb-base 4.0-0ubuntu8
ProcVersionSign
Uname: Linux 2.6.32-26-server x86_64
Architecture: amd64
Date: Wed Dec 1 08:27:21 2010
InstallationMedia: Ubuntu-Server 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.2)
PackageArchitec
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: lsb
tags: | added: patch |
Changed in lsb (Ubuntu): | |
milestone: | none → ubuntu-12.04.1 |
Changed in bind9 (Ubuntu Lucid): | |
status: | New → Invalid |
no longer affects: | bind9 (Ubuntu Lucid) |
Changed in bind9 (Ubuntu Natty): | |
status: | New → Invalid |
no longer affects: | bind9 (Ubuntu Natty) |
no longer affects: | bind9 (Ubuntu Oneiric) |
no longer affects: | bind9 (Ubuntu Precise) |
no longer affects: | bind9 (Ubuntu Quantal) |
Changed in lsb (Ubuntu Quantal): | |
milestone: | ubuntu-12.04.1 → none |
no longer affects: | dovecot (Ubuntu Lucid) |
Changed in lsb (Ubuntu Precise): | |
milestone: | none → ubuntu-12.04.1 |
status: | New → Confirmed |
importance: | Undecided → Medium |
no longer affects: | dovecot (Ubuntu Natty) |
no longer affects: | dovecot (Ubuntu Oneiric) |
no longer affects: | dovecot (Ubuntu Precise) |
no longer affects: | dovecot (Ubuntu Quantal) |
no longer affects: | spamassassin (Ubuntu) |
no longer affects: | openbsd-inetd (Ubuntu Lucid) |
no longer affects: | openbsd-inetd (Ubuntu Natty) |
no longer affects: | spamassassin (Ubuntu Lucid) |
no longer affects: | openbsd-inetd (Ubuntu Oneiric) |
no longer affects: | spamassassin (Ubuntu Natty) |
no longer affects: | openbsd-inetd (Ubuntu Precise) |
no longer affects: | spamassassin (Ubuntu Oneiric) |
no longer affects: | openbsd-inetd (Ubuntu Quantal) |
no longer affects: | openvpn (Ubuntu Lucid) |
no longer affects: | openvpn (Ubuntu Natty) |
Changed in lsb (Ubuntu Lucid): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
no longer affects: | spamassassin (Ubuntu Quantal) |
no longer affects: | spamassassin (Ubuntu Precise) |
no longer affects: | openvpn (Ubuntu Oneiric) |
no longer affects: | openvpn (Ubuntu Precise) |
no longer affects: | openvpn (Ubuntu Quantal) |
no longer affects: | rsync (Ubuntu Lucid) |
no longer affects: | rsync (Ubuntu Natty) |
no longer affects: | rsync (Ubuntu Oneiric) |
no longer affects: | rsync (Ubuntu Precise) |
no longer affects: | rsync (Ubuntu Quantal) |
no longer affects: | rsync (Ubuntu) |
no longer affects: | openvpn (Ubuntu) |
no longer affects: | bind9 (Ubuntu) |
no longer affects: | dovecot (Ubuntu) |
no longer affects: | openbsd-inetd (Ubuntu) |
tags: | added: rls-q-notfixing |
Changed in lsb (Ubuntu Precise): | |
assignee: | nobody → Adam Stokes (adam-stokes) |
status: | Confirmed → In Progress |
Changed in lsb (Ubuntu Precise): | |
importance: | Medium → High |
description: | updated |
tags: |
added: verification-done-precise verification-needed removed: verification-done |
As per LSB Init compliancy:
If the status action is requested, the init script will return the following exit status codes.
0 program is running or service is OK
1 program is dead and /var/run pid file exists
2 program is dead and /var/lock lock file exists
3 program is not running
4 program or service status is unknown
5-99 reserved for future LSB use
100-149 reserved for distribution use
150-199 reserved for application use
200-254 reserved
Retrieved from: http:// refspecs. freestandards. org/LSB_ 3.1.0/LSB- Core-generic/ LSB-Core- generic/ iniscrptact. html