Server gets immediately nuked on restart/stop, no chance to run shutdown events/hooks
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- shell
- Domain
- devops, infrastructure
Research direction
Compare the systemd unit behavior in OctoPi versions before 1.0 with OctoPi 1.0, focusing on how restart and stop terminate the server. Reproduce the issue and inspect the shutdown logs; done means shutdown hooks and events run before the server is terminated.
Written by the indexing model from the issue text.
Description
It looks like we have a behaviour change in that regard from from OctoPi < 1.0.0 to OctoPi >= 1.0.0.
Example:
OctoPi 0.18.0:
2023-11-28 17:52:47,473 - octoprint.server - INFO - Shutting down...
2023-11-28 17:52:47,485 - octoprint.server - INFO - Calling on_shutdown on plugins
2023-11-28 17:52:47,489 - octoprint.events - INFO - Processing shutdown event, this will be our last event
2023-11-28 17:52:47,672 - octoprint.events - INFO - Event loop shut down
2023-11-28 17:52:47,921 - octoprint.plugins.tracking - INFO - Sent tracking event shutdown, payload: {}
2023-11-28 17:52:48,111 - octoprint.server - INFO - Goodbye!
2023-11-28 17:52:55,660 - octoprint.startup - INFO - ******************************************************************************
2023-11-28 17:52:55,663 - octoprint.startup - INFO - Starting OctoPrint 1.9.3
2023-11-28 17:52:55,665 - octoprint.startup - INFO - ******************************************************************************
OctoPi 1.0:
2023-11-28 17:58:10,696 - octoprint.plugins.github_release_patcher - INFO - Started dummy release server on http://127.0.0.1:50672
2023-11-28 17:58:10,696 - octoprint.plugins.github_release_patcher - INFO - Set Github release URL to http://127.0.0.1:50672/releases/{user}/{repo}
2023-11-28 18:01:21,363 - octoprint.startup - INFO - ******************************************************************************
2023-11-28 18:01:21,366 - octoprint.startup - INFO - Starting OctoPrint 1.9.3
2023-11-28 18:01:21,367 - octoprint.startup - INFO - ******************************************************************************
No shutdown events triggered. It looks like the systemd unit on 1.0 simply nukes away the server directly, whereas on OctoPi < 1.0 it still got a chance to cleanly shut down. That's something that needs to get looked at, but that's rather something for OctoPrint/OctoPi-UpToDate or guysoft/OctoPi.
Originally posted by @foosel in https://github.com/OctoPrint/OctoPrint/issues/4882#issuecomment-1830406813
- Dominant language
- Shell
- Stars
- 72
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OctoPrint/OctoPi-UpToDate
-
[Feedback] Feedback for the latest camera-streamer based webcam stack builds (build 20260305095911)Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
OctoPrint/OctoPi-UpToDate#21 · 1 reaction ·
-
bug
Difficulty 5/5 Over a week Newbie friendliness 20/100
OctoPrint/OctoPi-UpToDate#20 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
OctoPrint/OctoPi-UpToDate#17 · 3 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
OctoPrint/OctoPi-UpToDate#11 · 11 comments · 1 reaction ·
All issues in OctoPrint/OctoPi-UpToDate
Similar issues
-
acme.sh : reload service directly after getting hostname cert instead of waiting at the script end ?Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
mailcow/mailcow-dockerized#7683 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
open-saas-directory/awesome-native-macosx-apps#293 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 74/100
-
Add inline list of key task-runner tools to tekton cursor rulePossibly taken @fullsend-ai-coder claimed this today. Opendocumentation good first issue ready-for-triage ready-to-code
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
konflux-ci/build-definitions#3918 · 3 comments ·
Maintainers usually reply within 1 day
-
sessions are not reapedPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day