5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-01-03 09:17:36 +03:00

INotify : fix OVSBond && OvsintPort order + tests

OVSBond was missing
OvsintPort under ethx interfaces
This commit is contained in:
Alexandre Derumier 2020-02-18 06:33:46 +01:00 committed by Thomas Lamprecht
parent c688b8e683
commit 36bbe29db8
2 changed files with 84 additions and 6 deletions

View File

@ -1601,12 +1601,13 @@ NETWORKDOC
loopback => 100000,
eth => 200000,
OVSPort => 200000,
OVSIntPort => 200000,
bond => 300000,
bridge => 400000,
OVSBridge => 400000,
vlan => 500000,
vxlan => 500000,
OVSIntPort => 300000,
OVSBond => 400000,
bond => 400000,
bridge => 500000,
OVSBridge => 500000,
vlan => 600000,
vxlan => 600000,
};
my $lookup_type_prio = sub {

View File

@ -3,6 +3,8 @@ eth0:
eth1:
eth2:
eth3:
eth4:
eth5:
/proc/net/dev
r(load('brbase'));
@ -66,6 +68,10 @@ iface eth2 inet manual
iface eth3 inet manual
iface eth4 inet manual
iface eth5 inet manual
$vmbr0_part
CHECK
@ -107,6 +113,10 @@ iface eth2 inet manual
iface eth3 inet manual
iface eth4 inet manual
iface eth5 inet manual
$bond0_part
$vmbr0_part
@ -161,6 +171,10 @@ iface eth2 inet manual
iface eth3 inet manual
iface eth4 inet manual
iface eth5 inet manual
$bond0_part
$vmbr0_part
@ -274,6 +288,10 @@ iface eth2 inet manual
iface eth3 inet manual
iface eth4 inet manual
iface eth5 inet manual
$bond0_part
$vmbr0_part
@ -343,6 +361,36 @@ $config->{ifaces}->{'vmbr5'} = {
autostart => 1
};
$config->{ifaces}->{vmbr6} = {
ovs_mtu => 1400,
type => 'OVSBridge',
ovs_ports => 'bond1 ovsintvlan',
method => 'manual',
families => ['inet'],
autostart => 1
};
$config->{ifaces}->{bond1} = {
ovs_mtu => 1300,
type => 'OVSBond',
ovs_bridge => 'vmbr6',
ovs_bonds => 'eth4 eth5',
ovs_options => 'bond_mode=active-backup',
method => 'manual',
families => ['inet'],
autostart => 1
};
$config->{ifaces}->{ovsintvlan} = {
ovs_mtu => 1300,
type => 'OVSIntPort',
ovs_bridge => 'vmbr6',
ovs_options => 'tag=14',
method => 'manual',
families => ['inet'],
autostart => 1
};
expect load('loopback') . <<"CHECK";
source-directory interfaces.d
@ -354,12 +402,31 @@ iface eth2 inet manual
iface eth3 inet manual
iface eth4 inet manual
iface eth5 inet manual
auto eth1.100
iface eth1.100 inet manual
mtu 1400
allow-vmbr6 ovsintvlan
iface ovsintvlan inet manual
ovs_type OVSIntPort
ovs_bridge vmbr6
ovs_mtu 1300
ovs_options tag=14
$bond0_part
allow-vmbr6 bond1
iface bond1 inet manual
ovs_bonds eth4 eth5
ovs_type OVSBond
ovs_bridge vmbr6
ovs_mtu 1300
ovs_options bond_mode=active-backup
auto bond0.100
iface bond0.100 inet manual
mtu 1300
@ -387,6 +454,12 @@ iface vmbr5 inet manual
bridge-fd 0
mtu 1100
allow-ovs vmbr6
iface vmbr6 inet manual
ovs_type OVSBridge
ovs_ports bond1 ovsintvlan
ovs_mtu 1400
auto vmbr1.100
iface vmbr1.100 inet manual
mtu 1300
@ -437,6 +510,10 @@ iface eth2 inet manual
iface eth3 inet manual
iface eth4 inet manual
iface eth5 inet manual
auto vmbr0
iface vmbr0 inet static
address 10.0.0.2/24