]> git.proxmox.com Git - pve-manager.git/commitdiff
network api : reload : don't check bridge delete
authorAlexandre Derumier <aderumier@odiso.com>
Thu, 13 Jun 2019 13:48:59 +0000 (15:48 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 14 Jun 2019 07:14:58 +0000 (09:14 +0200)
we are doing it in ifupdown2 directly

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

index c4c3c1a13065bcdb65a1b4c0d7598a22fa0991b7..94fc5c357e2e7ccc39332660aec1bed7badfbde8 100644 (file)
@@ -554,7 +554,6 @@ __PACKAGE__->register_method({
        $fh->close();
 
        my $ovs_changes = undef;
-       my $bridges_delete = {};
        my $running_ifaces = $running_config->{ifaces};
        my $new_ifaces = $new_config->{ifaces};
 
@@ -564,7 +563,6 @@ __PACKAGE__->register_method({
            my $new_iface = $new_ifaces->{$iface};
            my $new_type = $new_iface->{type};
 
-           $bridges_delete->{$iface} = 1 if !defined($new_iface) && $type eq 'bridge';
            if ($type =~ m/^OVS/) {
                #deleted ovs
                $ovs_changes = 1 if !defined($new_iface);
@@ -603,13 +601,6 @@ __PACKAGE__->register_method({
        die "reloading config with ovs changes is not possible currently\n"
            if $ovs_changes;
 
-       foreach my $bridge (keys %$bridges_delete) {
-
-           my (undef, $interface) = dir_glob_regex("/sys/class/net/$bridge/brif", '(tap|veth|fwpr).*');
-           die "bridge deletion is not possible currently if vm or ct are running on this bridge\n"
-               if defined($interface);
-       }
-
        my $worker = sub {
 
            rename($new_config_file, $current_config_file) if -e $new_config_file;