Bug 1275886 - Unable to run oc rsh to access remote shell
Unable to run oc rsh to access remote shell
Status: CLOSED NOTABUG
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Fabiano Franz
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-28 00:55 EDT by Chris Ryan
Modified: 2015-10-28 16:42 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-28 16:42:05 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 Chris Ryan 2015-10-28 00:55:53 EDT
Description of problem:
When running 'oc rsh', localhost is used.

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


How reproducible:
Always

Steps to Reproduce:
1. Create a project
oc new-project m459q
2. Create a new app
oc new-app --docker-image=openshift/ruby-20-centos7\~https://github.com/openshift/ruby-hello-world --name=myapp
3. Get the pods to rsh into:
oc get pods
4. oc rsh into one of the pods:
oc rsh myapp
or
oc rsh myapp-1-build
or
oc rsh myapp-1-t8uy5


Actual results:
The following error is observed:
error: couldn't read version from server: Get https://localhost:8443/api: dial tcp 127.0.0.1:8443: connection refused

Expected results:
rsh should allow access to the pod

Additional info:
The kubeconfig used does not have localhost configured anywhere in it.
Comment 1 Chris Ryan 2015-10-28 00:57:40 EDT
This was tested using:

oc v1.0.6
kubernetes v1.1.0-alpha.0-1605-g44c91b1
Comment 4 Fabiano Franz 2015-10-28 16:42:05 EDT
'oc rsh' takes everything at the end (starting at the second argument) as  arguments/commands to run through rsh. So the --config flag must always come before the pod name argument, like in:

oc rsh --config=/path/to/kubeconfig POD

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