Bug 1276213 - The logs for all the containers are the same with the first container when the pod has multiple containers.
The logs for all the containers are the same with the first container when th...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Management Console (Show other bugs)
3.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Samuel Padgett
yapei
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-29 02:00 EDT by Yanping Zhang
Modified: 2015-11-23 16:13 EST (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 16:13:05 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)
first-container (133.27 KB, image/png)
2015-10-29 02:03 EDT, Yanping Zhang
no flags Details
second-container (132.94 KB, image/png)
2015-10-29 02:04 EDT, Yanping Zhang
no flags Details
third-container (134.72 KB, image/png)
2015-10-29 02:05 EDT, Yanping Zhang
no flags Details

  None (edit)
Description Yanping Zhang 2015-10-29 02:00:56 EDT
Description of problem:
Create a pod with multiple containers, check each containter's log on web console. The logs for all the containers are the same with the first container.

Version-Release number of selected component (if applicable):
openshift v1.0.6-1053-gbd6a762
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4
etcd 2.1.2


How reproducible:
Always

Steps to Reproduce:
1.Create a pod with multiple containers.
$ oc create -f multiple-container.yaml -n prozyp
2.Check all the containers's log on cli.
3.View all the containers's log on web console.

Actual results:
2.
$ oc logs multiplecontainers -c hello-openshift -n prozyp
Started, serving at 8080
$ oc logs multiplecontainers -c hello-two -n prozyp
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
$ oc logs multiplecontainers -c hello-openshift-fedora -n prozyp
serving on 8081
serving on 8888
3.All the logs are the same with the first container's log. Pls refer to the attachments.

Expected results:
3.On web console,the logs should be same with the output of `oc logs`.

Additional info:
Comment 1 Yanping Zhang 2015-10-29 02:03 EDT
Created attachment 1087376 [details]
first-container
Comment 2 Yanping Zhang 2015-10-29 02:04 EDT
Created attachment 1087377 [details]
second-container
Comment 3 Yanping Zhang 2015-10-29 02:05 EDT
Created attachment 1087378 [details]
third-container
Comment 4 Jessica Forrester 2015-10-29 09:45:10 EDT
Ben, I saw this at the end of the day yesterday, its because of this line:
https://github.com/openshift/origin/commit/a03cd35eb8f7a332503022ebc6b3e9fc1152d459#diff-e81d5d378cb83bfc99a6fb64f5e492b6R102

Any time runLogs gets called its resetting container to containers[0].name
Comment 5 Jessica Forrester 2015-10-29 11:20:49 EDT
PR https://github.com/openshift/origin/pull/5489
Comment 6 Samuel Padgett 2015-10-30 13:17:30 EDT
5489 was closed in place of 5537

https://github.com/openshift/origin/pull/5537
Comment 7 Yanping Zhang 2015-11-01 21:46:25 EST
Tested on devenv-rhel7_2619.
openshift v1.0.7-109-g3cf7f3c
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4
etcd 2.1.2
Steps to verify:
1.Create a pod with multiple containers.
$ oc create -f multiple-container.yaml -n prozyp
2.View all the containers' log on web console.
When switch container, the log is displayed correctly for the container.

The bug has been fixed, so move the bug to Verified.

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