diff options
author | Stuart Cardall <developer@it-offshore.co.uk> | 2019-10-12 16:45:16 +0000 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2019-10-14 16:02:38 +0200 |
commit | 4451a76f4c2d630351ec1d809d822f14a16a13dd (patch) | |
tree | b30e8caeb0d8f135c6eb4bab8b32d26380fc8e70 /community/openvswitch/readme.debian.patch | |
parent | d11a553cf71bc799dd01a84dfce71465914b6322 (diff) | |
download | aports-4451a76f4c2d630351ec1d809d822f14a16a13dd.tar.bz2 aports-4451a76f4c2d630351ec1d809d822f14a16a13dd.tar.xz |
community/openvswitch: upgrade to 2.12.0
* http://docs.openvswitch.org/en/latest/
Diffstat (limited to 'community/openvswitch/readme.debian.patch')
-rw-r--r-- | community/openvswitch/readme.debian.patch | 102 |
1 files changed, 84 insertions, 18 deletions
diff --git a/community/openvswitch/readme.debian.patch b/community/openvswitch/readme.debian.patch index af89a0d355..28ea816610 100644 --- a/community/openvswitch/readme.debian.patch +++ b/community/openvswitch/readme.debian.patch @@ -1,5 +1,5 @@ ---- a/debian/openvswitch-switch.README.Debian ---- b/debian/openvswitch-switch.README.Debian +--- openvswitch-2.12.0/debian/openvswitch-switch.README.Debian ++++ openvswitch-2.12.0/debian/openvswitch-switch.README.Debian.new @@ -1,48 +1,8 @@ -README.Debian for openvswitch-switch ---------------------------------- @@ -43,8 +43,8 @@ - * Build and install the kernel module by hand. - - --Debian network scripts integration ------------------------------------ +-Debian network scripts (ifupdown) integration +------------------------------------------------- -This package lets a user to optionally configure Open vSwitch bridges +README.Alpine for Openvswitch +----------------------------- @@ -54,7 +54,7 @@ and ports from /etc/network/interfaces. Please refer to the interfaces(5) manpage for more details regarding /etc/network/interfaces. -@@ -202,43 +162,29 @@ +@@ -202,115 +162,30 @@ ex 8: Create and destroy bridges. @@ -62,32 +62,100 @@ -ifdown --allow=ovs $list_of_bridges +ifup $list_of_bridges +ifdown $list_of_bridges -+ + +-Open vSwitch integration with systemd-networkd +------------------------------------------------ +Notes on LXC integration: +------------------------- -+ + +-There is no native integration of OVS with systemd-networkd. That is, +-you cannot create OVS bridges, ports and bonds by simply writing configuration +-files in /etc/systemd/network. But, you can create OVS devices using ovs-vsctl +-and then write configuration files to provide them IP addresses. +To prevent containers failing to start after hard reboots create: +----------------------------------------------------------------- -+ + +-As soon as a OVS device is visible, systemd-networkd will provide that device +-an IP address. Since OVS database is persistent across reboots, the OVS +-devices will get re-created after a reboot as soon as OVS startup script is +-invoked. And systemd-networkd will immediately assign the configuration defined +-in /etc/systemd/network. +/etc/lxc/ovsup: -+ + +-Example: +#!/bin/sh +ovs-vsctl --if-exists del-port $5 +----------------------------------------------------------------- -+ + +-If you have a physical ethernet device "ens160" which has been configured with +-DHCP, your systemd-networkd's .network config file will look something like +-this: +/etc/lxc/ovsdown: -+ -+#!/bin/sh --Notes on dependencies: ----------------------- +-``` +-[Match] +-Name=ens160 ++#!/bin/sh +ovs-vsctl --if-exists del-port veth.$LXC_NAME +----------------------------------------------------------------- --openvswitch-switch depends on $network, $named $remote_fs and $syslog to start. --This creates some startup dependency issues. +-[Network] +-DHCP=ipv4 +& add to the container config file: +-[DHCP] +-ClientIdentifier=mac +-``` ++lxc.hook.pre-start = /etc/lxc/ovsup ++lxc.hook.post-stop = /etc/lxc/ovsdown + +-Please note how the DHCP ClientIdentifier above has been configured with the +-mac address. + +-To create a OVS bridge "br-ens160" and add "ens160" as a port of that +-bridge, you can change the .network configuration for "ens160" to look like: +- +-``` +-[Match] +-Name=ens160 +-``` +- +-Now create a new .network configuration file for "br-ens160". Something like: +- +-``` +-[Match] +-Name=br-ens160 +- +-[Network] +-DHCP=ipv4 +- +-[DHCP] +-ClientIdentifier=mac +-``` +- +-Now, use ovs-vsctl to create br-ens160 and add ens160 as a port of it. You +-will also have to flush the IP address of ens160 and restart systemd-networkd +-in the same line. It is important to let br-ens160 have the same mac address as +-ens160 to get the same IP address to br-ens160 from the DHCP server. In the +-below command, "$mac_of_ens160" holds the mac address of ens160. For e.g: +- +-``` +-mac_of_ens160='"00:0c:29:77:27:7a"' +-ovs-vsctl --may-exist add-br br-ens160 -- \ +- --may-exist add-port br-ens160 ens160 -- \ +- set interface br-ens160 mac="$mac_of_ens160"; ip addr flush dev ens160; \ +- systemctl restart systemd-networkd +-``` +- +-br-ens160 should now have the same DHCP IP. It should also have the correct +-DNS resolution servers configured. +- +-Notes on dependencies: +---------------------- +- +-openvswitch-switch depends on $network, $named $remote_fs and $syslog to start. +-This creates some startup dependency issues. +- -* Since openvswitch utilities are placed in /usr and /usr can be mounted -through NFS, openvswitch has to start after it. But if a user uses openvswitch -for all his networking needs and hence to mount NFS, there will be a deadlock. @@ -119,5 +187,3 @@ -bridges using tools like "ovs-vsctl" or "ovs-dpctl". This is also a problem -when you upgrade your openvswitch kernel module using commands like -'force-reload-kmod'. -+lxc.hook.pre-start = /etc/lxc/ovsup -+lxc.hook.post-stop = /etc/lxc/ovsdown |