Skip to content

fix: Ensure xrpld service directories exist at startup#7565

Merged
bthomee merged 3 commits into
developfrom
legleux/self-heal-svc-dir
Jun 18, 2026
Merged

fix: Ensure xrpld service directories exist at startup#7565
bthomee merged 3 commits into
developfrom
legleux/self-heal-svc-dir

Conversation

@legleux

@legleux legleux commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

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 will be unused and is harmless.

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.
@legleux legleux added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label Jun 17, 2026
@legleux legleux marked this pull request as ready for review June 18, 2026 06:00
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.9%. Comparing base (45ddc1d) to head (cc687c7).
⚠️ Report is 26 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            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             

see 29 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=xrpld to have systemd create/manage /var/lib/xrpld at start.
  • Add LogsDirectory=xrpld to have systemd create/manage /var/log/xrpld at start.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package/shared/xrpld.service

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread package/shared/xrpld.service Outdated

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@legleux legleux added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Jun 18, 2026
@bthomee bthomee enabled auto-merge June 18, 2026 19:01
@bthomee bthomee added this pull request to the merge queue Jun 18, 2026
Merged via the queue into develop with commit b6a1ad5 Jun 18, 2026
48 checks passed
@bthomee bthomee deleted the legleux/self-heal-svc-dir branch June 18, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. Trivial Simple change with minimal effect, or already tested. Only needs one approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants