cherry-pick.v7-4-g7778512.fixed-ordering-cycle-found-causing-spurious-issues-during-boot-no.patch 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Subject: Fixed Ordering cycle found, causing spurious issues during boot (no (...)
  2. Origin: v7-4-g7778512 <https://github.com/latchset/tang/commit/v7-4-g7778512>
  3. Upstream-Author: Renaud Métrich <rmetrich@redhat.com>
  4. Date: Thu Jan 30 09:07:21 2020 +0100
  5. Fixed Ordering cycle found, causing spurious issues during boot (no
  6. tangd.socket enabled, or no network, etc.)
  7. This commit fixes the following ordering cycle found on Fedora 30+ and
  8. RHEL 8.1:
  9. -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
  10. systemd[1]: sockets.target: Found ordering cycle on tangd.socket/start
  11. systemd[1]: sockets.target: Found dependency on tangd-keygen.service/start
  12. systemd[1]: sockets.target: Found dependency on basic.target/start
  13. systemd[1]: sockets.target: Found dependency on sockets.target/start
  14. systemd[1]: sockets.target: Job tangd.socket/start deleted to break ordering cycle starting with sockets.target/start
  15. [ SKIP ] Ordering cycle found, skipping Tang Server socket
  16. -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
  17. This is tracked by Red Hat through BZ #1792173
  18. (https://bugzilla.redhat.com/show_bug.cgi?id=1792173)
  19. The previous implementation of the Tang socket was making it depend on
  20. services, which is not how sockets are expected to be configured.
  21. Additionally, the Tang socket was installed in multi-user.target instead
  22. of sockets.target.
  23. This implementation creates a "standard" socket installed in
  24. sockets.target, and modifies the corresponding service so that it makes
  25. sure the requirement on the key presence is met.
  26. The requirement on tangd-update.service has been removed since it is
  27. useless: the service doesn't need tangd-update.service at all.
  28. --- a/units/tangd.socket.in
  29. +++ b/units/tangd.socket.in
  30. @@ -1,14 +1,9 @@
  31. [Unit]
  32. Description=Tang Server socket
  33. -Requires=tangd-keygen.service
  34. -Requires=tangd-update.service
  35. -Requires=tangd-update.path
  36. -After=tangd-keygen.service
  37. -After=tangd-update.service
  38. [Socket]
  39. ListenStream=80
  40. Accept=true
  41. [Install]
  42. -WantedBy=multi-user.target
  43. +WantedBy=sockets.target
  44. --- a/units/tangd@.service.in
  45. +++ b/units/tangd@.service.in
  46. @@ -1,5 +1,7 @@
  47. [Unit]
  48. Description=Tang Server
  49. +Requires=tangd-keygen.service
  50. +After=tangd-keygen.service
  51. [Service]
  52. StandardInput=socket