Init script restart method does not return non-zero exit on startup failure

Bug #1193280 reported by Merijntje Tak on 2013-06-21
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
haproxy (Ubuntu)
Undecided
Unassigned

Bug Description

The restart method of the haproxy init script does not return a non-zero exit status when haproxy fails to start:
root@frisbee:/etc/init.d# /etc/init.d/haproxy restart
 * Restarting haproxy haproxy
[ALERT] 171/113150 (17697) : Starting frontend standard-frontend-80: cannot bind socket [127.0.0.1:80]
                                                                                                            [fail]
root@frisbee:/etc/init.d# echo $?
0

The start method does handle this appropriately:
root@frisbee:/etc/init.d# /etc/init.d/haproxy start
 * Starting haproxy haproxy
[ALERT] 171/113157 (17711) : Starting frontend standard-frontend-80: cannot bind socket [127.0.0.1:80]
                                                                                                            [fail]
root@frisbee:/etc/init.d# echo $?
2

Additional information:
root@frisbee:/etc/apt# lsb_release -rd
Description: Ubuntu 12.04.2 LTS
Release: 12.04
root@frisbee:/etc/apt# apt-cache policy haproxy
haproxy:
  Installed: 1.4.18-0ubuntu1.2
  Candidate: 1.4.18-0ubuntu1.2
  Version table:
 *** 1.4.18-0ubuntu1.2 0
        500 http://nl.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
        100 /var/lib/dpkg/status
     1.4.18-0ubuntu1 0
        500 http://nl.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

Merijntje Tak (mtak) wrote :

The attachment "haproxy_diff.txt" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers