network api : reload : don't check bridge delete

we are doing it in ifupdown2 directly

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2019-06-13 15:48:59 +02:00 committed by Thomas Lamprecht
parent e46bf624d5
commit bf32b90e89

View 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;