Bug 1285536 - cannot rsh using cluster admin on master node
Summary: cannot rsh using cluster admin on master node
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 3.x
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-11-25 21:16 UTC by Aleksandar Kostadinov
Modified: 2016-01-08 17:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-08 17:41:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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?


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