Description of problem: After oc import-image with non-existent tag, it outputs inconsistent messages for imagestreams with and without spec.dockerImageRepository. Version-Release number of selected component (if applicable): oc v1.3.0-alpha.1-439-g604ae17 kubernetes v1.3.0-alpha.3-599-g2746284 How reproducible: Always Steps to Reproduce: 1. Create a new ImageStream $ cat python.json { "kind": "ImageStream", "apiVersion": "v1", "metadata": { "name": "python", "creationTimestamp": null }, "spec": { "dockerImageRepository": "wsun/python-33-centos" } } $ oc create -f python.json 2. Import image with a non-existent tag: $ oc import-image python:notexist The import completed successfully. ... Tag Spec Created PullSpec Image latest wsun/python-33-centos:latest 29 minutes ago wsun/python-33-centos@sha256:354d212f9a8c77... <same> ... notexist wsun/python-33-centos 1 seconds ago wsun/python-33-centos@sha256:354d212f9a8c77... <same> 3 $ oc edit is python # Under 'spec', remove dockerImageRepository: wsun/python-33-centos imagestream "python" edited 4 Try import-image with non-existent tag again: $ oc import-image python:none error: the tag "none" does not exist on the image stream - choose an existing tag to import or use the 'tag' command to create a new tag Actual results: For a non-existent tag, step 2 succeeds and step 4 shows error. Expected results: For a non-existent tag, step 2 should also output message to notify that the given tag is not existent. Additional info:
Fix in https://github.com/openshift/origin/pull/12376
Commits pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/d2e21f7ad9bae35395ebcbc26def69ef7e112eff Bug 1348174 - error on non-existing tag when importing from .spec.dockerImageRepository https://github.com/openshift/origin/commit/1e0571e56ac97007937d6ccdfab238c910a8b581 Merge pull request #12376 from soltysh/bug1348174 Merged by openshift-bot
Checked with: $ oc version oc v1.5.0-alpha.1+04db561-37 kubernetes v1.4.0+776c994 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://<master>:8443 openshift v1.5.0-alpha.1+04db561-37 kubernetes v1.4.0+776c994 Using original steps in comment 0, now step 2 also outputs message to notify that the given tag is not existent: error: the tag "notexist" does not exist on the image stream - choose an existing tag to import or use the 'tag' command to create a new tag That's consistent with step 4. Fixed Thx!