Skip to content

nixos: Fix lvm2 sd stage 1 tests#230366

Closed
ElvishJerricco wants to merge 1 commit intoNixOS:masterfrom
ElvishJerricco:lvm2-sd-stage-1-test-store-image-fix
Closed

nixos: Fix lvm2 sd stage 1 tests#230366
ElvishJerricco wants to merge 1 commit intoNixOS:masterfrom
ElvishJerricco:lvm2-sd-stage-1-test-store-image-fix

Conversation

@ElvishJerricco
Copy link
Contributor

Description of changes

Now that useBootLoader implies a whole root fs disk image, we can't just change the root device like this anymore.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label May 6, 2023
@ElvishJerricco
Copy link
Contributor Author

@RaitoBezarius Is it possible to make it not build the store image at all? Even with useNixStoreImage = false, it still builds one.

fwiw, this is why I think we shouldn't be using a store image by default with useBootLoader = true. It's good to be able to do that, but aren't there other tests that assume the root disk is an empty image and can therefore be trivially replaced?

@ElvishJerricco
Copy link
Contributor Author

Hm, only seems to work with the linux-latest versions... not sure why the device times out on the others.

@RaitoBezarius
Copy link
Member

@RaitoBezarius Is it possible to make it not build the store image at all? Even with useNixStoreImage = false, it still builds one.

fwiw, this is why I think we shouldn't be using a store image by default with useBootLoader = true. It's good to be able to do that, but aren't there other tests that assume the root disk is an empty image and can therefore be trivially replaced?

What do you mean by store image? It never builds a store image if you don't use one.

It only builds a system image, containing a nix store.

We should not use a store image by default with useBootLoader = true AFAIK. I don't know much about tests that assume the root disk is an empty image, if there are some like those, they should probably direct boot with a bootloader and not use the default filesystems and they can do their stuff like this.

@ofborg ofborg bot added 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 6, 2023
@ElvishJerricco
Copy link
Contributor Author

It only builds a system image, containing a nix store

This is what I meant by store image, and what I expected to be disabled by useNixStoreImage = false. But if I check the derivation closure for the test, I do find a derivation called nixos-disk-image containing a roughly 1G disk image file.

@ElvishJerricco
Copy link
Contributor Author

Closed by #234030

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 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.

2 participants