vmtests attempt to parse v2 netconfig using curtin.net, even through it is not supported
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
In Progress
|
Undecided
|
Wesley Wiedenmeier |
Bug Description
For networking tests, vmtests adds network devices to the qemu instance with the mac addresses referenced in the network config. The code to detect addresses from network config uses curtin.net, which does not have v2 support. This causes tests for curtin's v2 netconfig passthrough support to fail.
A short term approach to fixing this would be to hardcode an attribute with the required interfaces into the testcase for v2 network passthrough and check for this property before attempting to parse network config. This would be enough to ensure that v2 passthrough is working as expeted and get basic qa for v2 passthrough in place. This would also allow us to test the in-target cloud-init's v2 network support. Combined with the ability to specify a ppa to enable in-target and moving system_upgrade before apply net (LP: #1665962), this would give us qa for cloud-init networking until cloud-init's cloud_tests have been extended with support for the kvm platform, allowing network testing there.
Adding additional testcases for v2 passthrough support and v2 support in the in-target cloud will be inconvenient until vmtests detect the network devices required for a test from v2 config. A proper solution would be to update vmtests to be able to extract mac_addresses used for interface matching from v2 netconfig. This should probably be done before v2 passthrough support is merged into trunk. This could probably use code from the cloud-init v2 network support branch.
Related branches
- Ryan Harper: Pending requested
-
Diff: 692 lines (+481/-63)8 files modifiedcurtin/commands/apply_net.py (+7/-2)
curtin/commands/curthooks.py (+95/-42)
curtin/net/__init__.py (+25/-0)
examples/tests/network_v2_passthrough.yaml (+18/-0)
tests/unittests/test_commands_apply_net.py (+109/-4)
tests/unittests/test_curthooks.py (+181/-0)
tests/vmtests/__init__.py (+24/-15)
tests/vmtests/test_network_passthrough.py (+22/-0)
Changed in curtin: | |
status: | New → In Progress |
Changed in curtin: | |
assignee: | nobody → Wesley Wiedenmeier (wesley-wiedenmeier) |