nix: add cross-version migration tests#188
nix: add cross-version migration tests#188arctic-alpaca wants to merge 1 commit intocyberus-technology:mainfrom
Conversation
450a80d to
aa9ebec
Compare
tests/default.nix
Outdated
| version_migration = createTestSuite { | ||
| inherit enablePortForwarding; | ||
| testScriptFile = ./testsuite_migration.py; | ||
| cloud-hypervisor-controller-override = pkgs.cloud-hypervisor-prev; |
There was a problem hiding this comment.
Shouldn't it be possible to reuse the existing extraControllerConfig parameter and do something like the following? This would save us from having to pass-through those new parameters. Or do I miss something?
extraControllerConfig = [ {...}: {
nixpkgs.overlays = [
(
_final: _prev:
(lib.optionalAttrs (cloud-hypervisor-override != null)) {
# Overwrite the default cloud-hypervisor version.
cloud-hypervisor = cloud-hypervisor-override;
}
)
];
};
];Sorry for the slightly off formatting of the snippet. I have not tested if the snippet works. Just to transport my thought.
There was a problem hiding this comment.
I'll look into it 👍 I'm not very familiar with Nix yet.
There was a problem hiding this comment.
I'll look into it 👍 I'm not very familiar with Nix yet.
Ah okay I see :D I'll hope it works correctly because I am not 100% sure how the overlays are applied in that case. But just give it a try and if it works as expected, we can remove the custom chv-override parameter again :)
There was a problem hiding this comment.
Way better, thank you!
aa9ebec to
edf2484
Compare
Adds a new input for the previous version of cloud-hypervisor and passes that to the `version_migration` test. The `version_migration` test just runs the existing `live_migration` tests for two different cloud-hypervisor versions. On-behalf-of: SAP julian.schindel@sap.com Signed-off-by: Julian Schindel <julian.schindel@cyberus-technology.de>
edf2484 to
824f749
Compare
I personally use |
Adds a new input for the previous version of cloud-hypervisor and passes that to the version_migration
test. Theversion_migrationtest just runs the existinglive_migration` tests for two different cloud-hypervisor versions.I've limited this PR to the
live_migrationtests, butlong_migration_with_loadcan be done the same way.I'm not sure if the
nix:prefix is correct here.Link to PR for libvirt: https://gitlab.cyberus-technology.de/cyberus/cloud/libvirt/-/merge_requests/153
To verify the behavior, I used a cloud-hypervisor branch that panics on migration. In CI, this shows only the newly added tests failing (timing out), which means the current cloud-hypervisor version is untouched, but the previous version is set as expected: https://gitlab.cyberus-technology.de/cyberus/cloud/libvirt/-/merge_requests/152