Yeah I agree, service masking is a corner case and it's just making things more 
confusing.
I also got misled by the haproxy_status function, which doesn't actually seem 
to ever be called (although I still think some return codes are wrong).

My bug report stemmed from seeing on a production server that Pacemaker
was not be able to detect that haproxy was down. Since my initial
analysis (RC=0 simply if PIDFILE exists) was wrong and I can't analyze
the original issue any further, I think this report could be closed.

On the other hand, what Karl found out is still valid: it is a corner
case, but `test -x $HAPROXY || exit 0` isn't really correct. If the
initscript is to be LSB compliant[0], RC=0 must be reserved for success.
The fact that the binary isn't executable doesn't say anything about
whether the process is running, and would make the start action fail.

[if the initscript is not meant to be LSB compliant it should not be
used as a Pacemaker RA, but that's a separate issue]


[0] 
https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

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

Title:
  initscript status check is too fragile

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

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

Reply via email to