Bug 1248376 - Installed templates are referencing centos7 database images but not rhel7
Summary: Installed templates are referencing centos7 database images but not rhel7
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Templates
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Scott Dodson
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-30 08:01 UTC by Wenjing Zheng
Modified: 2015-11-23 14:24 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 14:24:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wenjing Zheng 2015-07-30 08:01:45 UTC
Description:
The database image in quickstart templates are using centos7 images, especially in enterprise version, only support rhel7 images, this is also inconsistent with the image in build strategy part(there is using imagestream under openshift project):

For example:
# oc get template dancer-mysql-example -n openshift -o yaml
strategy:
      sourceStrategy:
        from:
          kind: ImageStreamTag
          name: perl:5.16
          namespace: openshift
      type: Source
.............................................
spec:
        containers:
       .............................
          image: openshift/mysql-55-centos7
          name: mysql
          ports:
          - containerPort: 3306
          
The database image in dc should using rhel7 one, and we also need make sure user could get those images from correct registry. Currently user could get them from registry.access.redhat.com/openshift3/

Version-Release number of selected component (if applicable):


How reproducible:
always

steps to Reproduce:
1. Install openshift enterprise using sh <(curl -s https://install.openshift.com/ose) or openshift-ansible repo

2. Find out which installed templates are using "centos" images.

# for i in `oc get template -n openshift|grep -v NAME |awk '{print $1}'`;do oc get template $i -n openshift -o yaml | grep -q "centos" && echo $i; done
cakephp-mysql-example
dancer-mysql-example
django-postgresql-example
nodejs-mongodb-example
rails-postgresql-example


Actual results:
Found the above templates in step 2 is using centos database images.

Expected results:
In installed default templates, should use rhel7 db images, and could download these images successfully.

Additional info:

Comment 2 Ben Parees 2015-07-30 15:56:54 UTC
This is somewhat complicated.  We chose the centos image because it's the least common denominator.

Ideally we'd just reference the "mysql" imagestreamtag in the deploymentconfig, but to do that we'd have to have an imagechangetrigger in the DC, you can't just reference an IST in the "image" field of a DC.  If we did that, you'd get whichever mysql you installed imagestreams for (centos or rhel).  

But we don't want an imagechangetrigger on the DC because the ephemeral DB will lose all its data if it gets redeployed, so we want to minimize the conditions under which the DB pod will get redeployed.

So we're kinda stuck.  Dan Mace, any other options i'm not considering here?

That said, it's just a sample app, it's probably not the worst thing in the world that it uses the centos DB image.

Comment 3 Dan Mace 2015-07-30 16:55:58 UTC
Ben,

I don't think you missed any options. Containers defined in a deployment config only get their image refs replaced w/ ISTs when there are image triggers defined.

Comment 4 Scott Dodson 2015-07-31 14:36:34 UTC
Another option may be to provide different templates, though that's not a great solution.

Comment 5 Ben Parees 2015-07-31 15:03:17 UTC
yeah i'd prefer to avoid a proliferation of templates.  we could parameterize the image to use though, and default to centos.

Comment 6 Ben Parees 2015-07-31 18:23:22 UTC
parameterizing this value here and other PRs to the -ex repos:
https://github.com/openshift/dancer-ex/pull/20/files

so it'll still default to centos but i'll be easy to set to the rhel image if desired.

Comment 7 Ben Parees 2015-08-03 12:49:12 UTC
Value is now parameterizable with a centos default.

Comment 8 Wenjing Zheng 2015-08-04 08:01:37 UTC
QE have tested with below repos, db image can be customized:
https://github.com/openshift/nodejs-ex
https://github.com/openshift/dancer-ex
https://github.com/openshift/django-ex
https://github.com/openshift/rails-ex
https://github.com/openshift/cakephp-ex

Will verify this bug after installed templates are updated.

Comment 9 Wenjing Zheng 2015-08-20 08:45:34 UTC
The templates their-selves are updated with fix which I have verified; but with latest env installed with openshift-ansible repo, the db image value doesn't been parameterized, so assign this bug back.
openshift v3.0.1.0-528-g8c2fe51
kubernetes v1.0.0

Comment 10 Scott Dodson 2015-08-20 13:12:53 UTC
Ben, I'll set this back to ON_QA when we've rolled a new installer.

Comment 11 Ben Parees 2015-08-20 17:59:59 UTC
thanks Scott.

Comment 12 Scott Dodson 2015-08-31 13:03:34 UTC
The pull request has been merged into openshift-ansible master, so this is going back ON_QA

https://github.com/openshift/openshift-ansible/pull/498

Comment 13 Wenjing Zheng 2015-09-01 06:53:50 UTC
Verified with below version and db images for quickstart templates can be customized.
openshift v3.0.1.900-dirty
kubernetes v1.1.0-alpha.0-1605-g44c91b1

Comment 14 Brenton Leanhardt 2015-11-23 14:24:35 UTC
This fix is available in OpenShift Enterprise 3.1.


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