Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: return different exits code on DB vacuum failure #797

Closed
jakubgs opened this issue Oct 9, 2023 · 0 comments · Fixed by #817
Closed

feat: return different exits code on DB vacuum failure #797

jakubgs opened this issue Oct 9, 2023 · 0 comments · Fixed by #817
Assignees

Comments

@jakubgs
Copy link
Contributor

jakubgs commented Oct 9, 2023

Problem

When there's not enough disk space for an SQLite DB vacuuming node gets into a restart loop.

2023-10-09T07:13:54.366Z INFO gowaku.db-setup#011sqlite/sqlite.go:34#011starting sqlite database vacuuming#011{"node": "16Uiu2HAmKTYnoPKebjWy63e1zPKiYRCQvm25W5mNSnCFE8EmzLga"}
2023-10-09T07:25:36.009Z INFO gowaku.db-setup#011sqlite/sqlite.go:34#011starting sqlite database vacuuming#011{"node": "16Uiu2HAmKTYnoPKebjWy63e1zPKiYRCQvm25W5mNSnCFE8EmzLga"}
2023-10-09T07:38:52.551Z INFO gowaku.db-setup#011sqlite/sqlite.go:34#011starting sqlite database vacuuming#011{"node": "16Uiu2HAmKTYnoPKebjWy63e1zPKiYRCQvm25W5mNSnCFE8EmzLga"}
2023-10-09T07:50:36.884Z INFO gowaku.db-setup#011sqlite/sqlite.go:34#011starting sqlite database vacuuming#011{"node": "16Uiu2HAmKTYnoPKebjWy63e1zPKiYRCQvm25W5mNSnCFE8EmzLga"}
2023-10-09T08:02:52.289Z INFO gowaku.db-setup#011sqlite/sqlite.go:34#011starting sqlite database vacuuming#011{"node": "16Uiu2HAmKTYnoPKebjWy63e1zPKiYRCQvm25W5mNSnCFE8EmzLga"}
2023-10-09T08:25:38.890Z INFO gowaku.db-setup#011sqlite/sqlite.go:34#011starting sqlite database vacuuming#011{"node": "16Uiu2HAmKTYnoPKebjWy63e1zPKiYRCQvm25W5mNSnCFE8EmzLga"}
2023-10-09T08:40:14.657Z INFO gowaku.db-setup#011sqlite/sqlite.go:34#011starting sqlite database vacuuming#011{"node": "16Uiu2HAmKTYnoPKebjWy63e1zPKiYRCQvm25W5mNSnCFE8EmzLga"}
2023-10-09T08:51:37.570Z INFO gowaku.db-setup#011sqlite/sqlite.go:34#011starting sqlite database vacuuming#011{"node": "16Uiu2HAmKTYnoPKebjWy63e1zPKiYRCQvm25W5mNSnCFE8EmzLga"}

Suggested solution

Use a separate exit code like 166 we could then use the RestartPreventExitStatus Systemd config to stop the service restart loop.

You can see a list of exit codes used by POSIX and Systemd here:
https://tldp.org/LDP/abs/html/exitcodes.html
https://freedesktop.org/software/systemd/man/systemd.exec.html#Process%20Exit%20Codes

Alternatives considered

Detect how much disk space is left? Overly complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants