Relax systemd requirements (#1368)

* [configs] Remove requires systemd-networkd dep from smfd service

The smf no longer has (never had?) a dependency on systemd-networkd,
and can start and remain operational without systemd-networkd
specifically running.

* [configs] Relax upf dependency on systemd-networkd

The upf relies on systemd-networkd to create the ogstun interface, but
does not communicate with it at runtime. It currently has a "Requires"
dependency specified, which means that the upf will be stopped if
systemd-networkd is ever stopped. Since the upf doesn't actually care
if systemd-networkd is later stopped after ogstun is created, it can
use the weaker "Wants" dependency type, which allows it to keep
running even if systemd-networkd were to be stopped.

Regardless, since it does rely on systemd-networkd specifically to
create the ogstun interface, it should sequence itself "After"
systemd-networkd has been started.

Since the true dependency is ogstun, not systemd-networkd, a cleaner
approach would depend on the specific tunnel device being
available. Systemd exposes this information via device units, but I'm
not sure if they are always consistently named across platforms.
This commit is contained in:
Matthew Johnson 2022-02-16 00:56:14 -08:00 committed by GitHub
parent c0ffe1ffe4
commit 7df65e832e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,6 @@
[Unit]
Description=Open5GS SMF Daemon
After=network-online.target
Requires=systemd-networkd.service
[Service]
Type=simple

View File

@ -1,7 +1,7 @@
[Unit]
Description=Open5GS UPF Daemon
After=network-online.target
Requires=systemd-networkd.service
After=network-online.target systemd-networkd.service
Wants=systemd-networkd.service
[Service]
Type=simple