Bug 1233493 - Build starts at random time after creating resources
Summary: Build starts at random time after creating resources
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Cesar Wong
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-19 04:18 UTC by Tomas Schlosser
Modified: 2015-11-23 14:27 UTC (History)
5 users (show)

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


Attachments (Terms of Use)

Description Tomas Schlosser 2015-06-19 04:18:24 UTC
When creating resources from GUI using template, sometimes it takes a while before build is started. It seems random and sometimes the build is started right after creating resources, sometimes it takes up to two minutes before the build starts.

Comment 2 Wenjing Zheng 2015-06-19 06:04:19 UTC
Comments from Openshift QE:
After resources are created, images stream needs to import image tags from registry. Once the tags are generated, a build will be automatically invoked. Importing image tag from registry needs time, so it spends several minutes to start build. I think this is acceptable.

Comment 3 Tomas Schlosser 2015-06-19 07:57:02 UTC
Not true in this case, image streams were created prior to creating templates.

Even if that is the case, it doesn't explain why it takes random time between a second and 2 minutes.

Comment 4 Andy Goldstein 2015-06-19 11:48:13 UTC
Here is possibly what is happening:

1. image stream is created
2. image stream tags are imported
3. build config is created
4. because the image stream tags were already imported, the build config doesn't get any trigger for an image stream update
5. after 2 minutes, the build's image change controller re-examines the image streams (it uses a reflector with a resync period of 2 minutes, which means it reprocesses all streams every 2 minutes)
6. the image change controller sees the tag now, so it kicks off a build

Comment 5 XiuJuan Wang 2015-09-06 06:59:47 UTC
1.Create a django-psql-example template using https://raw.githubusercontent.com/openshift/django-ex/master/openshift/templates/django-postgresql.json file
2.Create an app using django-psql-example template from GUI
3.Now no build is invoked since no imagestreamtag.
4.Create python imagestream
5.Build is invoked in a second after importing imagestreamtag
6.Change something in python image, and push,then import python imagestream again
7.Build is invoked in a second after importing imagestreamtag.

So can't reproduce this issue in devenv-fedora_2287, will mark this bug as verified.

Comment 6 XiuJuan Wang 2015-09-07 05:16:03 UTC
Sorry to verify this bug on wrong env.
Test in ose env
openshift-3.0.1.0-1.git.529.dcab62c.el7ose.x86_64
openshift-master-3.0.1.0-1.git.529.dcab62c.el7ose.x86_64

Build will be invoked in a second after importing imagestreamtag.

Comment 7 Brenton Leanhardt 2015-11-23 14:27:00 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.