-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
nixos/zfs-replication.nix: expose port in config. #84226
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
Conversation
I found while attempting to use a nonstandard SSH port with this module that the port hadn't been passed as an option in this module. This corrects that oversight and makes it configurable. I've verified this with the following steps: 1. sudo nixos-rebuild -I .../nixpkgs switch 1. systemctl cat zfs-replication.service The service did include the changed port and continues to execute.
@@ -73,7 +80,7 @@ in { | |||
"https://github.com/alunduil/zfs-replicate" | |||
]; | |||
restartIfChanged = false; | |||
serviceConfig.ExecStart = "${pkgs.zfs-replicate}/bin/zfs-replicate${recursive} -l ${escapeShellArg cfg.username} -i ${escapeShellArg cfg.identityFilePath}${followDelete} ${escapeShellArg cfg.host} ${escapeShellArg cfg.remoteFilesystem} ${escapeShellArg cfg.localFilesystem}"; | |||
serviceConfig.ExecStart = "${pkgs.zfs-replicate}/bin/zfs-replicate${recursive} -p ${escapeShellArg toString cfg.port} -l ${escapeShellArg cfg.username} -i ${escapeShellArg cfg.identityFilePath}${followDelete} ${escapeShellArg cfg.host} ${escapeShellArg cfg.remoteFilesystem} ${escapeShellArg cfg.localFilesystem}"; |
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.
What will happen if the remote host is configured via ssh's config to be a specific port, will the -p
here override that, possibly breaking those users?
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.
@grahamc I'm not sure I completely follow. Are you asking if the /root/.ssh/config includes a Port directive for this host will that be overridden in this execution? The answer is yes and it currently is since zfs-replicate defaults the port argument to 22.
Let me know if I'm misunderstanding the question though.
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.
@grahamc is there anything I can do to help get this landed?
Hello, I'm a bot and I thank you in the name of the community for your contributions. Nixpkgs is a busy repository, and unfortunately sometimes PRs get left behind for too long. Nevertheless, we'd like to help committers reach the PRs that are still important. This PR has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human. If this is still important to you and you'd like to remove the stale label, we ask that you leave a comment. Your comment can be as simple as "still important to me". But there's a bit more you can do: If you received an approval by an unprivileged maintainer and you are just waiting for a merge, you can @ mention someone with merge permissions and ask them to help. You might be able to find someone relevant by using Git blame on the relevant files, or via GitHub's web interface. You can see if someone's a member of the nixpkgs-committers team, by hovering with the mouse over their username on the web interface, or by searching them directly on the list. If your PR wasn't reviewed at all, it might help to find someone who's perhaps a user of the package or module you are changing, or alternatively, ask once more for a review by the maintainer of the package/module this is about. If you don't know any, you can use Git blame on the relevant files, or GitHub's web interface to find someone who touched the relevant files in the past. If your PR has had reviews and nevertheless got stale, make sure you've responded to all of the reviewer's requests / questions. Usually when PR authors show responsibility and dedication, reviewers (privileged or not) show dedication as well. If you've pushed a change, it's possible the reviewer wasn't notified about your push via email, so you can always officially request them for a review, or just @ mention them and say you've addressed their comments. Lastly, you can always ask for help at our Discourse Forum, or more specifically, at this thread or at #nixos' IRC channel. |
I'd still like to commit this if possible. @grahamc do you have time to do a quick review? If not, I'll try to find someone else who can review it. |
I marked this as stale due to inactivity. → More info |
I'm sad this has gone stale. Please let me know what I can do to get this merged as quickly as possible. |
I marked this as stale due to inactivity. → More info |
I'll see about posting this in the discourse group to see about getting it progressed. |
I marked this as stale due to inactivity. → More info |
I found while attempting to use a nonstandard SSH port with this module
that the port hadn't been passed as an option in this module. This
corrects that oversight and makes it configurable.
I've verified this with the following steps:
The service did include the changed port and continues to execute.
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)