Need the ifupdown2 openvswitch addon !
---
src/PVE/INotify.pm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
index ba952e3..55ff969 100644
--- a/src/PVE/INotify.pm
+++ b/src/PVE/INotify.pm
@@ -1320,7 +1320,12 @@ sub __interface_to_string {
$done->{ovs_type} = 1;
if (my $bridge = $d->{ovs_bridge}) {
- $raw = "allow-$bridge $iface\n$raw";
+ if ($ifupdown2) {
+ $raw = "auto $iface\n$raw";
+ } else {
+ $raw = "allow-$bridge $iface\n$raw";
+ }
+
$raw .= "\tovs_bridge $bridge\n";
$done->{ovs_bridge} = 1;
}
@@ -1662,7 +1667,7 @@ NETWORKDOC
$printed->{$iface} = 1;
if ($d->{autostart}) {
- if ($d->{type} eq 'OVSBridge') {
+ if ($d->{type} eq 'OVSBridge' && !$ifupdown2) {
# cannot use 'auto' for OVS, would add race with systemd
[email protected]
$raw .= "allow-ovs $iface\n";
} else {
--
2.20.1
_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel