Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1371403 - Manual deployment for a dc should have trigger cause correctly rather than as same as previous deployment
Manual deployment for a dc should have trigger cause correctly rather than as...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Deployments (Show other bugs)
3.3.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Michail Kargakis
zhou ying
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-30 03:12 EDT by Xingxing Xia
Modified: 2017-03-08 13 EST (History)
5 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-18 07:52:43 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 12:23:26 EST

  None (edit)
Description Xingxing Xia 2016-08-30 03:12:57 EDT
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 03:16 EDT
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 09:20:58 EDT
Fixed in https://github.com/openshift/origin/pull/9349
Comment 3 Michail Kargakis 2016-10-05 03:57:07 EDT
Should be working on master.
Comment 4 Xingxing Xia 2016-10-12 06:18:57 EDT
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 07:52:43 EST
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.