-
-
Notifications
You must be signed in to change notification settings - Fork 13k
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-rebuild: fix --install-bootloader flag with systemd-run #262724
Conversation
CC @roberth. |
Before this PR:
After
|
There should definitely be a nixos test to test this regression and we should add it to the |
I added it. Not sure if I did everything correctly with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answering your question, and maybe the question of whoever needs this test later and expects the bootloader to be tested.
I don't want to block this, so if you apply the suggestions, that's good enough. Though ideally we make the test a bit more complete.
Hope the tests still works in OfBorg, because I can't run it locally anymore for some reason (it is trying to build I tried to add the |
@ofborg test nixos-rebuild-install-bootloader |
I think this change broke the tested set evaluation.
|
@@ -569,7 +569,8 @@ in { | |||
nix-serve-ssh = handleTest ./nix-serve-ssh.nix {}; | |||
nixops = handleTest ./nixops/default.nix {}; | |||
nixos-generate-config = handleTest ./nixos-generate-config.nix {}; | |||
nixos-rebuild-specialisations = handleTest ./nixos-rebuild-specialisations.nix {}; | |||
nixos-rebuild-install-bootloader = handleTestOn ["x86_64-linux"] ./nixos-rebuild-install-bootloader.nix {}; | |||
nixos-rebuild-specialisations = handleTest ["x86_64-linux"] ./nixos-rebuild-specialisations.nix {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have been handleTestOn
.
The test can't build on Hydra. It exceeds the 3 GiB output limit. https://hydra.nixos.org/build/239312800 You know... perhaps it would be better to first let tests build for some time before making them channel blockers? |
... at least until it's fixed. /cc PR #262724 again.
Also, don't add channel blockers without maintainers:
|
|
Looks like the real culprit is missing dependencies to rebuild initrd from within a VM (if we flip back to $ nix build --no-link -f. nixosTests.nixos-rebuild-install-bootloader -L``` vm-test-run-nixos-rebuild-install-bootloader> machine # building '/nix/store/48kwl0adwbwlzw7x261v7w846pq48m3v-users-groups.json.drv'... vm-test-run-nixos-rebuild-install-bootloader> machine # Checking that Nix store paths of all wrapped programs exist... OK vm-test-run-nixos-rebuild-install-bootloader> machine # building '/nix/store/x30m3rvz7j39imcm6i25mf444kiavlbp-acl-2.3.1.tar.gz.drv'... vm-test-run-nixos-rebuild-install-bootloader> machine # building '/nix/store/hbd9bkhy0x7qfnl8p85793hh45yzdzsy-attr-2.5.1.tar.gz.drv'... vm-test-run-nixos-rebuild-install-bootloader> machine # warning: error: unable to download 'https://mirror.easyname.at/nongnu/acl/acl-2.3.1.tar.gz': Couldn't resolve host name (6); retrying in 311 ms vm-test-run-nixos-rebuild-install-bootloader> machine # warning: error: unable to download 'https://mirror.easyname.at/nongnu/attr/attr-2.5.1.tar.gz': Couldn't resolve host name (6); retrying in 301 ms vm-test-run-nixos-rebuild-install-bootloader> machine # warning: error: unable to download 'https://mirror.easyname.at/nongnu/acl/acl-2.3.1.tar.gz': Couldn't resolve host name (6); retrying in 550 ms vm-test-run-nixos-rebuild-install-bootloader> machine # warning: error: unable to download 'https://mirror.easyname.at/nongnu/attr/attr-2.5.1.tar.gz': Couldn't resolve host name (6); retrying in 540 ms vm-test-run-nixos-rebuild-install-bootloader> machine # warning: error: unable to download 'https://mirror.easyname.at/nongnu/acl/acl-2.3.1.tar.gz': Couldn't resolve host name (6); retrying in 1250 ms vm-test-run-nixos-rebuild-install-bootloader> machine # warning: error: unable to download 'https://mirror.easyname.at/nongnu/attr/attr-2.5.1.tar.gz': Couldn't resolve host name (6); retrying in 1090 ms vm-test-run-nixos-rebuild-install-bootloader> machine # warning: error: unable to download 'https://mirror.easyname.at/nongnu/acl/acl-2.3.1.tar.gz': Couldn't resolve host name (6); retrying in 2201 ms vm-test-run-nixos-rebuild-install-bootloader> machine # warning: error: unable to download 'https://mirror.easyname.at/nongnu/attr/attr-2.5.1.tar.gz': Couldn't resolve host name (6); retrying in 2341 ms vm-test-run-nixos-rebuild-install-bootloader> machine # error: vm-test-run-nixos-rebuild-install-bootloader> machine # … writing file '/nix/store/y3yiminrckvhf35fh9q42vjwi0npznji-acl-2.3.1.tar.gz' vm-test-run-nixos-rebuild-install-bootloader> machine # vm-test-run-nixos-rebuild-install-bootloader> machine # error: unable to download 'https://mirror.easyname.at/nongnu/acl/acl-2.3.1.tar.gz': Couldn't resolve host name (6) vm-test-run-nixos-rebuild-install-bootloader> machine # error: builder for '/nix/store/x30m3rvz7j39imcm6i25mf444kiavlbp-acl-2.3.1.tar.gz.drv' failed with exit code 1 vm-test-run-nixos-rebuild-install-bootloader> machine # error: 1 dependencies of derivation '/nix/store/61ldkx9h66hvmfyksplgks3080dp2m3g-acl-2.3.1.drv' failed to build vm-test-run-nixos-rebuild-install-bootloader> machine # building '/nix/store/c99ihlhb2lh875spzsl6rnc4058grxvn-autoconf-2.71.tar.xz.drv'... vm-test-run-nixos-rebuild-install-bootloader> machine # error: 1 dependencies of derivation '/nix/store/ywar7rckmkvkdn7yiw52kh31k4vnyv8p-libarchive-3.7.2.drv' failed to build vm-test-run-nixos-rebuild-install-bootloader> machine # error: 1 dependencies of derivation '/nix/store/rjk5kgwkr7d51s41kcbvz5q0rpq5vrq0-cmake-3.26.4.drv' failed to build vm-test-run-nixos-rebuild-install-bootloader> machine # error: 1 dependencies of derivation '/nix/store/myqqk3a5av187qavd79ba61qcl06113r-initrd-linux-6.1.59.drv' failed to build vm-test-run-nixos-rebuild-install-bootloader> machine # error: 1 dependencies of derivation '/nix/store/nly2ma5j7dksc2c6nb9zccgdwy6a898k-nixos-system-nixos-23.11pre-git.drv' failed to build ```Perhaps it's worth adding |
If this is true CC @vcunat since you already removed |
Interestingly this one does not have While |
Most tests don't use a boot loader but boot into the kernel directly. I think it would have to enable virtualisation.useBootLoader. To get a |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Description of changes
With #258571
nixos-rebuild --install-bootloader
flag is broken because we don't preserve theNIXOS_INSTALL_BOOTLOADER
flag.This PR fixes this issue.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)