Skip to content

feeadjuster: run the daily timer as the configured clightning user - #161

Merged
seberm merged 1 commit into
bitcoinix:masterfrom
ostermayer:feeadjuster-user
Oct 27, 2026
Merged

seberm merged 1 commit into
bitcoinix:masterfrom
ostermayer:feeadjuster-user

Conversation

@ostermayer

@ostermayer ostermayer commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #138.

clightning-feeadjuster named its user by hand as clightning, so a node with a custom services.clightning.user got a daily timer that either failed to start or ran as an account that can't reach the RPC socket. Either way the fee adjustment silently stopped, and that timer is the only thing adjustDaily does. The same line put ${clightning.dataDir} into ExecStart without quotes, so a data directory with a space broke the call too.

What changed:

  • User = clightning.user, taken from the clightning module like every other unit does.
  • The data directory is single-quoted in ExecStart. systemd strips the quotes and passes the path as one argument.
  • New configuration check testFeeadjusterFollowsClightningUser in test/configuration.nix: a node with user = "cln-custom" and dataDir = "/var/lib/cln custom" must get that user on the unit and the quoted path in the command.

Tested

  • The module-config flake check fails on master with only the new test added (user is clightning, the quoting check is false) and passes on this branch, both built on x86_64-linux.
  • nix flake check and the VM scenarios run in CI.

Codex (GPT-6 Astra, xhigh) reviewed the commit: single-quoting is the right systemd syntax for the argument, the test fixture is valid, and no defects. It noted two other literal accounts, charge-lnd in charge-lnd.nix and tor in onion-addresses.nix, but neither of those is a configurable option, so they're fine. DeepSeek V4.1 Flash 1017 (max) and GLM 5.3 (max) audited the tree at e28a7e5 with Codex (GPT-6 Astra, xhigh) as the second opinion: five findings in modules/, none in the two files this PR touches. One is #160, which DeepSeek found on its own, two are Tor and ordering claims Astra marked false positives, and the other two are leads I'm checking against open issues.

@github-actions github-actions Bot added area: ci .github/, test/, dev/ area: modules modules/ and pkgs/lib.nix labels Oct 27, 2026
The clightning-feeadjuster oneshot named the user by hand, so a node with
a custom services.clightning.user got a timer that failed to start or ran
as an account that cannot reach the RPC socket, and the daily fee
adjustment silently stopped. The data directory was also interpolated
into ExecStart without quotes.

Take the user from the clightning module and quote the directory. A
configuration check evaluates a node with a custom user and a data
directory with a space and checks both.
@seberm seberm added the type: bug Behaviour is wrong vs. documented or intended label Oct 27, 2026
@seberm
seberm enabled auto-merge October 27, 2026 22:09
@seberm
seberm merged commit d9949c9 into bitcoinix:master Oct 27, 2026
13 checks passed
@ostermayer
ostermayer deleted the feeadjuster-user branch November 8, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci .github/, test/, dev/ area: modules modules/ and pkgs/lib.nix type: bug Behaviour is wrong vs. documented or intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feeadjuster: the daily timer unit hardcodes the clightning user and leaves the data directory unquoted

2 participants