Bug 1327087

Summary: The creationTimestamp for imagestreamimages is null
Product: OKD Reporter: weiwei jiang <wjiang>
Component: Image RegistryAssignee: Maciej Szulik <maszulik>
Status: CLOSED CURRENTRELEASE QA Contact: ge liu <geliu>
Severity: low Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-30 12:48:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description weiwei jiang 2016-04-14 09:20:43 UTC
Description of problem:
When I try to get a specific imagestreams, I saw the UPDATED time is too old:
# oc get imagestreamimages hello-openshift@sha256:553afd3321b007175b6403cfda6ddd8c675c2d9cef86eeb002301c3b7b818d9b
NAME                      DOCKER REF                                                                                          UPDATED         IMAGENAME
hello-openshift@553afd3   openshift/hello-openshift@sha256:553afd3321b007175b6403cfda6ddd8c675c2d9cef86eeb002301c3b7b818d9b   292 years ago   sha256:553afd3321b007175b6403cfda6ddd8c675c2d9cef86eeb002301c3b7b818d9b
Then I print the raw format of the resource, found the creationTimestamp for the imagestreamimages in null.

Version-Release number of selected component (if applicable):
devenv-rhel7_3966

How reproducible:
always

Steps to Reproduce:
1. Create a imagestream
oc tag --source=docker openshift/hello-openshift:latest wjiang/hello-openshift:latest
2. get the image id of the image
# oc get istag
3. Try to get the imagestreamimages with and without "-o yaml"

Actual results:
3.
# oc get imagestreamimages hello-openshift@sha256:553afd3321b007175b6403cfda6ddd8c675c2d9cef86eeb002301c3b7b818d9b                             
NAME                      DOCKER REF                                                                                          UPDATED         IMAGENAME
hello-openshift@553afd3   openshift/hello-openshift@sha256:553afd3321b007175b6403cfda6ddd8c675c2d9cef86eeb002301c3b7b818d9b   292 years ago   sha256:553afd3321b007175b6
403cfda6ddd8c675c2d9cef86eeb002301c3b7b818d9b
# oc get imagestreamimages hello-openshift@sha256:553afd3321b007175b6403cfda6ddd8c675c2d9cef86eeb002301c3b7b818d9b -o yaml
<......snip......>
metadata:
  creationTimestamp: null
  name: hello-openshift@553afd3
  namespace: wjiang
  selfLink: /oapi/v1/namespaces/wjiang/imagestreamimages/hello-openshift@553afd3

Expected results:
The creationTimestamp should not be null, and should be a valid value.

Additional info:

Comment 1 Maciej Szulik 2016-07-25 13:37:17 UTC
Verified against latest master [1], it's working as expected.

[1] https://github.com/openshift/origin/tree/5c862c0c3a33845e256ab47e00505a57ec330b3e

Comment 2 weiwei jiang 2016-07-27 05:42:16 UTC
Checked with devenv-rhel7_4671 and the issue still can be reproduced.

# oc get imagestreamimage hello-openshift@sha256:11a239ad661fdb6ba6a7d55d849e29367f8fae314ce5100a00782c0d98b65971
NAME                      DOCKER REF                                                                                          UPDATED         IMAGENAME
hello-openshift@11a239a   openshift/hello-openshift@sha256:11a239ad661fdb6ba6a7d55d849e29367f8fae314ce5100a00782c0d98b65971   292 years ago   sha256:11a239ad661fdb6ba6a7d55d849e29367f8fae314ce5100a00782c0d98b65971

# oc get imagestreamimage hello-openshift@sha256:11a239ad661fdb6ba6a7d55d849e29367f8fae314ce5100a00782c0d98b65971 -o yaml
<......snip......>
kind: ImageStreamImage
metadata:
  creationTimestamp: null
  name: hello-openshift@11a239a
  namespace: wjiang
  selfLink: /oapi/v1/namespaces/wjiang/imagestreamimages/hello-openshift@11a239a

Comment 4 Maciej Szulik 2017-01-03 15:08:35 UTC
Verified again with current master [1] and it's working as expected:

$ oc get isimage/python@sha256:609c8ebce3124e50195dcce7cc1ae5d56dcab5e5225aa469ce884fbb3d6c8380 -n openshift -o yaml

<..... snip.....>
kind: ImageStreamImage
metadata:
  creationTimestamp: 2017-01-03T15:03:14Z
  name: python@sha256:609c8ebce3124e50195dcce7cc1ae5d56dcab5e5225aa469ce884fbb3d6c8380
  namespace: openshift
  selfLink: /oapi/v1/namespaces/openshift/imagestreamimages/python@sha256:609c8ebce3124e50195dcce7cc1ae5d56dcab5e5225aa469ce884fbb3d6c8380

Moving back to qa.

[1] https://github.com/openshift/origin/commit/a5eaf994f6e86e28bff529de7da66a708f029699

Comment 5 ge liu 2017-01-04 07:18:57 UTC
recreated it in ocp env, and Verified on origin env:

openshift v3.4.0.35+86b11df
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

[liugecdl@dhcp-137-141 lg]$ oc get imagestreamimages  hello-openshift@sha256:5d2a5bf63f70ac2f963044e1961ca43c79352f57eebd6318b82c1d696310f3e4
NAME                                                                                      DOCKER REF                                                                                          UPDATED         IMAGENAME
hello-openshift@sha256:5d2a5bf63f70ac2f963044e1961ca43c79352f57eebd6318b82c1d696310f3e4   openshift/hello-openshift@sha256:5d2a5bf63f70ac2f963044e1961ca43c79352f57eebd6318b82c1d696310f3e4   2 minutes ago   sha256:5d2a5bf63f70ac2f963044e1961ca43c79352f57eebd6318b82c1d696310f3e4

Comment 6 ge liu 2017-01-04 07:20:15 UTC
Verified in env: 

openshift v1.5.0-alpha.1+f0b6956-19
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0