Actions
Issue #8986
closedDouble-Crtl-C to pulpcore-worker does not stop subprocess handling task
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 100
Quarter:
Description
To reproduce¶
- Have pulpcore==3.14 with the new-style tasking system and pulp_file
- Add a sleep(60) statement to the sync task for pulp_file
- Start the api and content app, I used
sudo systemctl start pulpcore-content pulpcore-api
- Start the pulpcore-worker interactively using
pulpcore-worker
- Start a sync and watch it take a while on the sync due to the sleep(60)
- Send one Ctrl-C and then another
- Observe the pulpcore-worker exit immediately after the second Ctrl-C
- Wait 1-2 minutes watching that tty
- Observe even after the parent process exits, a message like:
pulp [81a75ff321a8452393384660c20dba0f]: pulpcore.tasking.pulpcore_worker:INFO: Task completed a7dca11f-5555-4725-95d0-7b768b460fe4
Also note that if you look at the sync task before issuing the Ctrl-Cs it'll show running because it's halted at sleep(60) and no progress reports were made. After the logging statement is emitted, it will show progress reports and completed.
Related issues
Actions
Fixed non-gracefully shutting down workers
When hitting ctrl-c twice, workers should also kill their supervised tasks. And shut them down.
fixes #8986 https://pulp.plan.io/issues/8986