Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1721320

Summary: [RFE] Improve Tasks - Pulp Task Clean-up - Part 2
Product: Red Hat Satellite Reporter: Christian Marineau <cmarinea>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: ahumbe, bkearney, bmbouter, dalley, dkliban, dsinglet, ggainey, ipanova, ltran, mmccune, rchan, rochacbruno, ttereshc
Target Milestone: 6.10.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:08:28 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:
Embargoed:

Description Christian Marineau 2019-06-17 22:13:04 UTC
Description of problem:

As a User, I want that pulp-task related to a Satellite (foreman) task, are automatically clean.
  -Cancelling a Foreman Task should cancel the Pulp task properly

As a User, I want the pulp tasks on the Capsule to be stopped and clean automatically when no Synchronisation with Satellite should be running.

Comment 3 pulp-infra@redhat.com 2019-08-12 15:32:00 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 4 pulp-infra@redhat.com 2019-08-12 15:32:01 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 7 pulp-infra@redhat.com 2021-06-04 21:00:21 UTC
The Pulp upstream bug status is at CLOSED - NOTABUG. Updating the external tracker on this bug.

Comment 13 Lai 2021-08-19 14:43:53 UTC
Steps to test

1. Import manifest
2. Set satellite to Immediate sync in settings
3. Sync a rh repo
4. If it's a large repo, cancel the task after a couple of minutes
5. Confirmed sync is stopped
6. Spin up a capsule and register to satellite successfully.  (ensure that capsule is tied to library env)
7. On capsule run "tail -f /var/log/messages"
8. On satellite that is still using immediate sync, enable another large repo
9. Sync repo until complete
10. Create a cv and add repo from step 9 and publish
11. Go to task page and cancel the automatic sync that pops up once publishing is complete
12. Check capsule log that it's cancelling the task.

Expected:
5) Should see task in pulp being canceled
12) Should see log saying that task is canceled for pulp

Actual:
5) (found on dynflow console)
pulp_tasks:
- pulp_href: "/pulp/api/v3/tasks/f8281c90-e211-445b-8760-a4b7326a7110/"
  pulp_created: '2021-08-18T15:21:47.856+00:00'
  state: canceled
  name: pulp_rpm.app.tasks.synchronizing.synchronize
  logging_cid: 35b78060-a3a2-40da-8c67-c2035e615026
  started_at: '2021-08-18T15:21:47.933+00:00'
  worker: "/pulp/api/v3/workers/c1e2ce5c-347a-4a4f-b30e-656291b2f704/"
  child_tasks: []

12) Aug 19 10:33:55 dhcp-2-120 pulpcore-worker-3: pulp [None]: pulpcore.tasking.pulpcore_worker:INFO: Cleaning up and canceling Task 16ff94f3-7378-40a5-9366-77cb4e4c693f

Additional note: once the capsule sync was cancelled, the tailing does reveal that it stops logging.

Verified on 6.10 snap 13

Comment 17 errata-xmlrpc 2021-11-16 14:08:28 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 (Moderate: Satellite 6.10 Release), 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/RHSA-2021:4702