Project

Profile

Help

Issue #8987

closed

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

Added by bmbouter over 1 year ago. Updated about 1 year 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.

Actions #1

Updated by mdellweg about 1 year ago

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

Updated by pulpbot about 1 year ago

  • Status changed from ASSIGNED to POST

Added by mdellweg about 1 year ago

Revision 6da336ec

Attempt to cancel aborted tasks on worker shutdown

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

Actions #3

Updated by mdellweg about 1 year ago

  • Status changed from POST to MODIFIED
Actions #4

Updated by pulpbot about 1 year ago

  • Sprint/Milestone set to 3.15.0
Actions #5

Updated by pulpbot about 1 year ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF