Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis pull request adds SeaweedFS support to the NixOS configuration by introducing a new flake input referencing a SeaweedFS module, importing it into the storage subsystem, and implementing comprehensive SeaweedFS service configuration for IO-primary nodes with systemd integration and reverse proxy virtual hosts. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 Do not merge outdated PRsWonderful, this rule succeeded.Make sure PRs are almost up to date before merging
|
🧪 CI InsightsHere's what we observed from your CI run for bed2fdf. 🟢 All jobs passed!But CI Insights is watching 👀 |
There was a problem hiding this comment.
Actionable comments posted: 3
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
flake/nixos/flake.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
flake/nixos/flake.nixmodules/nixos/server/storage/default.nixmodules/nixos/server/storage/seaweedfs.nix
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: Build nixosConfigurations.nixcloud.config.system.build.toplevel on x86_64-linux
- GitHub Check: Build nixosConfigurations.nixdev.config.system.build.toplevel on x86_64-linux
- GitHub Check: Build nixosConfigurations.nixio.config.system.build.toplevel on x86_64-linux
- GitHub Check: Build nixosConfigurations.nixmi.config.system.build.toplevel on x86_64-linux
- GitHub Check: Build nixosConfigurations.nixai.config.system.build.toplevel on x86_64-linux
- GitHub Check: Build homeConfigurations.racci.activationPackage on x86_64-linux
- GitHub Check: Build nixosConfigurations.nixarr.config.system.build.toplevel on x86_64-linux
- GitHub Check: Build nixosConfigurations.nixmon.config.system.build.toplevel on x86_64-linux
- GitHub Check: Build nixosConfigurations.nixserv.config.system.build.toplevel on x86_64-linux
- GitHub Check: Mergify Merge Protections
- GitHub Check: Summary
🔇 Additional comments (4)
modules/nixos/server/storage/seaweedfs.nix (2)
16-37: Common systemd service template is tidy.Keeps service defaults consistent across the admin/worker units.
143-225: Tmpfiles coverage looks solid.The directory ownership/mode setup for master/volume/filer/admin/worker is comprehensive.
modules/nixos/server/storage/default.nix (1)
5-8: Import addition looks fine.The storage module now includes SeaweedFS cleanly.
flake/nixos/flake.nix (1)
90-94: Use the correct flake input URL scheme for type = "file".The URL should use the
file+https://scheme rather than plainhttps://. Update to:url = "file+https://raw.githubusercontent.com/liberodark/nixpkgs/refs/heads/seaweedfs/nixos/modules/services/network-filesystems/seaweedfs.nix";Nix flakes support
type = "file"for remote URLs, andflake.lockautomatically pins the exact revision; the branch reference is reproducible once locked. The URL scheme is the primary concern here.Likely an incorrect or invalid review comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@modules/nixos/server/storage/seaweedfs.nix`:
- Around line 245-248: The capabilities list passed to the SeaweedFS worker (in
the command invoking ${cfg.package}/bin/weed worker) contains a typo: "vacumm"
should be "vacuum"; update the -capabilities argument to
"-capabilities=vacuum,ec,replication,balance" so the worker recognizes and runs
the vacuum maintenance task.
- Around line 47-83: The master endpoint is hardcoded in multiple places (the
master list entry "seaweedfs.racci.dev:443", the proxy virtualHost using
cfg.master.port, and the admin service referencing master.seaweedfs.racci.dev),
causing hostname/port mismatches; define a single master endpoint variable
(e.g., masterHost and masterPort or masterEndpoint) and replace the hardcoded
"seaweedfs.racci.dev:443", uses of cfg.master.port in
server.proxy.virtualHosts.seaweedfs.extraConfig, and the admin service's
connection target so all references (master, volume.inherit master,
filer.inherit master, proxy reverse_proxy, and admin client) use the same
variable. Ensure the new variable is used when constructing the master = [ ... ]
list and when generating the reverse_proxy target and admin connection string.
- Around line 84-139: Multiple vhosts ("seaweedfs", "s3.seaweedfs",
"volume.seaweedfs", "admin.seaweedfs") all set l4.listenPort = 10443 causing
port collisions; fix by either assigning unique listenPort values per vhost
(e.g. set l4.listenPort for "s3.seaweedfs", "volume.seaweedfs",
"admin.seaweedfs" to different ports) or refactor to a single L4 listener that
uses SNI to route to backends — implement one shared l4 block that checks the
SNI host and proxies to the appropriate target (use the existing proxy targets
like cfg.master.grpcPort, cfg.filer.s3.grpcPort, cfg.volume.grpcPort, and the
admin ports) so only one server binds to 10443.
f18ae32 to
0888876
Compare
cba2d9f to
2278c2f
Compare
5f15d5f to
33c13f8
Compare
Join to a shared listener if there are multiple L4 listeners on the same port and route from generated routes This fixes what i was experiencing with inconsistent connections to the gRPC ports from each service.
Also fixes the certificates i generated since i forgot to give them a domainName to cover.
33c13f8 to
bed2fdf
Compare
Only just getting started, still needs lots of work and a full evaluation for feasibility.
This PR is building ontop of the PR seaweedfs module in nixpkgs NixOS/nixpkgs#353890.
Tasks:
server.storage.swfsMount(option name tbd)Blocked by seaweedfs/seaweedfs#8468Summary by CodeRabbit
Release Notes
New Features