Bug 1023594

Summary: exit code after running haproxy_ctld --help is 255, should be 0
Product: OpenShift Online Reporter: Peter Ruan <pruan>
Component: ImageAssignee: Andy Goldstein <agoldste>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: agoldste, chunchen, dmcphers
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 03:27:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Peter Ruan 2013-10-25 21:08:47 UTC
Description of problem:
exit code after running haproxy_ctld --help is 255, should be 0

Version-Release number of selected component (if applicable):
current

How reproducible:
always.

Steps to Reproduce:
1. create a scaleable app (php)
2. ssh into the gear and type haproxy_ctld --help
3. type 'echo $?'

Actual results:
255

Expected results:
0 or 1 

Additional info:

Comment 1 Jhon Honce 2013-10-25 22:12:14 UTC
If this behavior is desired, then we should update all the OpenShift scripts. Currently it is a mix of 0 and non-0 return codes.

Comment 2 Andy Goldstein 2013-11-04 21:52:42 UTC
https://github.com/openshift/origin-server/pull/4081

Comment 3 openshift-github-bot 2013-11-05 01:29:38 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/e69dadafc61ec6c796632430fb2e0caf5c8d0b1e
Exit 0 for --help in haproxy_ctld

Bug 1023594

Comment 4 chunchen 2013-11-07 02:44:33 UTC
It's fixed, verified on devenv_3998, please refer to the following results:

[cphps-cdm.dev.rhcloud.com 527afb8c5aa2091acd000024]\> haproxy_ctld --help

Usage: /var/lib/openshift/527afb8c5aa2091acd000024/haproxy/usr/bin/haproxy_ctld.rb
Control scaling features for this application.  Has two operating modes, auto
and manual.  Manual scaling options will run requested action and exit, auto
scaling options will stay running in the foreground.

  -h|--help         Display this help menu

Manual scaling options:
  -u|--up           Trigger a gear_up event and add an additional gear
  -d|--down         Trigger a gear_remove event and remove a gear
  --debug           Puts logger into debug mode

Auto scaling options:
  -a|--auto         Enable auto-scale
  --debug           Puts logger into debug mode

Notes:
1. To start/stop auto scaling in daemon mode run:
    haproxy_ctld_daemon (start|stop|restart|run|)
[cphps-cdm.dev.rhcloud.com 527afb8c5aa2091acd000024]\> echo $?
0