FS#41269 - [netctl] Please officially support openvswitch
Attached to Project:
Arch Linux
Opened by Jonathan Hudson (stronnag) - Saturday, 19 July 2014, 19:25 GMT
Last edited by Jouke Witteveen (jouke) - Tuesday, 05 August 2014, 12:33 GMT
Opened by Jonathan Hudson (stronnag) - Saturday, 19 July 2014, 19:25 GMT
Last edited by Jouke Witteveen (jouke) - Tuesday, 05 August 2014, 12:33 GMT
|
Details
Description:
Openvswitch is now in community and thus it would be useful if it were supported by netctl. The attached files work with the repository versions of netctl (1.8-1) and openvswitch (2.1.2-3) at time of submission. This request supersedes https://bugs.archlinux.org/task/35401 The maintainer's consideration is solicited. -jonathan |
This task depends upon
Closed by Jouke Witteveen (jouke)
Tuesday, 05 August 2014, 12:33 GMT
Reason for closing: Implemented
Additional comments about closing: 1d490
Tuesday, 05 August 2014, 12:33 GMT
Reason for closing: Implemented
Additional comments about closing: 1d490
Apart from that, it looks good.
Please feel free to remove the deletion code in down(). I have no strong opinion either way.
openvswitch_down() {
for ovs_client in "${BindsToInterfaces[@]}"; do
ip link set "$ovs_client" promisc off down
done
ip_unset
bring_interface_down "$Interface"
}
-jonathan
I'm sorry to bring this nitpicking up, but this is precisely the stuff that I am no expert on in the openvswitch case (i.e. what are the deletion commands and their side-effects).
I am no expert on the matter, just a user for the single use case of a bridged interface for some lxc containers and libvirtd VMs. Assuming no deletion, once the device is in the openvswitch db, then the bridge will be instantiated (I assume) by the openvswitch module and then netctl just brings it up. Thus without the deletion command, once the bridge was defined in the ovs-db, it would always be instantiated (but not brought up) by loading the kernel module.
I don't think there is a perfect solution, but deletion on down is (IMHO) cleaner; we cannot cleanly detect if the bridge was extant or we created it. I'm sorry I don't feel qualified to provide a more definitive view.
-jonathan
This is what I had in mind:
openvswitch_down() {
for ovs_client in "${BindsToInterfaces[@]}"; do
ip link set "$ovs_client" promisc off down
done
ip_unset
$OVSCTL del-br "$Interface"
}
Any comments on that?
Additionally, I found that the ovs-vswitchd systemd service has to be running before the $OVSCTL is usable. Is this correct? If so, we need to find a way to specify this dependency.
You are correct on the dependency. I've (perhaps luckily) never seen a problem, but I appreciate there could be one.
-jonathan