Bug 1383138

Summary: [platformmanagement_public_508]Can't trigger deploy by manual when the first build completed with automatic=false in ICT
Product: OKD Reporter: zhou ying <yinzhou>
Component: DeploymentsAssignee: Michail Kargakis <mkargaki>
Status: CLOSED CURRENTRELEASE QA Contact: zhou ying <yinzhou>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, yinzhou
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-09 21:52:24 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:

Description zhou ying 2016-10-10 03:13:07 UTC
Description of problem:
Create app with automatic=false in ICT, after  the first build completed, use 'oc deploy dc/dcname' try to tigger deployment, will meet Error from server: cannot trigger a deployment for "ruby-ex" because it contains unresolved images

Version-Release number of selected component (if applicable):
oc v1.4.0-alpha.0+e76e0e8
kubernetes v1.4.0+776c994
features: Basic-Auth GSSAPI Kerberos SPNEGO

openshift v1.4.0-alpha.0+e76e0e8
kubernetes v1.4.0+776c994

How reproducible:
always

Steps to Reproduce:
1. Login OpenShift and create project;
2. Use command to create app:
   `oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git`
3. Edit the dc with automatic=false in ICT;
4. After the first build completed, check the dc;
5. Try to trigger deploy by command:
  `oc deploy dc/ruby-ex --latest`



Actual results:
4. No update image info for the dc;
5. Can't trigger deployment by manual;
[zhouy@zhouy ~]$ oc deploy ruby-ex --latest
Error from server: cannot trigger a deployment for "ruby-ex" because it contains unresolved images


Expected results:
4. Should update image info to "config.Spec.Triggers[0].ImageChangeParams.LastTriggeredImage"
5. Could trigger deployment by manual command: `oc deploy dc/ruby-ex --latest`


Additional info:

Comment 1 Michail Kargakis 2016-10-10 10:12:30 UTC
Can you try with `oc rollout latest`? `oc deploy --latest` cannot update images in the pod template, it just redeploys what you have. Since we started using the instantiate endpoint in `deploy --latest` it can predict now that your deployment won't be deployed.

Comment 2 zhou ying 2016-10-11 05:50:42 UTC
It's better to change the prompt message then guide user to use 'oc rollout latest' command .

Comment 3 openshift-github-bot 2016-10-14 11:53:28 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/02a2d6265b90cec5f1378ec6cd72e1d0ae1b63e3
Bug 1383138: suggest 'rollout latest' if 'deploy --latest' returns a bad request

Comment 4 zhou ying 2016-10-17 06:20:32 UTC
Confirmed with latest origin, the issue has fixed:
openshift version
openshift v1.4.0-alpha.0+2142bdb
kubernetes v1.4.0+776c994
etcd 3.1.0-alpha.1


oc deploy ruby-ex --latest
error: cannot trigger a deployment for "ruby-ex" because it contains unresolved images - try 'oc rollout latest dc/ruby-ex'