Bug 1355976

Summary: Cannot trigger deploy after create app from installed template
Product: OpenShift Container Platform Reporter: Wang Haoran <haowang>
Component: openshift-controller-managerAssignee: Michail Kargakis <mkargaki>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: high Docs Contact:
Priority: high    
Version: 3.3.0CC: aos-bugs, dmcphers, maszulik, mfojtik, mifiedle, tdawson, vlaad, xtian, xxia
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
We never triggered deployments when the respective deployment configs were created and pointed to already existing images via triggers. Instead we had to wait for the resync interval of the image change controller in order to relist all image streams and update all image change triggered configs. Now the image change controller is smart enough to reconcile the required image stream when it observes a deployment config creation.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-27 09:39:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dc.json none

Description Wang Haoran 2016-07-13 07:57:29 UTC
Created attachment 1179127 [details]
dc.json

Description of problem:
Cannot trigger deploy after create app from installed template

Version-Release number of selected component (if applicable):
openshift v3.3.0.4
kubernetes v1.3.0+57fb9ac
etcd 2.3.0+git

How reproducible:
always

Steps to Reproduce:
1.Create app from installed template
  $oc new-app rails-postgresql-example
2.check the pod
  $oc get pod
3.Check deploy
# oc deploy postgresql
postgresql deployment #1 waiting on image or update
4.check the imagestream status are correct
# oc get is postgresql -n openshift
NAME         DOCKER REPO                                TAGS                      UPDATED
postgresql   172.30.247.172:5000/openshift/postgresql   9.2,9.4,9.5 + 1 more...   About an hour ago

Actual results:
postgresql cannot deploy automaticlly

Expected results:
Can trigger deploy correctly.

Additional info:

Comment 1 Vikas Laad 2016-07-13 19:51:52 UTC
This happens with mysql also.

Comment 2 Michail Kargakis 2016-07-14 07:52:43 UTC
Won't the deployment trigger after about 2 minutes? Github issue: https://github.com/openshift/origin/issues/9018

Comment 3 Michail Kargakis 2016-07-14 08:56:47 UTC
Fixed in https://github.com/openshift/origin/pull/9349

Comment 4 Wang Haoran 2016-08-03 05:35:45 UTC
It works now with the new puddle 
openshift version
openshift v3.3.0.12
kubernetes v1.3.0+57fb9ac
etcd 2.3.0+git

Comment 5 Xingxing Xia 2016-08-03 10:13:55 UTC
(In reply to Wang Haoran from comment #4)
> It works now with the new puddle 
> openshift version
> openshift v3.3.0.12

But I still met similar issue in openshift v3.3.0.13:
1. Check imagestream:
$ oc get is -n openshift
jenkins   172.31.106.239:5000/openshift/jenkins  1,latest        25 hours ago
-- <snipped> --
mysql     172.31.106.239:5000/openshift/mysql    5.5,5.6,latest  25 hours ago

2.
$ oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.json
It creates these dc's:
$ oc get dc
NAME       REVISION   DESIRED   CURRENT   TRIGGERED BY
database   0          1         0         config,image(mysql:5.6)
jenkins    0          1         0         config,image(jenkins:1)

These dc's have spec.template.spec.containers.image as ' ', and define imageChangeParams like:
      from:
        kind: ImageStreamTag
        name: mysql:5.6
        namespace: openshift

3. Check dc after long time (e.g. half an hour)
$ oc deploy database
database deployment #1 waiting on image or update
$ oc deploy jenkins
jenkins deployment #1 waiting on image or update

Comment 6 Xingxing Xia 2016-08-03 11:05:38 UTC
Hmm, I met comment 5 because the OCP env I used may have problem (new project does not create any service account. Still researching it).
Tried another OCP env, comment 5 is not reproduced.

Comment 9 Michail Kargakis 2016-08-18 08:06:10 UTC
Fixed by https://github.com/openshift/origin/pull/10456

Comment 10 Wang Haoran 2016-08-22 06:40:13 UTC
Verified with :
openshift v3.3.0.23-dirty
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

Comment 12 errata-xmlrpc 2016-09-27 09:39:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1933