[pve-devel] [PATCH pve-common] network_interfaces: use allow-ovs for OVSBridge

Alexandre DERUMIER aderumier at odiso.com
Fri Sep 20 10:33:38 CEST 2019


>>    if ($d->{autostart}) {
>>        if ($d->{type} eq 'OVSBridge') {
>>            $raw .= "allow-ovs $iface\n";
>>        } else {
>>            $raw .= "auto $iface\n";
>>        }
>>    }

>>And the start script for openvswitch-switch queries and auto starts all those 
>>with "allow-ovs" so just omitting it would be enough to mark it as non-autostart? 

Yes, I think it should work.
I'll do test, and update the patch.



----- Mail original -----
De: "Thomas Lamprecht" <t.lamprecht at proxmox.com>
À: "pve-devel" <pve-devel at pve.proxmox.com>, "aderumier" <aderumier at odiso.com>
Envoyé: Vendredi 20 Septembre 2019 10:19:42
Objet: Re: [pve-devel] [PATCH pve-common] network_interfaces: use allow-ovs for OVSBridge

On 20.09.19 08:45, Alexandre Derumier wrote: 
> new openvswitch-switch service use "ifup --allow-ovs", 
> and this race with "auto ..." used by networking service 
> 
> bug reported here: 
> https://forum.proxmox.com/threads/so-is-openvswitch-bonding-just-broken-on-pve-6-whats-going-on.58020/ 
> 
> 
> This is also fixing ovs with ifupdown2 
> 
> Openvswitch github have a note about this: 
> https://github.com/openvswitch/ovs/commit/e0dfd67b456c8ea36cc2e2f23039a300dbbedfed#diff-555e6da95251766b76e83867900bd8fe 
> 
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com> 
> --- 
> src/PVE/INotify.pm | 20 ++++++++++--------- 
> .../t.list-interfaces.pl | 2 +- 
> .../t.ovs_bridge_allow.pl | 6 +++--- 
> 3 files changed, 15 insertions(+), 13 deletions(-) 
> 
> diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm 
> index 6a7f110..b3e5ab0 100644 
> --- a/src/PVE/INotify.pm 
> +++ b/src/PVE/INotify.pm 

> @@ -1603,7 +1600,12 @@ NETWORKDOC 
> } 
> 
> $printed->{$iface} = 1; 
> - $raw .= "auto $iface\n" if $d->{autostart}; 
> + if ($d->{type} eq 'OVSBridge') { 
> + $raw .= "allow-ovs $iface\n"; 
> + } elsif ($d->{autostart}) { 
> + $raw .= "auto $iface\n" if $d->{autostart}; 
> + } 
> + 

Hmm, one thing I'm wondering is about the autostart setting vor OVS bridges. 

Would it be more correct to do: 

if ($d->{autostart}) { 
if ($d->{type} eq 'OVSBridge') { 
$raw .= "allow-ovs $iface\n"; 
} else { 
$raw .= "auto $iface\n"; 
} 
} 

As else currently the autostart setting for OVS (which is also exposed in 
Webinterface) has not effect.. 

And the start script for openvswitch-switch queries and auto starts all those 
with "allow-ovs" so just omitting it would be enough to mark it as non-autostart? 




More information about the pve-devel mailing list