Bug 1276997 - [platformmanagement_public_514]"reference" is not supported when Kind!=DockerImage in the ImageStream
Summary: [platformmanagement_public_514]"reference" is not supported when Kind!=Docker...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: Image Registry
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-02 03:22 UTC by Wei Sun
Modified: 2015-11-03 03:45 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-03 03:45:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wei Sun 2015-11-02 03:22:56 UTC
Description of problem:
Try to create an ImageStream when  Kind!=DockerImage, but "reference" is not supported,so if Kind!=DockerImage,then I could not create the ImageStream successfully if the json file has "reference".

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

How reproducible:
Always

Steps to Reproduce:
1.Create an ImageStream named python
2.Import the image
3.Create another ImageStream named python27,but kind!=DockerImage
4.Remove the "reference":"false" from the json file

Actual results:
1.$ cat 510527.json 
{

    "kind": "ImageStream",

    "apiVersion": "v1",

    "metadata": {

      "name": "python",

      "creationTimestamp": null

    },

    "spec": {

      "dockerImageRepository": "wsun/python-33-centos"

      }

}

2.$ oc import-image python
Waiting for the import to complete, CTRL+C to stop waiting.
The import completed successfully.

Name:			python
Created:		15 seconds ago
Labels:			<none>
Annotations:		openshift.io/image.dockerRepositoryCheck=2015-11-02T02:53:00Z
Docker Pull Spec:	172.30.125.194:5000/wsuntest/python

Tag	Spec		Created		PullSpec											Image
3.3	<pushed>	14 seconds ago	wsun/python-33-centos@sha256:00ff0c67776058aaa73c9486953b3922230d4bd61544945d08a860b80a6a3a40	
latest	<pushed>	14 seconds ago	wsun/python-33-centos@sha256:354d212f9a8c776a221487f4223211103f2e0c4d42ea97eeae6091523acff3ef	

3.$ cat 27is.json 
{

    "kind": "ImageStream",
    "apiVersion": "v1",
    "metadata": {
      "name": "python27",
      "creationTimestamp": null
     },
    "spec": {
           "tags":[
                      { "name": "3.3",
                         "annotations":
                              { "description": "wsun tests" },
                          "from":
                           {
                               "Kind": "ImageStreamTag",
                                "Name": "python:3.3"
                           },
                          "reference": "false"
                        }
             ]
       }

 }

oc create -f 27is.json 
unable to load "27is.json": json: cannot unmarshal string into Go value of type bool

4.$ oc create -f 27is.json 
imagestream "python27" created

Expected results:
"reference" should be supported when kind!=DockerImage

Additional info:

Comment 1 Maciej Szulik 2015-11-02 15:16:40 UTC
This is not a bug, we're not importing anything for the 2nd time. You'll be able to observe that with https://github.com/openshift/origin/pull/5546 The reason you're seeing the info is because we resolve the ImageStreamTag into the value we've imported in the other is.


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