From aeac55e13854fe8d7aeeef545c3f5d65edc34971 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Mon, 19 Oct 2015 10:50:23 +0200 Subject: [PATCH 1/1] half-revert: remove autostart property from bridge ports In commit 21d32c95cd autostart was removed from all bridge ports but should have only been removed from ovs bridge ports. --- src/PVE/INotify.pm | 13 ------------- .../t.bridge_eth_remove_auto.pl | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index a9dbf21..60610ce 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -1245,19 +1245,6 @@ sub __write_etc_network_interfaces { } } - # Remove autostart from linux bridge ports - foreach my $iface (keys %$ifaces) { - my $d = $ifaces->{$iface}; - if ($d->{type} eq 'bridge' && $d->{bridge_ports}) { - foreach my $p (split (/\s+/, $d->{bridge_ports})) { - my $n = $ifaces->{$p}; - die "bridge '$iface' - unable to find port '$p'\n" - if !$n; - $n->{autostart} = 0; - } - } - } - # check OVS bond ports foreach my $iface (keys %$ifaces) { my $d = $ifaces->{$iface}; diff --git a/test/etc_network_interfaces/t.bridge_eth_remove_auto.pl b/test/etc_network_interfaces/t.bridge_eth_remove_auto.pl index 0b073d9..98f5df8 100644 --- a/test/etc_network_interfaces/t.bridge_eth_remove_auto.pl +++ b/test/etc_network_interfaces/t.bridge_eth_remove_auto.pl @@ -18,7 +18,7 @@ die "autostart lost" if !$config->{ifaces}->{eth1}->{autostart}; new_iface("vmbr0", 'bridge', [{ family => 'inet' }], bridge_ports => 'eth0'); new_iface("vmbr1", 'OVSBridge', [{ family => 'inet' }], ovs_ports => 'eth1'); r(w()); -die "autostart not removed for linux bridge port" if $config->{ifaces}->{eth0}->{autostart}; +die "autostart wrongly removed for linux bridge port" if !$config->{ifaces}->{eth0}->{autostart}; die "autostart not removed for ovs bridge port" if $config->{ifaces}->{eth1}->{autostart}; 1; -- 2.39.2