Bug 1367829

Summary: dockerImageLayers of image may be empty when pulling from registry.access.redhat.com
Product: OpenShift Container Platform Reporter: Michal Minar <miminar>
Component: ImageStreamsAssignee: Michal Minar <miminar>
Status: CLOSED NOTABUG QA Contact: Wang Haoran <haowang>
Severity: high Docs Contact:
Priority: medium    
Version: 3.3.0CC: aos-bugs, jokerman, miminar, mmccomas, stefw, xiaocwan, yapei
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1366570 Environment:
Last Closed: 2016-08-18 08:43:33 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:
Bug Depends On: 1366570    
Bug Blocks:    

Description Michal Minar 2016-08-17 15:03:38 UTC
+++ This bug was initially created as a clone of Bug #1366570 +++

Description of problem:
For imagestream has no layers it's better to show message indicating no layers

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

How reproducible:
Always

Steps to Reproduce:
1. Create a project and add ImageStreams 
# oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/image-streams/image-streams-rhel7.json
2. Select imagestream python:2.7
3. Check imagestream layers
# oc get istag python:2.7 -o yaml
image:
  dockerImageLayers: null
4. Go to Layers tab of python:2.7

Actual results:
4. A blank frame is displayed

Expected results:
4. Should give some message telling no layers

--- Additional comment from Michal Minar on 2016-08-17 11:02:14 EDT ---

The importer seems to be at fault here. dockerImageLayers shall not be empty for any valid image having layers. And clearly, referenced image [1] does have layers and can be pulled manually using docker 1.10 just fine.

[1] registry.access.redhat.com/rhscl/python-27-rhel7:latest

I'll investigate. Let me clone the bz to Image component.

Comment 1 Michal Minar 2016-08-17 15:07:23 UTC
Another weird thing to note is that import image has crippled name:

    oc import-image --from=registry.access.redhat.com/rhscl/python-27-rhel7:latest --confirm --insecure python:latest
    The import completed successfully.

    Name:                   python
    Namespace:              limits
    Created:                Less than a second ago
    Labels:                 <none>
    Annotations:            openshift.io/image.dockerRepositoryCheck=2016-08-17T14:43:08Z
    Docker Pull Spec:       172.30.241.183:5000/limits/python

    Tag     Spec                                                            Created                 PullSpec        Image
    latest  registry.access.redhat.com/rhscl/python-27-rhel7:latest !       Less than a second ago  <same>          4013d7a9d994b563835d5395b136fc41a53440bc2d5e326bf128bd79aa5c9fff

      ! tag is insecure and can be imported over HTTP or self-signed HTTPS

All the normal image names start with `sha256:` prefix.

Comment 2 Michal Minar 2016-08-18 08:43:33 UTC
Closing this. Not a regression (3.1 does the same). This is what we get out of legacy registry API without fetching all the layer configs.

The image Name is an image ID, not an sha digest.

Feel free to re-open if layer data are necessary to have.

Note that when the same image is pushed to internal registry, the image manifest is set and contains all the layer information.

Comment 3 Michal Fojtik 2016-08-18 09:53:03 UTC
*** Bug 1367661 has been marked as a duplicate of this bug. ***