Systemd sequencing (#1366)

* [configs] Do not require ogstun for system online

Systemd-networkd will wait for all managed interfaces to be configured
before determining the system is online. Since the ogstun and upf are
more logically an application rather than a system networking service,
don't wait for them to be configured by default.

This breaks the circular dependency between the userspace cellular
core network services and the system's network, which will allow the
cellular core network services to sequence themselves cleanly after
the system's network is up and configured.

* [configs] Sequence network-dependent units after network-online

Since open5gs targets platforms with both ifupdown (debian) and
systemd-networkd (Ubuntu) as core networking providers, this commit
sequences network-dependent core network components after the generic
network-online.target instead of one of the specific provider
targets. This allows the core network to operate correctly with both
systemd-networkd and ifupdown (networking), and fixes the issue
observed in https://github.com/open5gs/open5gs/issues/826 where some
platforms may fail to start cleanly.
This commit is contained in:
Matthew Johnson 2022-02-15 05:33:33 -08:00 committed by GitHub
parent 757285bf25
commit c0ffe1ffe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 12 additions and 9 deletions

View File

@ -4,3 +4,6 @@ Name=ogstun
[Network]
Address=10.45.0.1/16
Address=2001:db8:cafe::1/48
[Link]
RequiredForOnline=false

View File

@ -1,6 +1,6 @@
[Unit]
Description=Open5GS AMF Daemon
After=networking.service
After=network-online.target
[Service]
Type=simple

View File

@ -1,6 +1,6 @@
[Unit]
Description=Open5GS AUSF Daemon
After=networking.service
After=network-online.target
[Service]
Type=simple

View File

@ -1,6 +1,6 @@
[Unit]
Description=Open5GS MME Daemon
After=networking.service
After=network-online.target
[Service]
Type=simple

View File

@ -1,6 +1,6 @@
[Unit]
Description=Open5GS NSSF Daemon
After=networking.service
After=network-online.target
[Service]
Type=simple

View File

@ -1,6 +1,6 @@
[Unit]
Description=Open5GS SGW-C Daemon
After=networking.service
After=network-online.target
[Service]
Type=simple

View File

@ -1,6 +1,6 @@
[Unit]
Description=Open5GS SGW-U Daemon
After=networking.service
After=network-online.target
[Service]
Type=simple

View File

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

View File

@ -1,6 +1,6 @@
[Unit]
Description=Open5GS UDM Daemon
After=networking.service
After=network-online.target
[Service]
Type=simple

View File

@ -1,6 +1,6 @@
[Unit]
Description=Open5GS UPF Daemon
After=networking.service
After=network-online.target
Requires=systemd-networkd.service
[Service]