Bug 962714 - haproxy_ctld -h will print the command usage twice
haproxy_ctld -h will print the command usage twice
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: John W. Lamb
libra bugs
: Regression
Depends On: 920990
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-14 06:10 EDT by Meng Bo
Modified: 2015-05-14 19:11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 920990
Environment:
Last Closed: 2013-06-10 23:57:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Meng Bo 2013-05-14 06:10:09 EDT
+++ This bug was initially created as a clone of Bug #920990 +++

Description of problem:
Check haproxy_ctld -h after ssh login to the app. It will show the usage twice.

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

How reproducible:
always

Steps to Reproduce:
1.Create scalable app
2.SSH login to the app
3.haproxy_ctld -h
  
Actual results:
It will show the usage of the command twice.

Expected results:
Remove the redundant parts.

Additional info:

[app1s-bmeng.dev.rhcloud.com 514028f963ae190d5000013c]\> haproxy_ctld -h

Usage: /usr/libexec/openshift/cartridges/embedded/haproxy-1.4/info/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_watcher (start|stop|restart|run|)

Usage: /usr/libexec/openshift/cartridges/embedded/haproxy-1.4/info/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_watcher (start|stop|restart|run|)


--------------------------------------------------

This bug has been fixed for v1 cartridge.
Comment 1 openshift-github-bot 2013-05-14 17:32:30 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/59ea397e143f338c7d443478802783cf7c81fd02
<haproxy_ctld.rb> Bug 962714 - Fix p_usage method to exit immediately

p_usage was run twice when haproxy_ctld was run with -h, since call to
"exit" didn't bypass exit handlers. Changed to "exit!" which drops
straight out of process.

Clone of bug https://bugzilla.redhat.com/show_bug.cgi?id=920990
Comment 2 Meng Bo 2013-05-16 05:29:34 EDT
Verified on devenv_3231.

[php1s2-bmengdev.dev.rhcloud.com 115033305575262143905792]\> haproxy_ctld -h

Usage: 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_watcher (start|stop|restart|run|)

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