]> git.proxmox.com Git - pve-common.git/commitdiff
half-revert: remove autostart property from bridge ports
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 19 Oct 2015 08:50:23 +0000 (10:50 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 19 Oct 2015 09:11:29 +0000 (11:11 +0200)
In commit 21d32c95cd autostart was removed from all bridge
ports but should have only been removed from ovs bridge ports.

src/PVE/INotify.pm
test/etc_network_interfaces/t.bridge_eth_remove_auto.pl

index a9dbf21265417d56979df15e30729135079a6ada..60610ce507f467d20d66ea30a4e4ec6a38b1dbf1 100644 (file)
@@ -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};
     # check OVS bond ports
     foreach my $iface (keys %$ifaces) {
        my $d = $ifaces->{$iface};
index 0b073d9d40fedaf9876556541e447f303a1253ad..98f5df8edd34aba621b6a90cfaede4098a09ccd9 100644 (file)
@@ -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());
 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;
 die "autostart not removed for ovs bridge port" if $config->{ifaces}->{eth1}->{autostart};
 
 1;