nixosTests.systemd-initrd.bridge: fix failing test
Since slave interfaces of a bridge cannot be assigned IP addresses, we
must prevent IPs from being assigned to them via the test framework
modules. Since c6f6c28218, all nodes get
ipv6 addresses by default, so we must ensure IP addresses of any type
don't get assigned to the bridge slave interfaces.
This commit is contained in:
@@ -24,20 +24,23 @@
|
|||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.primaryIPAddress = "192.168.1.${toString config.virtualisation.test.nodeNumber}";
|
networking.primaryIPAddress = lib.mkForce "192.168.1.${toString config.virtualisation.test.nodeNumber}";
|
||||||
|
|
||||||
|
virtualisation.interfaces.eth1 = {
|
||||||
|
vlan = 1;
|
||||||
|
assignIP = false;
|
||||||
|
};
|
||||||
|
virtualisation.interfaces.eth2 = {
|
||||||
|
vlan = 2;
|
||||||
|
assignIP = false;
|
||||||
|
};
|
||||||
|
|
||||||
virtualisation.vlans = [
|
|
||||||
1
|
|
||||||
2
|
|
||||||
];
|
|
||||||
networking.bridges.br0.interfaces = [
|
networking.bridges.br0.interfaces = [
|
||||||
"eth1"
|
"eth1"
|
||||||
"eth2"
|
"eth2"
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.interfaces = {
|
networking.interfaces = {
|
||||||
eth1.ipv4.addresses = lib.mkForce [ ];
|
|
||||||
eth2.ipv4.addresses = lib.mkForce [ ];
|
|
||||||
br0.ipv4.addresses = [
|
br0.ipv4.addresses = [
|
||||||
{
|
{
|
||||||
address = config.networking.primaryIPAddress;
|
address = config.networking.primaryIPAddress;
|
||||||
|
|||||||
Reference in New Issue
Block a user