-
Notifications
You must be signed in to change notification settings - Fork 112
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
clightning: native database replication #436
Conversation
4902de4
to
a8e9b0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool stuff!
Ideally we would also document how to restrict the capabilities of the nix-bitcoin node on an SSHFS target as much as possible. It should only be able to access the directory and not be able to access or execute anything else.
We could to this using EDIT: Documented in d116f6e622a8d0c24cb970dcbd5f39872ee12f2a |
2a362d1
to
d116f6e
Compare
On 24.01.2022 13:05, Jonas Nick wrote:
The stackoverflow post additionally mentions setting the users shell to `/usr/bin/false`.
Doesn't work on NixOS, I tried.
…--
nixbitcoindev [DD11 F9AD 5308 B3BA]
Use PGP
|
d116f6e
to
7b0c617
Compare
clightning 0.11.0.1 was merged to nixpkgs in NixOS/nixpkgs#170584 |
in "sqlite3://${mainDB}:${replicaDB}"; | ||
|
||
systemd.services.clightning = { | ||
bindsTo = mkIf useMounts [ "clightning-replication-mounts.server" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bindsTo = mkIf useMounts [ "clightning-replication-mounts.server" ]; | |
bindsTo = mkIf useMounts [ "clightning-replication-mounts.service" ]; |
Running backup server in my local network over sshfs with no issues. Haven't tried across the internet over Tor/VPN for fear of latency issues. Ready for testing/merge IMO. |
7b0c617
to
2203031
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a051ebf
to
e086fc5
Compare
Fixups merged and rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward to using it 😃
Can we review/merge this? |
e086fc5
to
bc4485e
Compare
Rebased to master |
Added a test for sshfs client-server replication. Run it with
|
bc4485e
to
932a252
Compare
932a252
to
775388e
Compare
Thanks for the phenomenal review. Let's get this merged @jonasnick! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't put `clightning.replication` options in `examples/configuration.nix` until it is more "battle-tested."
775388e
to
5eb0149
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 5eb0149
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, our first test network. Thanks @erikarvstedt!
ACK 5eb0149
Not ready for merge until clightning 0.10.3.
Supersedes #415
Coauthor: @erikarvstedt