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

SlothOfAnarchy commented May 8, 2020

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.
@dasJ
dasJ approved these changes May 8, 2020
@SlothOfAnarchy SlothOfAnarchy force-pushed the helsinki-systems:znapzend-mbuffer-path branch from e801f6d to 28083aa May 8, 2020
@dasJ dasJ requested a review from Infinisil May 8, 2020
@Infinisil
Copy link
Member

Infinisil commented May 8, 2020

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

SlothOfAnarchy commented May 8, 2020

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

Infinisil commented May 8, 2020

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 helsinki-systems:znapzend-mbuffer-path branch from 28083aa to 6be3742 May 10, 2020
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 helsinki-systems:znapzend-mbuffer-path branch from 6be3742 to c46b26b May 11, 2020
@Infinisil Infinisil merged commit fea6394 into NixOS:master May 12, 2020
13 checks passed
13 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c46b26b"; rev="c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c46b26b"; rev="c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c46b26b"; rev="c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c46b26b"; rev="c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c46b26b"; rev="c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c46b26b"; rev="c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c46b26b"; rev="c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@SlothOfAnarchy SlothOfAnarchy deleted the helsinki-systems:znapzend-mbuffer-path branch May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.