fix: Ensure xrpld service directories exist at startup#7565
Merged
Conversation
The package tmpfiles config creates `/var/lib/xrpld` and `/var/log/xrpld` during install, but those directories can still be removed or damaged afterward. When that happens, xrpld fails later with less helpful path creation errors, such as permission denied while opening the log path. Have systemd create the default state and log directories whenever the service starts. This keeps the packaged defaults self-healing. Operators who configure custom paths are unaffected and the default directories may be unused and is harmless.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7565 +/- ##
=========================================
- Coverage 82.0% 81.9% -0.1%
=========================================
Files 1009 1007 -2
Lines 76782 76854 +72
Branches 8939 8984 +45
=========================================
+ Hits 62975 62977 +2
- Misses 13798 13868 +70
Partials 9 9 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the packaged xrpld systemd unit by ensuring the default on-disk service directories are (re)created at service startup, making the default state/log paths self-healing if /var/lib/xrpld or /var/log/xrpld are removed.
Changes:
- Add
StateDirectory=xrpldto have systemd create/manage/var/lib/xrpldat start. - Add
LogsDirectory=xrpldto have systemd create/manage/var/log/xrpldat start.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bthomee
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The package tmpfiles config creates
/var/lib/xrpldand/var/log/xrpldduring install, but those directories can still be removed or damaged afterward. When that happens, xrpld fails later with less helpful path creation errors, such as permission denied while opening the log path.Have systemd create the default state and log directories whenever the service starts. This keeps the packaged defaults self-healing. Operators who configure custom paths are unaffected and the default directories will be unused and is harmless.