Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1422376 - Cannot build with part of image id when reference ImageStreamImage in imagestream
Cannot build with part of image id when reference ImageStreamImage in imagest...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry (Show other bugs)
3.5.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Michal Fojtik
Wenjing Zheng
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-15 02:09 EST by Wenjing Zheng
Modified: 2017-07-24 10 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-12 15:13:00 EDT
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0884 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 18:50:07 EDT

  None (edit)
Description Wenjing Zheng 2017-02-15 02:09:34 EST
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 08:58:21 EST
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-15 21:27:44 EST
@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 10:45:53 EST
Can you try with `ruby@5dc0856fea9551e102815863` ?
Comment 4 Wenjing Zheng 2017-02-23 01:52:43 EST
(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 14:32:44 EST
Fix: https://github.com/openshift/origin/pull/13090
Comment 6 openshift-github-bot 2017-02-24 03:26:20 EST
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 01:07:20 EST
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 15:13:00 EDT
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.