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

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

@evils-devils, could I ask you to test that this works for you?

@evils
Copy link
Member

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

@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
Member

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
Member

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants