Bug 1276213 - The logs for all the containers are the same with the first container when the pod has multiple containers.
Summary: The logs for all the containers are the same with the first container when th...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Management Console
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-29 06:00 UTC by Yanping Zhang
Modified: 2015-11-23 21:13 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 21:13:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
first-container (133.27 KB, image/png)
2015-10-29 06:03 UTC, Yanping Zhang
no flags Details
second-container (132.94 KB, image/png)
2015-10-29 06:04 UTC, Yanping Zhang
no flags Details
third-container (134.72 KB, image/png)
2015-10-29 06:05 UTC, Yanping Zhang
no flags Details

Description Yanping Zhang 2015-10-29 06:00:56 UTC
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 06:03:46 UTC
Created attachment 1087376 [details]
first-container

Comment 2 Yanping Zhang 2015-10-29 06:04:35 UTC
Created attachment 1087377 [details]
second-container

Comment 3 Yanping Zhang 2015-10-29 06:05:10 UTC
Created attachment 1087378 [details]
third-container

Comment 4 Jessica Forrester 2015-10-29 13:45:10 UTC
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 15:20:49 UTC
PR https://github.com/openshift/origin/pull/5489

Comment 6 Samuel Padgett 2015-10-30 17:17:30 UTC
5489 was closed in place of 5537

https://github.com/openshift/origin/pull/5537

Comment 7 Yanping Zhang 2015-11-02 02:46:25 UTC
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.