Project

Profile

Help

Issue #8987

closed

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

Added by bmbouter over 3 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:
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.

Also available in: Atom PDF