Bug 1324437

Summary: The deployment(not cancelled successfully) state is different from web UI and CLI
Product: OpenShift Online Reporter: Yadan Pei <yapei>
Component: Management ConsoleAssignee: Michail Kargakis <mkargaki>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, dmace, jokerman, mkargaki, mmccomas, pweil, yanpzhan, yinzhou
Target Milestone: ---Keywords: UpcomingRelease
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-23 15:09:20 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:
Attachments:
Description Flags
CancelledStatusOnOvervierw
none
PodRunning none

Description Yadan Pei 2016-04-06 10:43:46 UTC
Description of problem:
When click "Cancel" button for a active deployment, the deployment state is changed to "Cancelled" immediately on console. However deployment maybe still running(although it is marked for cancelation, since --cancel is a best-effort call, more detail please refer to https://bugzilla.redhat.com/show_bug.cgi?id=1318920)

This leads to inconsistency between UI and CLI, that is: web UI has "Cancelled" status while CLI shows "running" 

Version-Release number of selected component (if applicable):
Dev Preview Online

How reproducible:
Always

Steps to Reproduce:
1. Create app from template on web console
2. Wait for 1st deployment complete
3. Manually deploy again on web console
4. Cancel the deploy before it complete
5. Check deployment status via CLI
# oc deploy hooks
hooks deployment #4 running for 37 seconds
6. Check deployment status on web console

Actual results:
6. Deployment is marked as CANCELLED status

Expected results:
6. Keep the same state with CLI. still show "running" for unsuccessful cancelling deployment, so that user could cancel multiple times

Additional info:
Only reproduces in Online

Comment 1 Yadan Pei 2016-04-06 10:54:47 UTC
ccing Michail Kargakis

Comment 2 Michail Kargakis 2016-04-06 11:03:33 UTC
This is the same bug as https://bugzilla.redhat.com/show_bug.cgi?id=1323710 and is fixed in HEAD for Origin

Comment 3 Michail Kargakis 2016-04-06 11:06:06 UTC
Sorry, this is almost the same as https://bugzilla.redhat.com/show_bug.cgi?id=1323710 but not exactly. Working on a fix.

Comment 4 Paul Weil 2016-04-08 12:18:53 UTC
PR is https://github.com/openshift/origin/pull/8370

Comment 5 openshift-github-bot 2016-04-11 08:58:58 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/95f1ffa347bc3a50215c4660e09109349dd04990
Bug 1324437: show cancel as subordinate to non-terminating phases

Comment 6 Yadan Pei 2016-04-12 10:58:20 UTC
Reproduces on Online

$ oc deploy hooks
hooks deployment #1 deployed 50 seconds ago - 1 pod

$ oc deploy hooks --latest; oc deploy hooks --cancel; oc deploy hooks
Started deployment #2
Cancelled deployment #2
hooks deployment #2 running (cancelling) for 6 seconds
hooks deployment #1 deployed about a minute ago

$ oc deploy hooks
hooks deployment #2 deployed 25 seconds ago - 1 pod

Web UI shows "CANCELLED" status for #2 deployment while pod for deployment #2 in running status

Comment 7 Yadan Pei 2016-04-12 10:58:47 UTC
Created attachment 1146377 [details]
CancelledStatusOnOvervierw

Comment 8 Yadan Pei 2016-04-12 10:59:12 UTC
Created attachment 1146378 [details]
PodRunning

Comment 9 Dan Mace 2016-04-25 21:07:44 UTC
https://github.com/openshift/origin/commit/95f1ffa347bc3a50215c4660e09109349dd04990 is deployed to dev-preview-int, please re-test.

Comment 10 zhou ying 2016-04-26 05:39:23 UTC
Confirmed with the latest dev-preview-int :
openshift v3.2.0.16, 
the issue has fixed. will verify this .