Bug 1745027

Summary: Rollouts continuously get cancelled when using oc replace
Product: OpenShift Container Platform Reporter: Russell Teague <rteague>
Component: InstallerAssignee: Russell Teague <rteague>
Installer sub component: openshift-ansible QA Contact: Weihua Meng <wmeng>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high CC: aos-bugs, jialiu, jokerman, maszulik, mfojtik, mmccomas, rsandu, rteague, scuppett
Version: 3.10.0   
Target Milestone: ---   
Target Release: 3.10.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: When using `oc replace --force`, dependent objects were not being properly removed/updated. Consequence: Deployment rollouts would not complete and would be canceled. Fix: The options `--cascade` and `--grace-period` are added to the module using `oc replace`. Result: Deployment are properly rolled out when using `oc replace`.
Story Points: ---
Clone Of: 1685074 Environment:
Last Closed: 2019-10-14 08:49:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1685074    
Bug Blocks:    

Comment 1 Russell Teague 2019-08-23 18:51:08 UTC
release-3.10 PR: https://github.com/openshift/openshift-ansible/pull/11853

Comment 5 Russell Teague 2019-09-04 15:17:59 UTC
The change implemented in the referenced PR was to add `--cascade --grace-period=0` to the oc command when using `replace`.  This PR does not change the oc binary, only the use of that binary when run by the openshift-ansible playbooks.  The test script attached to the original bug does not have the same changes implemented in the referenced PR and would therefore still fail.  If you are testing with the script provided in the original bug, you must also update line 46 with `--cascade --grace-period=0`.

For example:
echo "$deployment" | $OC replace -f- --force --cascade --grace-period=0

To test this with the change implemented in the referenced PR, perform a z-stream upgrade and ensure the ansible service broker is updated and does not fail as noted above.

Comment 6 Weihua Meng 2019-09-05 06:45:50 UTC
Verified.

openshift-ansible-3.10.169-1.git.0.a62e7aa.el7

upgrade OCP cluster from v3.10.153 to v3.10.169, success.

ansible service broker is updated to v3.10.169 image and working fine.

Comment 8 errata-xmlrpc 2019-10-14 08:49:42 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-2019:2987