Bug 1275886 - Unable to run oc rsh to access remote shell
Summary: Unable to run oc rsh to access remote shell
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-28 04:55 UTC by Chris Ryan
Modified: 2015-10-28 20:42 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-28 20:42:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Chris Ryan 2015-10-28 04:55:53 UTC
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 04:57:40 UTC
This was tested using:

oc v1.0.6
kubernetes v1.1.0-alpha.0-1605-g44c91b1

Comment 4 Fabiano Franz 2015-10-28 20:42:05 UTC
'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.