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/initrd-network-ssh: fix test #102530
Conversation
The test relied on moving `initrd` secrets from the store into the `initrd` which was fine here as it's only an integration test and not a production environment. However, this broke in 20.09 when support for this was dropped[1]. To make sure that the snakeoil key used as hostkey for `sshd` here actually gets copied into the VM, I added a small script for this that takes care of this process while building the initial ramdisk. [1] d930466
Hm, does this relate to #91744? |
The problem I have with #91744 is that I don't want to touch the I filed this PR since I wrote a similar testcase for a personal pet-project where I encountered the same issue, so I figured that it would make sense to fix this test as well. Until we have a working solution everyone agrees on, it would make sense IMHO to use this (temporary) fix to make sure that the current functionality works fine and we don't introduce some accidental regressions. |
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.
Given that the current version of initrd.network.ssh
works, while still having some quirks, I also find it important to have a working test for it, so I'm with @Ma27 on this approach.
These two extra commands in the test should be removed when the fixes to the module are added, for example in the mentioned PR.
@GrahamcOfBorg test initrd-network-ssh |
@emilazy what do you think? :) |
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.
Seems reasonable to me.
Ported to 20.09 as 3090f4d. |
This is probably related to #99618 where I was trying to provide a mechanism to properly do it during bootloader install time (as that allows you to generate the key on the server/during install/…). |
Motivation for this change
The test relied on moving
initrd
secrets from the store into theinitrd
which was fine here as it's only an integration test and not aproduction environment.
However, this broke in 20.09 when support for this was dropped[1]. To make
sure that the snakeoil key used as hostkey for
sshd
here actually getscopied into the VM, I added a small script for this that takes care of
this process while building the initial ramdisk.
[1] d930466
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)