]> git.proxmox.com Git - pve-common.git/commitdiff
INotify: remove allow-hotplug from /etc/network/interfaces
authorAlexandre Derumier <aderumier@odiso.com>
Tue, 7 Jan 2020 00:59:17 +0000 (01:59 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 8 Jan 2020 09:32:36 +0000 (10:32 +0100)
for user installing proxmox on top of debian,
debian install by default the first nic with allow-hotplug.

This is conflicting with "auto ...", but worst with ovs "allow-ovs ...".

User have reported race with ovs, where ovs vmbr was up before the nic.
https://forum.proxmox.com/threads/no-network-on-server-unless-i-ifdown-ifup-vmbr0.62733/

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
src/PVE/INotify.pm

index 22f413b77ba3313e9cf9828ca8a1e5ce519ab45d..867da306197014d57fa3c8886db3833732de3cd4 100644 (file)
@@ -901,6 +901,7 @@ sub __read_etc_network_interfaces {
     SECTION: while (defined ($line = <$fh>)) {
        chomp ($line);
        next if $line =~ m/^\s*#/;
     SECTION: while (defined ($line = <$fh>)) {
        chomp ($line);
        next if $line =~ m/^\s*#/;
+       next if $line =~ m/^\s*(allow-hotplug)\s+(.*)$/;
 
        if ($line =~ m/^\s*(auto|allow-ovs)\s+(.*)$/) {
            my @aa = split (/\s+/, $2);
 
        if ($line =~ m/^\s*(auto|allow-ovs)\s+(.*)$/) {
            my @aa = split (/\s+/, $2);