Bug 1023594 - exit code after running haproxy_ctld --help is 255, should be 0
Summary: exit code after running haproxy_ctld --help is 255, should be 0
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Andy Goldstein
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-25 21:08 UTC by Peter Ruan
Modified: 2015-05-15 00:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-24 03:27:09 UTC
Target Upstream Version:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.