Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1454674 - started time for init container is wrong
started time for init container is wrong
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
3.6.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Seth Jennings
Weihua Meng
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-23 05:45 EDT by Weihua Meng
Modified: 2017-08-16 15 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-10 01:25:32 EDT
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1716 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 05:02:50 EDT

  None (edit)
Description Weihua Meng 2017-05-23 05:45:37 EDT
Description of problem:
started time for init container is wrong

Version-Release number of selected component (if applicable):
openshift v3.6.79

How reproducible:
Always

Steps to Reproduce:
1. create a pod with init container

cat pod-init-containers.yaml
apiVersion: v1
kind: Pod
metadata:
  name: init-container
spec:
  containers:
  - name: hello-pod
    image: docker.io/ocpqe/hello-pod
    ports:
    - containerPort: 80
    volumeMounts:
    - name: workdir
      mountPath: /usr/share/nginx/html
  initContainers:
  - name: init
    image: centos:centos7
    command:
    - /bin/bash
    - "-c"
    - "sleep 30"
  restartPolicy: Always
  volumes:
  - name: workdir
    emptyDir: {}

2. wait 1 min, when the pod status is running, exam pod with oc describe 

Actual results:
<---snip--->
Init Containers:
  init:
    Container ID:	docker://96e11db3fef6cc413752b759149839538c9baa49ec99084c8cb42c08243d721e
    Image:		centos:centos7
    Image ID:		docker-pullable://docker.io/centos@sha256:bba1de7c9d900a898e3cadbae040dfe8a633c06bc104a0df76ae24483e03c077
    Port:		
    Command:
      /bin/bash
      -c
      sleep 30
    State:		Terminated
      Reason:		Completed
      Exit Code:	0
      Started:		Mon, 01 Jan 0001 00:00:00 +0000
      Finished:		Tue, 23 May 2017 17:11:51 +0800
    Ready:		True
    Restart Count:	0
<---snip--->

Expected results:
unexpected:
      Started:		Mon, 01 Jan 0001 00:00:00 +0000

expected:
      Started:		Tue, 23 May 2017 17:11:21 +0800

Additional info:
The Started time for init container is correct when init container is running.
Comment 1 Seth Jennings 2017-05-23 17:40:41 EDT
Confirmed.  After init container completion, startedAt is null in the status and the annotation:

pod.beta.kubernetes.io/init-container-statuses: '[{"name":"init","state":{"terminated":{"exitCode":0,"reason":"Completed","startedAt":null,"finishedAt":"2017-05-23T21:27:25Z","containerID":"docker://87ea803bfd647a734289ae521bbd4c74db638ca9790d883a46572ce1f19ada3f"}},"lastState":{},"ready":true,"restartCount":0,"image":"docker.io/centos:centos7","imageID":"docker-pullable://docker.io/centos@sha256:bba1de7c9d900a898e3cadbae040dfe8a633c06bc104a0df76ae24483e03c077","containerID":"docker://87ea803bfd647a734289ae521bbd4c74db638ca9790d883a46572ce1f19ada3f"}]'

initContainerStatuses:
  - containerID: docker://87ea803bfd647a734289ae521bbd4c74db638ca9790d883a46572ce1f19ada3f
    image: docker.io/centos:centos7
    imageID: docker-pullable://docker.io/centos@sha256:bba1de7c9d900a898e3cadbae040dfe8a633c06bc104a0df76ae24483e03c077
    lastState: {}
    name: init
    ready: true
    restartCount: 0
    state:
      terminated:
        containerID: docker://87ea803bfd647a734289ae521bbd4c74db638ca9790d883a46572ce1f19ada3f
        exitCode: 0
        finishedAt: 2017-05-23T21:27:25Z
        reason: Completed
        startedAt: null
Comment 3 Seth Jennings 2017-05-23 18:35:43 EDT
Origin PR:
https://github.com/openshift/origin/pull/14312
Comment 5 Weihua Meng 2017-06-05 03:51:28 EDT
Verified on openshift v3.6.94
Fixed.

    State:		Terminated
      Reason:		Completed
      Exit Code:	0
      Started:		Mon, 05 Jun 2017 15:47:15 +0800
      Finished:		Mon, 05 Jun 2017 15:47:45 +0800
Comment 7 errata-xmlrpc 2017-08-10 01:25:32 EDT
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/RHEA-2017:1716

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