Bug 1422376 - Cannot build with part of image id when reference ImageStreamImage in imagestream
Summary: Cannot build with part of image id when reference ImageStreamImage in imagest...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Michal Fojtik
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-15 07:09 UTC by Wenjing Zheng
Modified: 2017-07-24 14:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-12 19:13:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0884 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 22:50:07 UTC

Description Wenjing Zheng 2017-02-15 07:09:34 UTC
Description of problem:
Cannot start build if use part of image id when reference ImageStreamImage in imagestream with below error:
$ oc start-build ruby22-sample-build
The ImageStreamImage "ruby@sha256:5dc0856fea9551e102815863" is invalid: from: Error resolving ImageStreamImage ruby@sha256:5dc0856fea9551e102815863 in namespace wzheng3: unable to find corresponding tag for image "sha256:5dc0856fea9551e102815863"

Version-Release number of selected component (if applicable):
openshift v3.5.0.20+87266c6
kubernetes v1.5.2+43a9be4
etcd 3.1.0

How reproducible:
always

Steps to Reproduce:
1. oc import-image ruby --from=docker.io/openshift/ruby-22-centos7 --confirm=true
2. oc get is ruby -o yaml
3. Use part of image id for ImageStreamImage:  
  strategy:
    sourceStrategy:
      env:
      - name: EXAMPLE
        value: sample-app
      from:
        kind: ImageStreamImage
        name: ruby@sha256:5dc0856fea9551e102815863
    type: Source
4. Start build

Actual results:
$ oc start-build ruby22-sample-build
The ImageStreamImage "ruby@sha256:5dc0856fea9551e102815863" is invalid: from: Error resolving ImageStreamImage ruby@sha256:5dc0856fea9551e102815863 in namespace wzheng3: unable to find corresponding tag for image "sha256:5dc0856fea9551e102815863"

Expected results:
Build should start like using full image id.

Additional info:

Comment 1 Cesar Wong 2017-02-15 13:58:21 UTC
Assigning to the platform management team for confirmation. But my understanding is that this is working as designed. You need a full image id to reference the image. A partial reference is not supported.

Comment 2 Wenjing Zheng 2017-02-16 02:27:44 UTC
@clayton, Could you please confirm? I remember you mentioned partial reference is supported for ImageStreamImage in one pr(sorry, I cannot find it now).

Comment 3 Michal Fojtik 2017-02-22 15:45:53 UTC
Can you try with `ruby@5dc0856fea9551e102815863` ?

Comment 4 Wenjing Zheng 2017-02-23 06:52:43 UTC
(In reply to Michal Fojtik from comment #3)
> Can you try with `ruby@5dc0856fea9551e102815863` ?

Even cannot build with full image id without "sha256:" before image id, I remember it works before.
oc start-build openshift-php-upload-demo
The ImageStreamImage "php@7804e249eae4ffec888ac9f331dfc6b6adae6034acc6a3f9e4c86ed66a760302" is invalid: from: Error resolving ImageStreamImage php@7804e249eae4ffec888ac9f331dfc6b6adae6034acc6a3f9e4c86ed66a760302 in namespace openshift: unable to find corresponding tag for image "7804e249eae4ffec888ac9f331dfc6b6adae6034acc6a3f9e4c86ed66a760302"

Comment 5 Michal Fojtik 2017-02-23 19:32:44 UTC
Fix: https://github.com/openshift/origin/pull/13090

Comment 6 openshift-github-bot 2017-02-24 08:26:20 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/a68742f5d05545edec0b31ee551fdaecdc613dc7
Bug 1422376: Fix resolving ImageStreamImage latest tag

Comment 7 XiuJuan Wang 2017-03-02 06:07:20 UTC
Test against:
openshift v3.5.0.35
kubernetes v1.5.2+43a9be4

Can't reproduce this bug, move to verified, thanks

Comment 9 errata-xmlrpc 2017-04-12 19:13:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0884


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