Bug 2218983

Summary: clicking 'Cancel' in the UI for a Sync task only cancels one sub-task and leaves a stuck sync without progress
Product: Red Hat Satellite Reporter: Vincent S. Cojot <vcojot>
Component: Tasks PluginAssignee: satellite6-bugs <satellite6-bugs>
Status: NEW --- QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.12.4CC: ahumbe, aruzicka, rlavi
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
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: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vincent S. Cojot 2023-06-30 19:04:56 UTC
Description of problem:

Following the cancellation of an 'import' task, a Capsule sync task got released (it had been pending). When I realized what had happened (the sync task was still at 0% progress), I clicked 'Cancel' in the UI.

12 hours later, the Capsule Sync task was at 12%, showing a single 'Task canceled' and stuck at 12% for several hours. I had to go into the dnyflow console of the stuck Capsule sync task, 'cancel' a sub-task which had been in state waiting and the overall Capsule sync resumed and reached 14%.

I think cliking 'cancel' in the UI for a capsule sync task should cancel all of the sub-tasks and not leave a huge 'complete sync' stuck for hours.

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

[root@w0617ialabrhsat01 foreman]# rpm -qa satellite\*
satellite-installer-6.12.0.5-1.el8sat.noarch
satellite-maintain-0.0.1-1.el8sat.noarch
satellite-cli-6.12.4-1.el8sat.noarch
satellite-common-6.12.4-1.el8sat.noarch
satellite-6.12.4-1.el8sat.noarch


Steps to Reproduce:
1. start a complete sync to a capsule
2. click cancel in the UI for the above task
3. watch what happens