Bug 1247116 - The new import-image doesn't trigger sti build
Summary: The new import-image doesn't trigger sti build
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Cesar Wong
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-27 11:34 UTC by Anping Li
Modified: 2015-07-30 03:26 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-30 03:26:06 UTC
Target Upstream Version:
Embargoed:
anli: needinfo-


Attachments (Terms of Use)

Description Anping Li 2015-07-27 11:34:01 UTC
Description of problem:
During openshift upgrade, after openshift cartridge images was updated by "oc import-image IMAGESTREAM". The images upgrade didn't trigger sti build automatically. And  the old applications and new application was still using old source images to do sti-build. 

Version-Release number of selected component (if applicable):
OSE-3.0.0.1 to OSE-3.0.1.0  

How reproducible:
always

Steps to Reproduce:
1. Create a docker registry sever (registry1) and pull images from  registry.access.redhat.com and push into this server.
2. Create Testing Enviroment and create images-stream using registry1 url
3. Create project and applications
4. Push lastest images to registry1 (Now Those images in registry1 have different image ids with registry.access.redhat.com )
5. oc import-image IMAGESTREAM 

6. Check the image IDs.  
oc get images -n openshift
7. Check those applications created by step 3
8. Create new applicaiton.

Actual results:
5. No new sti-build was triggerred.

6. There are two images IDs for same version of images
[root@master ~]# oc get images -n openshift
2b8583f742ac6c759a342033dceedf360f5e4d7a1c3eef4d073f3ecbb9f492e2          registry.osev3.com.us:5000/openshift3/php-55-rhel7:latest
<---snip--->
e5c166d72b70c0dd5ddde8573ef1f176d5a586a9171ad0d66894addf7ccc6cd5          registry.osev3.com.us:5000/openshift3/php-55-rhel7:latest
7. Those applications still use the old version of images.
8. The new applications also use the old version of images.

Expected results:
Once there images are imported during upgrade, openshift should tridgger Sti-build to using the new images automatically.

Additional info:

Comment 1 Brenton Leanhardt 2015-07-27 12:59:12 UTC
Would you mind pasting one of your deployment configs?  We need to make sure that the trigger was set up correctly.

Comment 2 Ben Parees 2015-07-27 15:13:25 UTC
please also show the json output of:
the imagestreams
the buildconfigs

Comment 3 Scott Dodson 2015-07-27 21:07:10 UTC
Perhaps this is just a misunderstanding. I have cakephp, dancer, django, nodejs examples and none of them have ImageChange triggers on the s2i images that built them.

Comment 4 Ben Parees 2015-07-27 21:16:31 UTC
I think Cesar actually just discovered independently what is going on here...  it's a legitimate bug in how we store the last triggered imageid.

Comment 5 Ben Parees 2015-07-27 21:20:10 UTC
Also Scott the example templates do have an ICT:
https://github.com/openshift/django-ex/blob/master/openshift/templates/django-postgresql.json#L98

the ICT itself no longer specifies the Image it's triggered on, it implicitly is triggered by a change to the Image that the BuildConfig Strategy references, ie:

https://github.com/openshift/django-ex/blob/master/openshift/templates/django-postgresql.json#L83-L87

Comment 6 Cesar Wong 2015-07-28 13:02:13 UTC
This is working as designed with v1 registries. Please see discussion here:
https://github.com/openshift/origin/pull/3923

Comment 7 Anping Li 2015-07-29 10:17:42 UTC
As smarterclayton said "Actually the real fix is to drop support for old registries". 
When shall we do this update?
Does that mean after that update "The import-image will trigger sti build and deployment"?


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