Skip to content

Commit

Permalink
Fixed Ordering cycle found, causing spurious issues during boot (no
Browse files Browse the repository at this point in the history
tangd.socket enabled, or no network, etc.)

This commit fixes the following ordering cycle found on Fedora 30+ and
RHEL 8.1:

-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
systemd[1]: sockets.target: Found ordering cycle on tangd.socket/start
systemd[1]: sockets.target: Found dependency on tangd-keygen.service/start
systemd[1]: sockets.target: Found dependency on basic.target/start
systemd[1]: sockets.target: Found dependency on sockets.target/start
systemd[1]: sockets.target: Job tangd.socket/start deleted to break ordering cycle starting with sockets.target/start
[ SKIP ] Ordering cycle found, skipping Tang Server socket
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

This is tracked by Red Hat through BZ #1792173
(https://bugzilla.redhat.com/show_bug.cgi?id=1792173)

The previous implementation of the Tang socket was making it depend on
services, which is not how sockets are expected to be configured.
Additionally, the Tang socket was installed in multi-user.target instead
of sockets.target.

This implementation creates a "standard" socket installed in
sockets.target, and modifies the corresponding service so that it makes
sure the requirement on the key presence is met.
The requirement on tangd-update.service has been removed since it is
useless: the service doesn't need tangd-update.service at all.
  • Loading branch information
rmetrich authored and sergio-correia committed Jan 30, 2020
1 parent 590de27 commit 7778512
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 1 addition & 6 deletions units/tangd.socket
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
[Unit]
Description=Tang Server socket
Requires=tangd-keygen.service
Requires=tangd-update.service
Requires=tangd-update.path
After=tangd-keygen.service
After=tangd-update.service

[Socket]
ListenStream=80
Accept=true

[Install]
WantedBy=multi-user.target
WantedBy=sockets.target
2 changes: 2 additions & 0 deletions units/tangd@.service.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[Unit]
Description=Tang Server
Requires=tangd-keygen.service
After=tangd-keygen.service

[Service]
StandardInput=socket
Expand Down

0 comments on commit 7778512

Please sign in to comment.