Bug 1294401
Summary: | rhc ssh <appname> does not respect PATH env variable, nor the --ssh PATH option | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | OpenShift Online | Reporter: | belltown <sea.av80r> | ||||||
Component: | oc | Assignee: | Sally <somalley> | ||||||
Status: | CLOSED WONTFIX | QA Contact: | Wei Sun <wsun> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 2.x | CC: | aaron.hurui, aos-bugs, jokerman, mmccomas, somalley, yanpzhan | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | x86_64 | ||||||||
OS: | Windows | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 1307174 1310813 (view as bug list) | Environment: | |||||||
Last Closed: | 2017-05-31 18:22:11 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 1307174, 1310813 | ||||||||
Attachments: |
|
Description
belltown
2015-12-28 03:28:37 UTC
face the same issue, hope a solution Tested with rhc-1.38.6 from the libra-rhel-6-stage/client/gems/, the issue seems still there. Where can I get the rhc gem file that contains the fix for the bug? Created attachment 1120074 [details]
rhc-1.38.4.gem
please use the attached gemfile for testing, thanks.
1.Install rhc-1.38.4.gem from attachment on win10 2.Login openshift server: C:\Users\openshift>rhc setup --server=<serverip> 3.Ssh into app. Now we can ssh into app with default ssh successfully: 3.1 Ssh using Win cmd or ruby bash: C:\Users\openshift>rhc ssh php1 Connecting to 56af35d735348f0625000668.com.cn ... ...... [php1-domzyp.ose-22.com.cn 56af35d735348f0625000668]\>ls app-deployments app-root git php [php1-domzyp.ose-22.com.cn 56af35d735348f0625000668]\>exit Connection to php1-domzyp.ose-22.com.cn closed 3.2 Ssh using git bash: $rhc ssh php1 Connecting to 56af35d735348f0625000668.com.cn ... ...... [php1-domzyp.ose-22.com.cn 56af35d735348f0625000668]\> 4.Ssh into app with --ssh option 4.1 Ssh using Win cmd or ruby bash,it aborts when connecting: C:\Users\openshift>rhc ssh php1 --ssh "C:\Users\openshift\ssh.exe" Connecting to 56af35d735348f0625000668.com.cn ... 4.2 Ssh using git bash, it succeeds: $rhc ssh php1 --ssh "C:\Users\openshift\ssh.exe" Connecting to 56af35d735348f0625000668.com.cn ... ...... [php1-domzyp.ose-22.com.cn 56af35d735348f0625000668]\>ls From the step 4.1, there is issue when using --ssh option in ruby bash, Pls help to check. Others works well. Comment on attachment 1120074 [details]
rhc-1.38.4.gem
Please use the updated .gem file
Created attachment 1120475 [details]
updated rhc-1.38.4.gem
Please re-test using the attached .gem build from the master branch. Thanks.
QA: Please re-test. I followed your steps from Comment 4 and everything seems to work on my end. Did you make a new directory 'openshift' and cp 'ssh.exe' there? I put a cp of 'ssh.exe' in 'C:\Users\.openshift' and gave that path to ssh cmd: (From C:\Users\root\rhc directory): rhc ssh --ssh ../.openshift/ssh.exe testapp and I was able to ssh in no problems. I did this from Power shell, Ruby cmd prompt and Git Bash. Thank you for re-testing! @Sally I made a new directory such as testdir, and cp ssh.exe into the directory, then rhc ssh --ssh "C:\testdir\ssh.exe" seperately in ruby cmd/win cmd/git bash. Only succeeded in git bash. Same results when I cp "ssh.exe" into .openshift directory and used ../.openshift/ssh.exe path. Another discovery, if the --ssh using the ssh.exe under Git: rhc ssh app --ssh "<Gitpath>\usr\bin\ssh.exe",it can succeed in all bash:ruby cmd/win cmd/git bash Pls check again, here is my system info: Ruby version 2.1.7p400 Windows 10 git 2.7.0 @Yanping, thanks for the info! What's happening is git for Windows (msysgit's) ssh.exe is not meant to be run outside of the Git env. It needs several msys*.dll files to run. The behavior we are seeing is expected. Users may use putty.exe instead, for example, but so long as they are using msysgit's ssh.exe it has to a) be run from Git Bash OR b) be in the Git env The 'rhc ssh --ssh <path to ssh.exe> <app>' is actually working fine, it is locating and running the ssh.exe file. The program can't find several msys*.dll files if the ssh.exe is in a place outside of Git env so it doesn't fully execute. We can expect that users would not move ssh.exe somewhere wacky AND try to run rhc ssh --ssh from outside of Git Bash. Users can (and probably do) place the ssh.exe file in a custom location and run the cmd 'rhc ssh --ssh <path to ssh.exe> <app>' successfully IF they are running from Git Bash, bc Git Bash knows where the necessary 'msys*.dll' files are. Since the "rhc ssh --ssh <path to ssh.exe> appname" works in Git Bash or in the Git env by design according to comment 8 and comment 9. So move the bug to verified. We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause. |