nixosTests.ec2: Port tests that depend on common/ec2.nix#79696
nixosTests.ec2: Port tests that depend on common/ec2.nix#79696flokli merged 3 commits intoNixOS:masterfrom
Conversation
|
@GrahamcOfBorg test openstack-image ec2 |
|
@GrahamcOfBorg test ec2-nixops |
nixos/tests/common/ec2.nix
Outdated
There was a problem hiding this comment.
do you know why we create new temporary folders here?
I'd expect it to be due workaround leftover files when invoking nix-build nixos/tests/ec2.nix, but I'm not sure… Did you check the commit history?
If that's the case, some comment might help.
There was a problem hiding this comment.
I didn't check the history, but it could be to reproduce the behavior of other tests: if you start the test interactively, the VM state files are created in the /tmp/vm-<machine-name>/state directory.
nixos/tests/common/ec2.nix
Outdated
There was a problem hiding this comment.
I don't really understand why we invoke qemu here manually - shouldn't that be job of the testing harness and abstracted away entirely? If it's just to pass in the metadata, maybe add a knob in the harness, and wrap the creation of the metadata inside a nix derivation, instead of the test driver script?
There was a problem hiding this comment.
I don't know much about the amazon ami image stuff in nixpkgs. But my guess is that the image that config.system.build.amazonImage create is a format that qemu doesn't directly consume, so the test creates a .qcow1 file.
And then, that together with the DHCP foo and webservice is a bit too much for the normal machine abstraction.
There was a problem hiding this comment.
I think a new qemu image is created because the provided image is readonly since it is in the store. This new qemu image uses "copy on write" from provided image.
Then, a comment mentions an issue with the qemu embeded dhcp server. To make it working, the network configuration of the machine needs to be explicitly specified.
I think this use case is really different from other NIxOS tests because we use a prebuilt image (no shared store...), and we need to do some tricks on the network configuration of the machine. This could explain why this test is a bit different!
|
@GrahamcOfBorg test ec2-config |
|
@nlewo would you be able to take a look at this? |
nixos/tests/common/ec2.nix
Outdated
There was a problem hiding this comment.
I didn't check the history, but it could be to reproduce the behavior of other tests: if you start the test interactively, the VM state files are created in the /tmp/vm-<machine-name>/state directory.
nixos/tests/common/ec2.nix
Outdated
There was a problem hiding this comment.
I think a new qemu image is created because the provided image is readonly since it is in the store. This new qemu image uses "copy on write" from provided image.
Then, a comment mentions an issue with the qemu embeded dhcp server. To make it working, the network configuration of the machine needs to be explicitly specified.
I think this use case is really different from other NIxOS tests because we use a prebuilt image (no shared store...), and we need to do some tricks on the network configuration of the machine. This could explain why this test is a bit different!
|
I rebased on master and couldn't get it to build: |
|
@tfc can you rebase this and give it another look? |
This test wants to download things from the internet while building the system. It can probably be fixed by ensuring these paths are present in the initial nix-store.
|
It seems the merge conflicts resolved themselves (or GitHub doesn't show a Anyhow - I assume more things need to be added to the initial closure to make it succeed, but the "porting parts" of this test seem to be fine. I'll mark |
|
I opened #96069 to unbreak nixosTests.ec2-config. |
Motivation for this change
#72828
This is a bundle of ports because it is not possible to port only a portion of the tests that depend on common/ec2.nix unfortunately.
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)