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

bees: Try all findmnt modes in service wrapper #67411

Merged
merged 1 commit into from May 9, 2020

Conversation

@charles-dyfis-net
Copy link
Contributor

charles-dyfis-net commented Aug 24, 2019

Motivation for this change

As reported by @Evils-Devils in Zygo/bees#123, the bees service wrapper
can fail on account of findmnt not being able to identify a mounted
filesystem using the default (kernel-introspection) mechanism.

Fall back to mtab and fstab-based inspection in turn should this fail.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/) (yes, via NixOS tests)
  • 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.
As reported by @Evils-Devils in Zygo/bees#123, the bees service wrapper
can fail on account of `findmnt` not being able to identify a mounted
filesystem using the default (kernel-introspection) mechanism.

Fall back to mtab and fstab-based inspection in turn should this fail.
@charles-dyfis-net
Copy link
Contributor Author

charles-dyfis-net commented Aug 24, 2019

@Evils-Devils, could I ask you to test that this works for you?

@evils
Copy link
Contributor

evils commented Aug 24, 2019

I'm willing but ignorant, can you point me towards documentation on how to do this?

@charles-dyfis-net
Copy link
Contributor Author

charles-dyfis-net commented Aug 25, 2019

@Evils-Devils, ...so, where I'd start:

  • git clone https://github.com/charles-dyfis-net/nixpkgs /usr/local/testing-nixpkgs && cd /usr/local/testing-nixpkgs && git checkout bees-try-all-findmnt-modes, adjusting the location to taste.

  • In your /etc/nixos/configuration.nix, add something like the following:

    nixpkgs.config.packageOverrides = super: {
      bees = pkgs.callPackage /usr/local/testing-nixpkgs/pkgs/tools/filesystems/bees { };
    };
    

Certainly not the only approach -- one could have Nix do the checkout rather than doing it by hand, f/e -- but it gives you a local working tree you can modify during testing.

@evils
Copy link
Contributor

evils commented Aug 25, 2019

I don't believe the packageOverrides worked, the store hash for bees-service-0.6.1 shown by systemctl remains the same with or without that entry.

And the behaviour of sudo nix run nixpkgs.bees ... LABEL=bulk has not changed.

@evils
Copy link
Contributor

evils commented Aug 25, 2019

As per this, i rebuild my system based on your nixpkgs fork's branch.
The beesd service now reliably starts, my volume is mounted at /run/bees/mount/<UUID> and also at my usual mountpoint.

@nixos-discourse
Copy link

nixos-discourse commented May 5, 2020

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/149

@FRidh FRidh merged commit cb657d4 into NixOS:master May 9, 2020
13 checks passed
13 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
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
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

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