Bug 920990 - haproxy_ctld -h will print the command usage twice
Summary: haproxy_ctld -h will print the command usage twice
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: John W. Lamb
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 962714
TreeView+ depends on / blocked
 
Reported: 2013-03-13 09:29 UTC by Meng Bo
Modified: 2015-05-14 23:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 962714 (view as bug list)
Environment:
Last Closed: 2013-04-20 03:34:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Meng Bo 2013-03-13 09:29:38 UTC
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_2927
devenv-stage_320

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|)

Comment 1 openshift-github-bot 2013-04-11 15:47:00 UTC
Commits pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/505ff3b90775772130e53f4b2d015743cc7f4a39
<haproxy_ctld> Bug 920990 - fix p_usage showing usage message twice

updated p_usage method to drop straight out of program (via exit!) after
displaying usage instead of raising the "exit" exception

https://github.com/openshift/origin-server/commit/543b363d23924eaf95a0129d6edd13fdc2604c2d
Merge pull request #2002 from dobbymoodge/BZ920990

<haproxy_ctld> Bug 920990 - fix p_usage showing usage message twice

Comment 2 John W. Lamb 2013-04-16 19:18:56 UTC
This is fixed as of 4/11/2013, forgot to move it to ON_QA.

Comment 3 Meng Bo 2013-04-17 03:19:49 UTC
Checked on devenv_3108, only one copy of help print out.
Move bug to verified.


\> 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|)
[no1s-bmengdev.dev.rhcloud.com a6d0a3f2a70c11e298c112313d338a61]\>


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