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
Updated by dkliban@redhat.com over 3 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 100
Updated by dkliban@redhat.com over 3 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to mdellweg
Updated by pulpbot over 3 years ago
- Status changed from ASSIGNED to POST
Updated by dalley over 3 years ago
- Copied to Backport #9086: Backport #8986 "Double-Crtl-C to pulpcore-worker does not stop subprocess handling task" to 3.14.z added
Added by mdellweg over 3 years ago
Updated by mdellweg over 3 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|80d7d6d8e24c26d6eb0ff13ce29ed8c764cf2341.
Updated by pulpbot about 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
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