Bug 1274149 - oc attach could not attach to a running container
oc attach could not attach to a running container
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.0.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Fabiano Franz
Wei Sun
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-22 02:01 EDT by yapei
Modified: 2016-05-25 09:31 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 09:24:27 EST
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 yapei 2015-10-22 02:01:35 EDT
Description of problem:
Run oc attach to a running pod gives error instead of attaching to it

Version-Release number of selected component (if applicable):
oc v1.0.6-835-g4c014f5
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4

How reproducible:
Always

Steps to Reproduce:
1.Create a pod and wait to be Running
$ oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/pods/pod_with_two_containers.json
$ oc get pods
NAME               READY     STATUS    RESTARTS   AGE
doublecontainers   2/2       Running   0          2h
2.oc attach doublecontainers


Actual results:
error: unable to upgrade connection: you must specify at least 1 of stdin, stdout, stderr

Expected results:
Should get output from running pod doublecontainers

Additional info:
Comment 2 Jordan Liggitt 2015-10-22 10:53:06 EDT
Likely the same issue as https://github.com/smarterclayton/kubernetes/commit/7f6f85bd7b47db239868bcd868ae3472373a4f05 fixed in https://github.com/kubernetes/kubernetes/pull/15053

Might need to cherry pick that
Comment 3 Jordan Liggitt 2015-10-22 13:16:59 EDT
should be fixed in https://github.com/openshift/origin/pull/4819
Comment 4 yapei 2015-10-26 22:26:39 EDT
Verified on 
oc v3.0.2.903-29-g49953d6
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4

$ oc attach doublecontainers -c hello-openshift-fedora
serving on 8081
serving on 8888

$ oc attach doublecontainers
Started, serving at 8080

$ oc attach doublecontainers -c hello-openshift
Started, serving at 8080

it could attach to a running container
Comment 5 Brenton Leanhardt 2015-11-23 09:24:27 EST
This fix is available in OpenShift Enterprise 3.1.

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