Public bug reported:

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

** Affects: haproxy (Ubuntu)
     Importance: Undecided
         Status: New

** Patch added: "haproxy_diff.txt"
   
https://bugs.launchpad.net/bugs/1193280/+attachment/3708765/+files/haproxy_diff.txt

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1193280

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1193280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to