[systemd-devel] Question about service dependency handling in systemd-228

Reindl Harald h.reindl at thelounge.net
Mon Nov 27 09:11:44 UTC 2017



Am 27.11.2017 um 05:23 schrieb Bao Nguyen:
> Thanks all for your comments. I will try to use option FreeBind. However 
> could anyone explain for me that I did not use FreeBind option in 
> systems-210 but all my services start well? I am still inclined to the 
> different of systemd-228 and systemd-210 causes the current issue.

beause your configuration was undefined behavior and never made any 
sense when there are dependency loops and similar problems - systemd 
does and did the best not throw you to the mergency console and boot the 
system somehow, pointed out errors and now it's time to fi them

IMHO it would be justified not to boot at all if there is as example a 
unit which has itself in After/Before/Requires as example when someone 
don't read his systemlogs after change units and "systemctl 
daemon-reload" :-)

> On Sun, Nov 26, 2017 at 4:53 PM, Reindl Harald <h.reindl at thelounge.net 
> <mailto:h.reindl at thelounge.net>> wrote:
> 
> 
> 
>     Am 26.11.2017 um 10:47 schrieb Bao Nguyen:
> 
>         Regard to your question, "asi-My-5101.socket" depends on
>         "My-sshd.target", I think that in my case it is expected as my
>         socket listens on a specific address IP:port so it should start
>         after a network service to configure and assign IP address
>         before my socket runs
> 
> 
>     nonsense - the whole point of socket activation is to have sockets
>     listening before other stuff is up and running
> 
>     https://www.freedesktop.org/software/systemd/man/systemd.socket.html
>     <https://www.freedesktop.org/software/systemd/man/systemd.socket.html>
>     If an IP address is used here, it is often desirable to listen on it
>     before the interface it is configured on is up and running, and even
>     regardless of whether it will be up and running at any point. To
>     deal with this, it is recommended to set the FreeBind= option
>     described below
> 
>     FreeBind=
>     Takes a boolean value. Controls whether the socket can be bound to
>     non-local IP addresses. This is useful to configure sockets
>     listening on specific IP addresses before those IP addresses are
>     successfully configured on a network interface. This sets the
>     IP_FREEBIND socket option. For robustness reasons it is recommended
>     to use this option whenever you bind a socket to a specific IP
>     address. Defaults to false.


More information about the systemd-devel mailing list