Bug 1285536

Summary: cannot rsh using cluster admin on master node
Product: OKD Reporter: Aleksandar Kostadinov <akostadi>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED NOTABUG QA Contact: Wei Sun <wsun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.xCC: akostadi, aos-bugs, jliggitt, mmccomas
Target Milestone: ---Keywords: UpcomingRelease
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-08 17:41:59 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:

Description Aleksandar Kostadinov 2015-11-25 21:16:16 UTC
Description of problem:
Not sure I've got component correct. I observe a strange thing. Given a 2 node cluster, I create a pod as  a regular user. Then ssh to master and try to rsh it. That fails. While running the rsh command on a remote machine as the regular user does work just fine.

Version-Release number of selected component (if applicable):
oc v3.1.0.4-9-g72d3991
kubernetes v1.1.0-origin-1107-g4c8e6f4

How reproducible:
always

Actual results:
# oc rsh cakephp-example-1-cutxg --namespace=c48hh -vvvvv
Error from server: pods "cakephp-example-1-cutxg" not found

Expected results:
the bash prompt

Comment 1 Fabiano Franz 2015-12-02 22:47:41 UTC
Jordan please take a look here, does this look like authorization?

Comment 2 Jordan Liggitt 2015-12-02 23:05:59 UTC
I think the namespace argument is not being honored. If I recall correctly, args to rsh need to come before the pod name. Can you rerun with --loglevel=6 to confirm which namespace is being used?

You might need to do this:
oc rsh --namespace=c48hh cakephp-example-1-cutxg

Comment 3 Jordan Liggitt 2015-12-02 23:07:12 UTC
I'm almost certain that is the issue, since -vvvvv isn't valid. You'd need to put --loglevel=… immediately after the "rsh" as well

Comment 4 Aleksandar Kostadinov 2015-12-03 22:26:00 UTC
my bad, didn't realize rsh also can execute command given on command line like `exec`.

In any case would be good to clarify command synopsis:

> oc rsh POD [command] [options]

One can assume `options` is for `oc` options. `exec` command help is a little more clear although it would be good to tell users where to put `oc` options.

Should we leave this bug open for documentation or close as notabug?