Description of problem: create a app and try to rhc ssh the app with a wrong execute path by using --ssh parameter (eg: rhc app ssh -a existapp --ssh /usr/bin/abcd ), just exception log output. Version-Release number of selected component (if applicable): STG(devenv-stage_381) rhc-1.10.7 How reproducible: Always Steps to Reproduce: 1. Create an app $ rhc app create app4 nodejs-0.6 2. ssh the app with a wrong execute path $ rhc app ssh -a app4 --ssh /usr/bin/abcd Actual results: OpenShift:test duyan$ rhc app ssh -a app4 --ssh /usr/bin/abcd Connecting to 51cbea1d2587c84fc300003b.rhcloud.com ... /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/rhc-1.10.7/lib/rhc/commands/ssh.rb:47:in `exec': No such file or directory - /usr/bin/abcd (Errno::ENOENT) from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/rhc-1.10.7/lib/rhc/commands/ssh.rb:47:in `run' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/rhc-1.10.7/lib/rhc/commands.rb:244:in `execute' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/rhc-1.10.7/lib/rhc/commands.rb:235:in `block (3 levels) in to_commander' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/command.rb:180:in `call' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/command.rb:180:in `call' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/command.rb:155:in `run' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/runner.rb:400:in `run_active_command' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/rhc-1.10.7/lib/rhc/command_runner.rb:73:in `run!' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/delegates.rb:7:in `run!' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/rhc-1.10.7/lib/rhc/cli.rb:36:in `start' from /usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/rhc-1.10.7/bin/rhc:20:in `<top (required)>' from /usr/local/opt/ruby/bin/rhc:23:in `load' from /usr/local/opt/ruby/bin/rhc:23:in `<main>' Expected results: should get a friendly message when using rhc app ssh --ssh, just like "/usr/bin/abcd is not existing" instead of the exception log.
Fixed in https://github.com/openshift/rhc/pull/418
Commit pushed to master at https://github.com/openshift/rhc https://github.com/openshift/rhc/commit/b6f4b8b0343d1959da397662f9399a00c1fea4ba Bug 978837 - Don't show stack trace if --ssh executable not found rhc app ssh --ssh /path/to/nowhere should return a short error (not found or not executable) to the user instead of a stack trace.
test on devenv_3427 , issue still can be reproduced. rhc-1.10.7 Steps: 1. create a app rhc app create app2 php-5.3 2. ssh into app with a wrong execute path [root@Daphne ~]# rhc app ssh -a app2 --ssh /usr/bin/abcd Connecting to 765578476596905210019840.rhcloud.com ... /usr/lib/ruby/gems/1.8/gems/rhc-1.10.7/lib/rhc/commands/ssh.rb:47:in `exec': No such file or directory - /usr/bin/abcd (Errno::ENOENT) from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.7/lib/rhc/commands/ssh.rb:47:in `send' from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.7/lib/rhc/commands/ssh.rb:47:in `run' from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.7/lib/rhc/commands.rb:244:in `send' from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.7/lib/rhc/commands.rb:244:in `execute' from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.7/lib/rhc/commands.rb:235:in `to_commander' from /usr/lib/ruby/gems/1.8/gems/commander-4.1.3/lib/commander/command.rb:180:in `call' from /usr/lib/ruby/gems/1.8/gems/commander-4.1.3/lib/commander/command.rb:180:in `call' from /usr/lib/ruby/gems/1.8/gems/commander-4.1.3/lib/commander/command.rb:155:in `run' from /usr/lib/ruby/gems/1.8/gems/commander-4.1.3/lib/commander/runner.rb:400:in `run_active_command' from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.7/lib/rhc/command_runner.rb:73:in `run!' from /usr/lib/ruby/gems/1.8/gems/commander-4.1.3/lib/commander/delegates.rb:7:in `run!' from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.7/lib/rhc/cli.rb:36:in `start' from /usr/lib/ruby/gems/1.8/gems/rhc-1.10.7/bin/rhc:20 from /usr/bin/rhc:19:in `load' from /usr/bin/rhc:19
use rhc-1.11.1 for test on devenv_3427, issue still can be reproduced.
Move back to ON_QA since comment 3 and comment 4 is not testing with the version with the fix, Yan, you need to test it with the rhc installed on the latest devenv or build one from the latest code.
verified on devenv_3427 with the rhc client build from devenv_3427 on Linux/Mac/Windows plaform, issue can't be reproduced. move to verified. Steps: 1. create a app rhc app create app2 php-5.3 2. ssh into app with a wrong execute path OpenShift:~ $ rhc app ssh -a phps --ssh /usr/bin/abcd invalid option: SSH executable '/usr/bin/abcd' does not exist.