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. |
WilliButz
left a comment
There was a problem hiding this comment.
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? :) |
|
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
initrdsecrets from the store into theinitrdwhich 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
sshdhere 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
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)