Skip to content
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

nixos/znapzend: Use generic mbuffer path #87280

Merged
merged 1 commit into from
May 12, 2020

Conversation

SlothOfAnarchy
Copy link
Contributor

Motivation for this change

The configured mbuffer path will be called on both the source and target
system. If you use pkgs.mbuffer from the source host and the target host
does not have this exact derivation, you will get a broken pipe when
sending snapshots.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@SlothOfAnarchy SlothOfAnarchy force-pushed the znapzend-mbuffer-path branch from e801f6d to 28083aa Compare May 8, 2020 16:48
@dasJ dasJ requested a review from infinisil May 8, 2020 16:51
@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels May 8, 2020
@infinisil
Copy link
Member

I think znapzend should also be usable on non-NixOS systems, for either source or target, and this would not work in favor of that.

Does znapzend work with a non-absolute path perhaps? That would be better

@SlothOfAnarchy
Copy link
Contributor Author

The original version also wouldn't have worked with other operating systems. I don't think this can work at all between NixOS and non-NixOS systems because the specified mbuffer path is used both on the source and target system. If we set something like /usr/bin/mbuffer, we will not have that available on NixOS.

@infinisil
Copy link
Member

It will have worked previously if both source and target had the same mbuffer in the Nix store, which can happen (though probably unlikely).

What I'm suggesting now though is to see if just using mbuffer will work, hopefully znapzend will look up the binary in PATH then, which would be system-agnostic

@SlothOfAnarchy
Copy link
Contributor Author

SlothOfAnarchy commented May 10, 2020

It used to work for my systems until I upgraded only one of them to 20.03, that's how I found this bug.

What I'm suggesting now though is to see if just using mbuffer will work, hopefully znapzend will look up the binary in PATH then, which would be system-agnostic

Good suggestion, I replaced the path with just mbuffer, this also works on my systems.

@SlothOfAnarchy SlothOfAnarchy force-pushed the znapzend-mbuffer-path branch from 28083aa to 6be3742 Compare May 10, 2020 21:18

Verified

This commit was signed with the committer’s verified signature. The key has expired.
SlothOfAnarchy Michel Weitbrecht
The configured mbuffer path will be called on both the source and target
system. If you use pkgs.mbuffer from the source host and the target host
does not have this exact derivation, you will get a broken pipe when
sending snapshots. This is the case when transferring to a non-NixOS
system or to a host with a different mbuffer version.
@SlothOfAnarchy SlothOfAnarchy force-pushed the znapzend-mbuffer-path branch from 6be3742 to c46b26b Compare May 11, 2020 12:26
@infinisil infinisil merged commit fea6394 into NixOS:master May 12, 2020
@SlothOfAnarchy SlothOfAnarchy deleted the znapzend-mbuffer-path branch May 12, 2020 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants