Bug 1792219
Summary: | socket.targets incorrectly pulls any socket unit installed on the system | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Renaud Métrich <rmetrich> |
Component: | systemd | Assignee: | David Tardon <dtardon> |
Status: | CLOSED WONTFIX | QA Contact: | Frantisek Sumsal <fsumsal> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 8.1 | CC: | dtardon, systemd-maint-list |
Target Milestone: | rc | ||
Target Release: | 8.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-03-20 13:46:43 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Renaud Métrich
2020-01-17 10:27:46 UTC
(In reply to Renaud Métrich from comment #0) > The systemd.special(7) manpage states the following about "sockets.target": > -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< > -------- > sockets.target > A special target unit that sets up all socket units (see > systemd.socket(5) for details) > that shall be active after boot. > > Services that can be socket-activated shall add Wants= > dependencies to this unit for their > socket unit during installation. This is best configured via a > WantedBy=sockets.target in > the socket unit's "[Install]" section. > -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< > -------- > > The wording is confusing because the admin can believe that only sockets > installed into "sockets.target" are affected, which is not the case. Well, *all socket units* sounds pretty unconditional to me... And it's said even more clearly in "Default dependencies" section on systemd.socket(5). > In fact, as long as a socket is pulled by some target (e.g. > "WantedBy=multi-user.target"), a dependency "After" is added to > "sockets.target" for that socket, e.g. with "tangd.socket" which currently > is installed in multi-user.target: Yes, the dependency is added as a default dependency to any loaded socket. > This is problematic because if, for some reason, the admin wants a Unix > socket to listen on a remote file system, this creates an ordering cycle, > breaking the system boot. > > IMHO, only sockets installed in sockets.target should be brought online > early to reach sockets.target. That would be a change of behavior. It's worked like this since ever and it's specified that it shall work like this (btw, the same is true for paths.target and timers.target). The standard way to avoid default dependencies when they cause problems for a unit is to use DefaultDependencies=no in that unit. Development Management has reviewed and declined this request. You may appeal this decision by reopening this request. |