Skip to content

Comments

Local Overlay Store#8397

Merged
Ericson2314 merged 175 commits intoNixOS:masterfrom
NixLayeredStore:overlayfs-store
Apr 8, 2024
Merged

Local Overlay Store#8397
Ericson2314 merged 175 commits intoNixOS:masterfrom
NixLayeredStore:overlayfs-store

Conversation

@Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented May 25, 2023

Motivation

The motivation for this is given in NixOS/rfcs#152

Context

Implementation notes:

The new store is marked experimental, under a new local-overlay-store experimental feature.

The new store type is a subclass of LocalStore. It lives in a new separate {cc,hh} file pair, so the impact on the rest of the codebase is minimal. This makes it easy to revert if we want to back out of the experiment.

The changes to the rest of the codebase are mainly making to make methods virtual / slightly different so we can override them.

depends on #8774

Checklist for maintainers

Maintainers: tick if completed or explain if not relevant

  • agreed on idea
  • agreed on implementation strategy
  • tests, as appropriate
    • functional tests - tests/**.sh
    • unit tests - src/*/tests
    • integration tests - tests/nixos/*
  • documentation in the manual
  • documentation in the internal API docs
  • code and comments are self-explanatory
  • commit message explains why the change was made
  • new feature or incompatible change: updated release notes

Priorities

Add 👍 to pull requests you find important.

This work is sponsored by Replit

Ericson2314 and others added 30 commits March 21, 2023 10:53
Fixed one test, broke another
Nix does not manage the overlayfs mount point itself, but the correct
functioning of the overlay store does depend on this mount point being set up
correctly. Rather than just assume this is the case, check that the lowerdir
and upperdir options are what we expect them to be. This check is on by
default, but can be disabled if needed.
The bad-uris tests are now in their own file.
"Outer" is a bad name, but it will be split up next.
Good for parallelism and easier reading.
@Ericson2314 Ericson2314 marked this pull request as ready for review February 29, 2024 17:09
This reverts commit 587c7dc, reversing
changes made to 864fc85.
@Ericson2314
Copy link
Member Author

Ericson2314 commented Feb 29, 2024

Annoying 11th hour CI failure.

I have tried temporarily reverting the Nixpkgs bump just to rule that out.

@Ericson2314
Copy link
Member Author

That did fix it. Reverting the revert now.

Copy link
Member

@thufschmitt thufschmitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At last found the time for a last review.

That's good, let's go!

@thufschmitt thufschmitt enabled auto-merge March 6, 2024 08:10
@thufschmitt
Copy link
Member

Oh right, forgot about the CI failure :/

@thufschmitt thufschmitt disabled auto-merge March 6, 2024 08:51
@benradf
Copy link
Member

benradf commented Mar 6, 2024

It seems to be failing to remount the overlayfs directory for some reason:

    + remountOverlayfs
    + mount -o remount /build/nix-test/local-overlay-store/verify/stores/merged-store/nix/store
    mount: /build/nix-test/local-overlay-store/verify/stores/merged-store/nix/store: mount point not mounted or bad option.
           dmesg(1) may have more information after failed mount system call.

Checking /proc/self/mounts inside the sandbox, that path looks to be a valid mountpoint, so I'm not sure why it's failing.

Did the mount binary we're using change perhaps? E.g. from the util-linux tool to busybox.

@Ericson2314
Copy link
Member Author

@benradf The nixpkgs bump is what broke it so yes, a changing mount command does seem like a likely culprit.

@Ericson2314 Ericson2314 enabled auto-merge April 8, 2024 02:22
@Ericson2314 Ericson2314 merged commit fef952e into NixOS:master Apr 8, 2024
@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/tweag-nix-dev-update-56/43035/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

store Issues and pull requests concerning the Nix store with-tests Issues related to testing. PRs with tests have some priority

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants