Bug 1578672 - OpenShift XpaaS template don't correspond to it's image streams
Summary: OpenShift XpaaS template don't correspond to it's image streams
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Templates
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.6.z
Assignee: Ben Parees
QA Contact: XiuJuan Wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-16 06:36 UTC by Sudarshan Chaudhari
Modified: 2021-09-09 14:05 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Imagestream tags were not explicitly requesting import. Consequence: The imagestream will just import the first 5 tags from the repository. Fix: Explicitly mark tags to be imported. Result: The declared tags will all be imported instead of a random first 5 tags.
Clone Of:
Environment:
Last Closed: 2018-06-07 08:40:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1801 0 None None None 2018-06-07 08:40:49 UTC

Description Sudarshan Chaudhari 2018-05-16 06:36:38 UTC
Description of problem:

Imported both templates and image streams for XpaaS components using these commands:
```
oc create -f /usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/v3.6/xpaas-templates/eap64-basic-s2i.json -n openshift
oc create -f /usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/v3.6/xpaas-streams/jboss-image-streams.json -n openshift
```
Both the template and image stream were created, although the redhat registry returns 1.8 tags for image stream jboss-eap64-openshift:
```
oc get is jboss-eap64-openshift -n openshift
NAME                    DOCKER REPO                                              TAGS                            UPDATED
jboss-eap64-openshift   registry.access.redhat.com/jboss-eap-6/eap64-openshift   1.8,1.8-10,1.8-13 + 2 more...   16 minutes ago
```

The templates on the other hand refer to an image tag: jboss-eap64-openshift:1.5
```
grep '"from": {' -A 4  /usr/share/ansible/openshift-ansible/roles/openshift_examples/files/examples/v3.6/xpaas-templates/eap64*
```

Tag 1.5 doesn't seem to be available from the image stream, resulting in a failed deployment.

```
error An error occurred while starting the build. Reason: Error resolving ImageStreamTag jboss-eap64-openshift:1.5 in namespace openshift: unable to find latest tagged image 
```

This issue applies to multiple jboss-eap* templates with a fixed source image tag.


Version-Release number of selected component (if applicable):
# rpm -qa | grep openshift

atomic-openshift-3.6.173.0.96-1.git.4.e6301f8.el7.x86_64
atomic-openshift-clients-3.6.173.0.96-1.git.4.e6301f8.el7.x86_64
atomic-openshift-docker-excluder-3.6.173.0.96-1.git.4.e6301f8.el7.noarch
atomic-openshift-excluder-3.6.173.0.96-1.git.4.e6301f8.el7.noarch
atomic-openshift-master-3.6.173.0.96-1.git.4.e6301f8.el7.x86_64
atomic-openshift-node-3.6.173.0.96-1.git.4.e6301f8.el7.x86_64
atomic-openshift-sdn-ovs-3.6.173.0.96-1.git.4.e6301f8.el7.x86_64
atomic-openshift-utils-3.6.173.0.112-1.git.2.17a27d3.el7.noarch
openshift-ansible-3.6.173.0.112-1.git.2.17a27d3.el7.noarch
openshift-ansible-callback-plugins-3.6.173.0.112-1.git.2.17a27d3.el7.noarch
openshift-ansible-docs-3.6.173.0.112-1.git.2.17a27d3.el7.noarch
openshift-ansible-filter-plugins-3.6.173.0.112-1.git.2.17a27d3.el7.noarch
openshift-ansible-lookup-plugins-3.6.173.0.112-1.git.2.17a27d3.el7.noarch
openshift-ansible-playbooks-3.6.173.0.112-1.git.2.17a27d3.el7.noarch
openshift-ansible-roles-3.6.173.0.112-1.git.2.17a27d3.el7.noarch
tuned-profiles-atomic-openshift-node-3.6.173.0.96-1.git.4.e6301f8.el7.x86_64


How reproducible:

Always

Steps to Reproduce:
1. Create project
2. Create new-app using template jboss-eap-s2i


Actual results:

The Application fails stating no deploymet available as the image is not been pulled.

Expected results:

Jboss should be deployed properly with sample project.

Additional info:
attaching template, imagestream and describe of template to BZ

Comment 4 Ben Parees 2018-05-16 14:03:30 UTC
the xpaas imagestreams in the 3.6 directory of the v3.6 branch are missing the "from" statements which ensure the imagestreamtag gets imported, you can see the correct syntax in the 3.7 imagestream here:
https://github.com/openshift/openshift-ansible/blob/release-3.7/roles/openshift_examples/files/examples/v3.6/xpaas-streams/jboss-image-streams.json#L302-L305

Seems like it was fixed in the 3.6 version of the 3.7 branch:
https://github.com/openshift/openshift-ansible/blob/release-3.7/roles/openshift_examples/files/examples/v3.6/xpaas-streams/jboss-image-streams.json#L302-L305

but not in the 3.6 version of the 3.6 branch:
https://github.com/openshift/openshift-ansible/blob/release-3.6/roles/openshift_examples/files/examples/v3.6/xpaas-streams/jboss-image-streams.json#L242-L252


not sure if the change to the 3.7 branch was supposed to be sufficient to get the fix out for 3.6 customers?

Comment 5 Scott Dodson 2018-05-16 19:34:20 UTC
Yeah, it needs to be fixed in v3.6 content on the release-3.6 branch to reach customers.

Comment 8 XiuJuan Wang 2018-05-30 03:08:56 UTC
All xpass IS and IStag have created and imported successfully in 3.6 env.

openshift v3.6.173.0.122
kubernetes v1.6.1+5115d708d7

Comment 10 errata-xmlrpc 2018-06-07 08:40:35 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-2018:1801


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