New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: ovs_options not handled as in ifupdown1, breaking Fake Bridge configurations #245
Comments
@aderumier this one is for you 🙂 |
@julienfortin |
Also, I think we can't just keep the previous ifupdown1 syntax "ovs_options br_mgmt 4" , because we can't manage relationship with the main ovs parent. Maybe something like:
(so mostly like an internalport vlan) could world. (with special handling of vlan=4, when it's a fake bridge ) I need to do tests, do some reload,etc... |
ok, I have found a way keep old syntax with
just need to add an extra ovs_bridge to handle relationship, I'll send a small patch tomorrow for testing. |
To all the other readers FYI: This issue originated from a discussion in the Proxmox Forum about migrating an PVE Cluster from ifupdown to ifupdown2 with a legacy network configuration. In the PVE scenario, there is a catch to your approach: Since ovs_options is handled differently from ifupdown1 anyway, would it be possible to specify all necessary information there instead? Maybe like |
Hi, It's really need "ovs_bridge br_mgmt" to handle relationship with ifupdown2. I'll look to add this option in proxmox gui too |
TL;DR:
ovs_options
differently from ifupdown1ovs_options
contradicts the help text included in ifupdown2 itself.Detailed explanation:
openvswitch integration for ifupdown1 adds
ovs_options
as just additional parameters to the initialovs-vsctl
call, i.e. no double dashes added. See in https://github.com/openvswitch/ovs/blob/5046f2e35f62838c2ad410e20448e0b7c81d8234/debian/ifupdown.sh#L46-L91, quoting as example the setup of OVSBridge:(Note that there is still
ovs_extra
as a separate option if you do intend to create a new command separated by double dashes.)The ifupdown2-addon for openvswitch instead creates a new ovs-vsctl command from ovs_options, see https://github.com/CumulusNetworks/ifupdown2/blob/1d6a726e5a492ce933369585e1c623c0d9e711c0/ifupdown2/addons/openvswitch.py#L151-L159
This change in behaviour creates errors when using the fake bridge feature of OVS. Quoting the man page of ovs-vsctl:
In
/etc/network/interfaces
, this used to be configured usingovs_options
like this:Which in ifupdown1 correctly creates the single
add-br
call:ovs-vsctl -- --may-exist add-br vmbr4 br_mgmt 4
ifupdown2, however, creates a plain
add-br
call followed byset bridge
- which does not work and throws an error simply because this is not a case of setting options on an existing bridge, but changing theadd-br
call itself.In addition, this behaviour contradicts the help text included in the ifupdown2 openvswitch integration itself, where
ovs_options
is explicitly mentioned to add arguments to a (existing) command as opposed toovs_extra
adding a whole new command separated by double dashes https://github.com/CumulusNetworks/ifupdown2/blob/1d6a726e5a492ce933369585e1c623c0d9e711c0/ifupdown2/addons/openvswitch.py#L58-L69:The text was updated successfully, but these errors were encountered: