Description of problem: During my testing, I discovered that the container image and "lastTriggeredImage" are updating to the latest image after each successful build, even though a deployment isn't being started. Script to reproduce described behavior. Version-Release number of selected component (if applicable): OCP 3.3.0 How reproducible: Always Steps to Reproduce: 1.run the attached script 2. 3. Actual results: ImageChange Trigger not triggering new deploy pods after a successful build Expected results: ImageChange Trigger shall trigger deployment of new pods after a successful build Additional info:
Created attachment 1273368 [details] reproducer script
For clarification, the container image and "lastTriggeredImage" is being updated it the DeploymentConfig, and "imageChangeParams.automatic" remains true. However, a deployment isn't started after an image change. After `oc deploy myapp --latest` is manually executed, the trigger starts working again.
The problem seems to be the `oc patch` and the `oc set triggers` both strips the `lastTriggeredImage`. If you don't erase that field, the trigger will continue to work properly. We are still investigating this as it seems like a bug in the controller.
`lastTriggeredImage` is still in the DeploymentConfig. It is even updated after an `oc start-build`, even though a new deployment isn't started. `oc export` does not output `lastTriggeredImage`, but it can be view with `oc edit`.
*** Bug 1444544 has been marked as a duplicate of this bug. ***
(In reply to Garrett Hyde from comment #6) > `lastTriggeredImage` is still in the DeploymentConfig. It is even updated > after an `oc start-build`, even though a new deployment isn't started. > > `oc export` does not output `lastTriggeredImage`, but it can be view with > `oc edit`. In what I observed, when the lastTriggeredImage is removed from the trigger, the trigger will stop working and you have to `oc rollout latest dc/foo` to make it work again (at least in the latest master of openshift)... I assume the customer use 3.3, I will try to reproduce that there.
I can see that the reproducer script does not work against 3.3 cluter (the oc new-app will fail) so I assume this was reproduced against 3.5/3.6 ?
(In reply to Michal Fojtik from comment #9) > I can see that the reproducer script does not work against 3.3 cluter (the > oc new-app will fail) so I assume this was reproduced against 3.5/3.6 ? I ran the reproducer script against a 3.3 cluster.
PR: https://github.com/openshift/origin/pull/13886 The problem is the lastTriggeredImage that we store in the previous RC does not match with the current DC version. In that case we stop the trigger because the images are different. The PR should allow to replace the trigger with a different ICT (it will detect that DC has a new trigger defined) and allow the controller to rollout on the new image change.