[sru] Init file does not respect the LSB spec.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
haproxy (Ubuntu) |
Fix Released
|
High
|
Jorge Niedbalski | ||
Trusty |
Fix Released
|
High
|
Jorge Niedbalski | ||
Utopic |
Fix Released
|
High
|
Jorge Niedbalski |
Bug Description
[Environment]
Trusty 14.04.2
[Description]
Looking in the /etc/init.d/haproxy script, particularly the stop method, is returning 4 in case of the pidfile doesn't exists.
/bin/kill $pid || return 4.
According to the spec that means 'insufficient privileges' which is not correct. This is causing pacemaker and other
system monitoring tools to fail because it doesn't complains with LSB.
An example:
Jun 2 12:52:13 glance02 crmd[2518]: notice: process_lrm_event: glance02-
Jun 2 12:52:13 glance02 crmd[2518]: notice: process_lrm_event: LRM operation res_glance_
Reference:
haproxy_stop()
{
if [ ! -f $PIDFILE ] ; then
# This is a success according to LSB
return 0
fi
for pid in $(cat $PIDFILE) ; do
/bin/kill $pid || return 4
done
rm -f $PIDFILE
return 0
}
[Impact]
* Pacemaker or any other system monitoring tool that relies
on a proper exit code could fail as this doesn't complains with LSB.
[Test Case]
* Kill manually the process and then stop haproxy on Trusty/Utopic and check exit code.
$ sudo killall -9 haproxy
$ sudo service haproxy stop | echo $?
[Regression Potential]
* If any application or shell script is relying on a wrong exit code
4 , then it could be affected by this change.
[Proposed solution]
Backport the current devel (wily) init.
Changed in haproxy (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Jorge Niedbalski (niedbalski) |
description: | updated |
summary: |
- Init file does not respect the LSB spec. + [sru] Init file does not respect the LSB spec. |
Changed in haproxy (Ubuntu): | |
status: | In Progress → Fix Released |
tags: |
added: verification-done removed: verification-needed |
Changed in haproxy (Ubuntu Trusty): | |
importance: | Undecided → High |
Changed in haproxy (Ubuntu Utopic): | |
importance: | Undecided → High |
status: | Fix Committed → Won't Fix |
status: | Won't Fix → Fix Released |
Hello Jorge, or anyone else affected,
Accepted haproxy into utopic-proposed. The package will build now and be available at https:/ /launchpad. net/ubuntu/ +source/ haproxy/ 1.5.4-1ubuntu2 in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed. In either case, details of your testing will help us make a better decision.
Further information regarding the verification process can be found at https:/ /wiki.ubuntu. com/QATeam/ PerformingSRUVe rification . Thank you in advance!