Project

Profile

Help

Issue #4559

closed

Cancelling a task logs a failure message before logging the cancel message

Added by dalley about 5 years ago. Updated over 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Mar 21 14:04:47 pulp3-source-fedora29.localhost.example.com rq[10066]: pulp: rq.worker:INFO: Cleaning registries for queue: reserved-resource-worker-1@pulp3-source-fedora29.localhost.example.com                
Mar 21 14:04:47 pulp3-source-fedora29.localhost.example.com rq[10066]: pulp: rq.worker:INFO: reserved-resource-worker-1@pulp3-source-fedora29.localhost.example.com: pulpcore.tasking.tasks._release_resources('f8b2be25-a8c1-4995-9f62-99cbe0df961d') (c3257770-db36-4d6d-a6a9-8cf47f5e0431)
Mar 21 14:04:47 pulp3-source-fedora29.localhost.example.com rq[10066]: pulp: pulpcore.tasking.tasks:ERROR: The task f8b2be25-a8c1-4995-9f62-99cbe0df961d exited immediately for some reason. Marking as failed. Check the logs for more details
Mar 21 14:04:47 pulp3-source-fedora29.localhost.example.com rq[10066]: pulp: rq.worker:INFO: reserved-resource-worker-1@pulp3-source-fedora29.localhost.example.com: Job OK (c3257770-db36-4d6d-a6a9-8cf47f5e0431)
Mar 21 14:04:48 pulp3-source-fedora29.localhost.example.com gunicorn[10069]: pulp: pulpcore.tasking.util:INFO: Task canceled: f8b2be25-a8c1-4995-9f62-99cbe0df961d.

This message should not be logged, since the task was cancelled, not failed.

"pulp: pulpcore.tasking.tasks:ERROR: The task f8b2be25-a8c1-4995-9f62-99cbe0df961d exited immediately for some reason. Marking as failed. Check the logs for more details"

The task status is correct, e.g. "cancelled", not failed.


Related issues

Copied to Pulp - Issue #8143: Cancelling a task logs a failure message before logging the cancel messageCLOSED - DUPLICATEdalleyActions
Actions #1

Updated by dalley about 5 years ago

  • Description updated (diff)
Actions #2

Updated by amacdona@redhat.com about 5 years ago

  • Sprint/Milestone set to 3.0.0
  • Triaged changed from No to Yes

o

Actions #3

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3)
Actions #4

Updated by daviddavis over 4 years ago

  • Sprint/Milestone deleted (3.0.0)
Actions #5

Updated by dalley over 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley
Actions #6

Updated by pulpbot over 3 years ago

  • Status changed from ASSIGNED to POST

Added by dalley over 3 years ago

Revision 32371f04 | View on GitHub

Get rid of failure message on task cancellation

_release_resources() task checks whether task status is still set to "running". In the case of cancelation, that is still true if the transaction hasn't been committed yet. We need to set the task status to 'canceled' beforehand so that we kill the workhorse and the resource cleanup task runs, it doesn't think the workhorse died erroneously.

closes: #4559 https://pulp.plan.io/issues/4559

Actions #7

Updated by dalley over 3 years ago

  • Status changed from POST to MODIFIED
Actions #8

Updated by ttereshc over 3 years ago

  • Sprint/Milestone set to 3.8.0
Actions #9

Updated by pulpbot over 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions #10

Updated by dalley about 3 years ago

  • Copied to Issue #8143: Cancelling a task logs a failure message before logging the cancel message added

Also available in: Atom PDF