[pve-devel] [PATCH pve-manager] API2: network reload: allow ovs reloading

Alexandre Derumier aderumier at odiso.com
Fri Mar 20 11:44:54 CET 2020


ifupdown2 support it now

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

diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm
index 82ae9037..ae6a350e 100644
--- a/PVE/API2/Network.pm
+++ b/PVE/API2/Network.pm
@@ -629,25 +629,6 @@ __PACKAGE__->register_method({
 
 	assert_ifupdown2_installed();
 
-	if (-x '/usr/bin/ovs-vsctl') {
-	    my $ovs_configured = sub {
-		my $ifaces = shift;
-		my @ovstypes = grep { $_->{type} =~ /^ovs\S+/i } values %$ifaces;
-		return scalar(@ovstypes) > 0;
-	    };
-	    my $tmp = PVE::INotify::read_file('interfaces', 1);
-	    my $ifaces = $tmp->{data}->{ifaces};
-	    my $changes = $tmp->{changes};
-
-	    if ($ovs_configured->($ifaces)) {
-		die "There are OpenVSwitch configured interfaces, but ifupdown2 ".
-		    " reload is not compatible with openvswitch currently\n";
-	    } elsif ($changes && $changes =~ /^\s*(?:[+-])?\s*(ovs_type|allow-ovs)/mi) {
-		die "Changes include OpenVSwitch interfaces, but ifupdown2 ".
-		    "reload is not compatible with openvswitch currently\n";
-	    }
-	}
-
 	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