we don't want to update config at each upgrade.
postinst can't detect upgrade vs install, it need to be done in preinst.
so I create a tmp file in preinst for first install, and detect this file
in postinst.
(as we need to have ifupdown2 installed first, to have the config rewrite working)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
https://github.com/CumulusNetworks/ifupdown2/pull/166
Openvswitch already manage mtu if ovs-mtu is defined.
(Ovs manage mtu in userland, and sync mtu for some interfaces in kernel).
If mtu is changed by address module, before the ovs userland mtu,
this give packets drop.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
All upstreamed by Alexandre and the master at time of writing is
besides one patch just that, so use it directly.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Currently, tap|veth interfaces are removed if user add a new ovs internal port and reload.
add ovs-ports-condone-regex option, like for bridge (to have the patch upstream).
default options to "tap|veth|fwpr"
to avoid to remove theses interfaces
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
It can contain unicode stuff which gets us warnings and could also be
quite long, so avoid printing that out for now but add some newlines
to make the message stand out more.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
udevadm ships actually a full executable copy in /bin and /sbin, so
go for the path systemd-udev-settle.service is using too - but it
shouldn't matter
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
while we not actively break that we really want to ensure that those
or newer versions are used
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This is fixing possible race condition with ovs 2.12
ans also cleanly remove ovs interfaces on networking service stop
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
ifupdown1 have a service to launch "udevadm settle",
to be sure that networking devices are correctly setup
before networking service is started.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920623
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
we don't want state_dir persistent across reboot.
I have add some ifreload hanging after a crash, with non existing old interfaces
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
ifupdown2.0 now setup address in pre-up, but ovs script also
create in pre-up, but after address module.
This patch execute addons scripts before ifupdown modules
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
commit 214bc505ac removed this by
mistake. While I fix it before detecting that (thank Wolfgang!) lets
restore it more like the state it was.
Add missing ordering:
After=network-pre.target
See systemd.special(7)'s description of this target
After=systemd-sysctl.service
ifupdown does the same - we want net.*.conf.default.*
sysctl keys to apply to newly created interfaces
After=systemd-modules-load.service
ifupdown does the same, though this should be mostly
optional as modules should be autoloaded anyway
Before=network.target
This is required to prevent services which require
network to be started too early and listen on wrong
addresses (iow. only on loopback or ipv4-only).
Before=network-online.target
See systemd.special(7)'s description. We are the
provider of this target.
Before=shutdown.target
ifupdown does it this way, it also makes more sense
given the Conflict entry, compared to the previous
WantedBy entry in [Install]
Changed install section:
WantedBy=multi-user.target
I wasn't sure about this. ifupdown does this.
basic.target didn't seem useful since we actually want:
WantedBy=network-online.target
We provide this, so we should be installed into it.
removed WantedBy=network.target
We strictly want to be ordered before this and instead
are required by multi-user.target already.
removed WantedBy=shutdown.target
I didn't see the point.
Originally-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>