Project

Profile

Help

Issue #8987

Graceful shutdown of a worker processing a task does not cancel the task

Added by bmbouter 3 months ago. Updated 21 days ago.

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

Description

To reproduce

  1. Have pulpcore==3.14 with the new-style tasking system and pulp_file
  2. Add a sleep(60) statement to the sync task for pulp_file
  3. Start the api and content app, I used sudo systemctl start pulpcore-content pulpcore-api
  4. Start the pulpcore-worker interactively using pulpcore-worker
  5. Start a sync and watch it take a while on the sync due to the sleep(60)
  6. Send one Ctrl-C
  7. Observe the log statements that show waiting for the task and eventually it aborts and exits
  8. Look at the task state for that task, observe even after exit it's at running
  9. Start pulpcore-worker again
  10. Look at the task state again, and notice it's cancelled now

Expected behavior

I expected the task state of graceful shutdown tasks to be at cancelled without another worker "fixing" the state. This is not a serious issue to me, but it's different than I expected. So to me, step (8) should show cancelled.

Associated revisions

Revision 6da336ec View on GitHub
Added by mdellweg 3 months ago

Attempt to cancel aborted tasks on worker shutdown

fixes #8987 https://pulp.plan.io/issues/8987

History

#1 Updated by mdellweg 3 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to mdellweg
  • Sprint set to Sprint 100

#2 Updated by pulpbot 3 months ago

  • Status changed from ASSIGNED to POST

#3 Updated by mdellweg 3 months ago

  • Status changed from POST to MODIFIED

#4 Updated by pulpbot 21 days ago

  • Sprint/Milestone set to 3.15.0

#5 Updated by pulpbot 21 days ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF