Bug 1247116 - The new import-image doesn't trigger sti build
The new import-image doesn't trigger sti build
Product: OpenShift Container Platform
Classification: Red Hat
Component: Upgrade (Show other bugs)
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Cesar Wong
Johnny Liu
Depends On:
  Show dependency treegraph
Reported: 2015-07-27 07:34 EDT by Anping Li
Modified: 2015-07-29 23:26 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-07-29 23:26:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
anli: needinfo-

Attachments (Terms of Use)

  None (edit)
Description Anping Li 2015-07-27 07:34:01 EDT
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- to OSE-  

How reproducible:

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
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 08:59:12 EDT
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 11:13:25 EDT
please also show the json output of:
the imagestreams
the buildconfigs
Comment 3 Scott Dodson 2015-07-27 17:07:10 EDT
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 17:16:31 EDT
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 17:20:10 EDT
Also Scott the example templates do have an ICT:

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:

Comment 6 Cesar Wong 2015-07-28 09:02:13 EDT
This is working as designed with v1 registries. Please see discussion here:
Comment 7 Anping Li 2015-07-29 06:17:42 EDT
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.