Bug 1275564 - [platformmanagement_public_514]Could not import the image when spec.DockerImageRepository not defined
Summary: [platformmanagement_public_514]Could not import the image when spec.DockerIma...
Keywords:
Status: CLOSED CURRENTRELEASE
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-10-27 09:09 UTC by Wei Sun
Modified: 2015-11-23 21:18 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 21:18:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wei Sun 2015-10-27 09:09:44 UTC
Description of problem:
Create an ImageStream but spec.DockerImageRepository not defined,but failed to  run `oc import-image` to import image.

Version-Release number of selected component (if applicable):
devenv-rhel7_2566
# oc version
oc v1.0.6-958-gaf948e1
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4

How reproducible:
Always

Steps to Reproduce:
1.Create an ImageStream but spec.DockerImageRepository not defined
2.Import the image
3.

Actual results:
1.ImageStream json file:

{
    "kind": "ImageStream",
    "apiVersion": "v1",
    "metadata": {
      "name": "python",
      "creationTimestamp": null
    },
    "spec": {
          "reference": "false",
           "tags":[
                      { "name": "3.3",
                         "annotations":
                              { "description": "wsun tests" },
                          "from":
                           {
                               "Kind": "DockerImage",
                                "Name": "wsun/python-33-centos"
                           }
                         
                        }
             ]
       }
}
2.# oc import-image python -n wsuntest
error: only image streams with spec.dockerImageRepository set may have images imported

Expected results:
Should import the image successfully

Additional info:

Comment 1 Maciej Szulik 2015-10-30 12:46:49 UTC
The PR fixing this issue is https://github.com/openshift/origin/pull/5521

Comment 2 openshift-github-bot 2015-10-30 18:06:26 UTC
Commits pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/8fff6f3c008a9a584aa6ad6141b4dc6cda4ca77b
Bug 1275564 - Removed the requirement for spec.dockerImageRepository
from import-image command.

https://github.com/openshift/origin/commit/a5c88501522f9cd53141faf03173a484ed5971c6
Merge pull request #5521 from soltysh/bug1275564

Merged by openshift-bot

Comment 3 Wei Sun 2015-11-02 02:13:40 UTC
Verified in the devenv-rhel7_2619.

Result:
# oc import-image python -n wsuntest
Waiting for the import to complete, CTRL+C to stop waiting.
The import completed successfully.

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

Tag	Spec			Created		PullSpec								Image
3.3	wsun/python-33-centos	6 seconds ago	docker.io/wsun/python-33-centos@sha256:354d212f9a8c776a221487f4223211103f2e0c4d42ea97eeae6091523acff3ef	

[root@ip-172-18-14-5 /]# oc get images
NAME                                                                      DOCKER REF
sha256:354d212f9a8c776a221487f4223211103f2e0c4d42ea97eeae6091523acff3ef   docker.io/wsun/python-33-centos@sha256:354d212f9a8c776a221487f4223211103f2e0c4d42ea97eeae6091523acff3ef


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