When viewing logs for a pod with multiple containers in the web console, it was possible for log output from more than one container to mix together after switching the selected container a few times. The issue has been fixed. The logs now only contain content for the selected container.
Description of problem:
Launching the following pod:
apiVersion: v1
kind: Pod
metadata:
name: counter
spec:
containers:
- name: count
image: busybox
args:
- /bin/sh
- -c
- >
i=0;
while true;
do
echo "$i: $(date)" >> /var/log/1.log;
echo "$(date) INFO $i" >> /var/log/2.log;
i=$((i+1));
sleep 1;
done
volumeMounts:
- name: varlog
mountPath: /var/log
- name: count-log-1
image: busybox
args: [/bin/sh, -c, 'tail -n+1 -f /var/log/1.log']
volumeMounts:
- name: varlog
mountPath: /var/log
- name: count-log-2
image: busybox
args: [/bin/sh, -c, 'tail -n+1 -f /var/log/2.log']
volumeMounts:
- name: varlog
mountPath: /var/log
volumes:
- name: varlog
emptyDir: {}
When viewing the logs from the web console, and selecting "count-log-1" or "count-log-2", and then selecting another container causes the logs to "bleed" into the other views (I'm guessing the original websocket just never closes, so now both websockets just write into the same window)
Version-Release number of selected component (if applicable):
OpenShift Master: v3.3.1.3
Kubernetes Master: v1.3.0+52492b4
How reproducible:
always
Steps to Reproduce:
1. oc create -f https://raw.githubusercontent.com/kubernetes/kubernetes.github.io/master/docs/user-guide/logging/examples/two-files-counter-pod-streaming-sidecar.yaml
2. View logs tab for pod in web console
3. Toggle between "count-log-1" and then back to "count".
Actual results:
The logs from "count-log-1" continue to show in "count"
Expected results:
"count" should remain empty
Additional info:
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2017:0884
Description of problem: Launching the following pod: apiVersion: v1 kind: Pod metadata: name: counter spec: containers: - name: count image: busybox args: - /bin/sh - -c - > i=0; while true; do echo "$i: $(date)" >> /var/log/1.log; echo "$(date) INFO $i" >> /var/log/2.log; i=$((i+1)); sleep 1; done volumeMounts: - name: varlog mountPath: /var/log - name: count-log-1 image: busybox args: [/bin/sh, -c, 'tail -n+1 -f /var/log/1.log'] volumeMounts: - name: varlog mountPath: /var/log - name: count-log-2 image: busybox args: [/bin/sh, -c, 'tail -n+1 -f /var/log/2.log'] volumeMounts: - name: varlog mountPath: /var/log volumes: - name: varlog emptyDir: {} When viewing the logs from the web console, and selecting "count-log-1" or "count-log-2", and then selecting another container causes the logs to "bleed" into the other views (I'm guessing the original websocket just never closes, so now both websockets just write into the same window) Version-Release number of selected component (if applicable): OpenShift Master: v3.3.1.3 Kubernetes Master: v1.3.0+52492b4 How reproducible: always Steps to Reproduce: 1. oc create -f https://raw.githubusercontent.com/kubernetes/kubernetes.github.io/master/docs/user-guide/logging/examples/two-files-counter-pod-streaming-sidecar.yaml 2. View logs tab for pod in web console 3. Toggle between "count-log-1" and then back to "count". Actual results: The logs from "count-log-1" continue to show in "count" Expected results: "count" should remain empty Additional info: