Bug 975410 - Option --limit can not work well for rhc ssh --gears
Option --limit can not work well for rhc ssh --gears
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jessica Forrester
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-18 08:11 EDT by Wei Sun
Modified: 2015-05-14 22:23 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-24 10:57:22 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 Wei Sun 2013-06-18 08:11:25 EDT
Description of problem:
Check rhc ssh help information,and get some help messages:
--gears                   Execute this command on all gears in the app.  Requires a command.
  --limit INTEGER           Limit the number of simultaneous SSH connections opened with --gears (default: 5)

But run `rhc ssh $appname --gears ls --limit 1`,it can not work well.It returns
"comparison of String with 0 failed"

Version-Release number of selected component (if applicable):
rhc 1.10.2
devenv_3375

How reproducible:
Always

Steps to Reproduce:
1.Create a scaling app
2.Add db cartridge to the app
3.Scale up the app
4.Check app's gear numbers
5.Run `rhc ssh $appname --gears ls `
6.Run `rhc ssh $appname --gears ls --limit 1`

Actual results:
4.app has 3 gears
5.[sunwei@dhcp-8-229 dev]$ rhc ssh phps --gear ls
=== 51c00fb71b076f187100000d mysql-5.1
app-root
mysql
=== 51c00f571b076f187100000a php-5.3+haproxy-1.4
app-root
git
haproxy
php
=== 212453814211476914700288 php-5.3+haproxy-1.4
app-root
git
php

6.[sunwei@dhcp-8-229 dev]$ rhc ssh phps --gears ls  --limit 1
comparison of String with 0 failed
Usage: rhc ssh <app> [--ssh path_to_ssh_executable]
Pass '--help' to see the full list of options


Expected results:
--limit can work well,and only can ssh to log in 1 gear

Additional info:
Comment 1 Jessica Forrester 2013-06-18 11:28:56 EDT
Fix in https://github.com/openshift/rhc/pull/406
Comment 2 openshift-github-bot 2013-06-18 12:52:12 EDT
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/d27892dd7e6bc2fa9b969fcf17af06eb8765d9da
Bug 975410 - rhc ssh limit option failing

Bug 975410 - add a testcase for rhc ssh --limit option
Comment 3 Wei Sun 2013-06-18 22:26:07 EDT
Verified on devenv_3381,rhc is rhc-1.10.3

When use --limit 2,first,ssh to 2 gears,and after waiting seconds,ssh to other gears.

Result:

[sunwei@dhcp-8-229 dev]$ rhc ssh phps --gears ls --limit 2
=== 5cf35fb4d88411e2ab6112313b0d0880 mysql-5.1
app-root
mysql
=== 684766309285658202472448 php-5.3+haproxy-1.4
app-root
git
haproxy
php
=== 51c111fe1657515a42000044 php-5.3+haproxy-1.4
app-root
git
php

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