Bug 1275564 - [platformmanagement_public_514]Could not import the image when spec.DockerImageRepository not defined
[platformmanagement_public_514]Could not import the image when spec.DockerIma...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Image Registry (Show other bugs)
3.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Maciej Szulik
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-27 05:09 EDT by Wei Sun
Modified: 2015-11-23 16:18 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 16:18:11 EST
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)

  None (edit)
Description Wei Sun 2015-10-27 05:09:44 EDT
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 08:46:49 EDT
The PR fixing this issue is https://github.com/openshift/origin/pull/5521
Comment 2 openshift-github-bot 2015-10-30 14:06:26 EDT
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-01 21:13:40 EST
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.