Bug 1371403 - Manual deployment for a dc should have trigger cause correctly rather than as same as previous deployment
Summary: Manual deployment for a dc should have trigger cause correctly rather than as...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: openshift-controller-manager
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Michail Kargakis
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-30 07:12 UTC by Xingxing Xia
Modified: 2017-03-08 18:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Before, oc deploy --latest was updating latestVersion directly from the API which made it impossible to separate between manual and automatic updates. Since the instantiate endpoint was added, we are able to distinguish between those types of updates iow. the api call for a manual deployment is distinguishable now.
Clone Of:
Environment:
Last Closed: 2017-01-18 12:52:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Manual deployments shown on web console (20.40 KB, image/png)
2016-08-30 07:16 UTC, Xingxing Xia
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 17:23:26 UTC

Description Xingxing Xia 2016-08-30 07:12:57 UTC
Description of problem:
Manually deploy a dc, its trigger cause is shown as same as the previous one. i.e., if previous one is caused by config/image change, the new one is also shown as config/image change. The new one should be shown as manual deployed thus it won't give a misleading feel.

Compared with build, for a build from image/config change, its cause is shown image/config change; while for a build from "oc start-build bc", the new build is shown as manual build both in CLI and web console which therefore does not give a misleading feel.

Version-Release number of selected component (if applicable):
OCP v3.3.0.27

How reproducible:
Always

Steps to Reproduce:
1. Create a dc
1> $ oc new-app openshift/hello-openshift --name hello
2> After hello-1 is deployed, check its trigger cause:
$ oc get dc hello -o yaml
...
      type: ImageChange
    message: caused by an image change
  latestVersion: 1
...

2. Given #1 trigger cause is image change, manually deploy and check trigger cause
1> $ oc deploy hello --latest
2> $ oc get dc hello -o yaml
...
      type: ImageChange
    message: caused by an image change
  latestVersion: 2
...

3. Trigger a config change deployment and check trigger cause
1> $ oc set env dc hello MY_ENV=123
2> $ oc get dc hello -o yaml
...
    - type: ConfigChange
    message: caused by a config change
  latestVersion: 3
...

4. Given #3 trigger cause is config change, manually deploy and check trigger cause
1> $ oc deploy hello --latest
2> $ oc get dc hello -o yaml
...
      type: ImageChange
    message: caused by a config change
  latestVersion: 4
...

Actual results:
hello-2 and hello-4 are shown same trigger cause as previous one. This is also shown on web console deployment page, see attachment, which is somewhat misleading.

Expected results:
hello-2 and hello-4 should be shown manually deployed as trigger cause

Additional info:

Comment 1 Xingxing Xia 2016-08-30 07:16:33 UTC
Created attachment 1195643 [details]
Manual deployments shown on web console

Deployments for a dc can be seen on https://<master>:8443/console/project/<project_name>/browse/deployments/<dc_name>

Comment 2 Michail Kargakis 2016-08-30 13:20:58 UTC
Fixed in https://github.com/openshift/origin/pull/9349

Comment 3 Michail Kargakis 2016-10-05 07:57:07 UTC
Should be working on master.

Comment 4 Xingxing Xia 2016-10-12 10:18:57 UTC
Verified with OCP v3.4.0.9. Fixed.
Verification results:
$ oc deploy hello --latest
$ oc get dc hello -o yaml
...
status:
  availableReplicas: 1
  details:
    causes:
    - type: Manual
    message: manual change
  latestVersion: 4

On web console, dc's deployment list shows Manual,
deployment page shows: Status reason:    manual change

Comment 6 errata-xmlrpc 2017-01-18 12:52:43 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-2017:0066


Note You need to log in before you can comment on or make changes to this bug.