[pve-devel] [PATCH pve-manager 2/4] network api : reload : don't check bridge delete

Alexandre Derumier aderumier at odiso.com
Thu Jun 13 15:48:59 CEST 2019


we are doing it in ifupdown2 directly

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/API2/Network.pm | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm
index 6940be1d..98652800 100644
--- a/PVE/API2/Network.pm
+++ b/PVE/API2/Network.pm
@@ -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;
-- 
2.20.1




More information about the pve-devel mailing list