Bug 1248376 - Installed templates are referencing centos7 database images but not rhel7
Installed templates are referencing centos7 database images but not rhel7
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Templates (Show other bugs)
3.0.0
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Scott Dodson
Gaoyun Pei
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-30 04:01 EDT by Wenjing Zheng
Modified: 2015-11-23 09:24 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 09:24:35 EST
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)

  None (edit)
Description Wenjing Zheng 2015-07-30 04:01:45 EDT
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 11:56:54 EDT
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 12:55:58 EDT
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 10:36:34 EDT
Another option may be to provide different templates, though that's not a great solution.
Comment 5 Ben Parees 2015-07-31 11:03:17 EDT
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 14:23:22 EDT
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 08:49:12 EDT
Value is now parameterizable with a centos default.
Comment 8 Wenjing Zheng 2015-08-04 04:01:37 EDT
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 04:45:34 EDT
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 09:12:53 EDT
Ben, I'll set this back to ON_QA when we've rolled a new installer.
Comment 11 Ben Parees 2015-08-20 13:59:59 EDT
thanks Scott.
Comment 12 Scott Dodson 2015-08-31 09:03:34 EDT
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 02:53:50 EDT
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 09:24:35 EST
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.