Hi Uoti,

Thanks a lot for your answer, I have checked the cycle. It is created
by sockets.target
-> asi-My-5101.socket -> My-sshd.target -> My-syncd.service ->
My-nfs-client.service
-> My-handling.service -> basic.target -> sockets.target. I do not see the
same cycle in systemd-210 so I said that there is maybe a change in
systemd-210 and sytemd-228 like building dependency tree and handling
cycle. I can confirm there is no change in my scripts.

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.

Could you please help me if it is due to the fault in sytemd-228 or I have
to adapt my script to overcome this issue? I tried to
add DefaultDependencies=no in my asi-My-5101.socket, the problem go away
(because sometimes I see it said the cycle created in basic.target, the
behavior is really strange in systemd-228).

Thanks,
Brs,
Bao

On Sat, Nov 25, 2017 at 9:44 PM, Uoti Urpala <uoti.urp...@pp1.inet.fi>
wrote:

> On Sat, 2017-11-25 at 12:08 +0700, Bao Nguyen wrote:
> > [   41.154231] systemd[1]: nss-lookup.target: Dependency
> Before=nss-lookup.target dropped
> > [   41.297229] systemd[1]: sockets.target: Found ordering cycle on
> sockets.target/start
> > [   41.297236] systemd[1]: sockets.target: Found dependency on
> asi-My-5101.socket/start
> > [   41.297239] systemd[1]: sockets.target: Found dependency on
> My-sshd.target/start
> > [   41.297241] systemd[1]: sockets.target: Found dependency on
> My-syncd.service/start
> > [   41.297244] systemd[1]: sockets.target: Found dependency on
> My-nfs-client.service/start
> > [   41.297246] systemd[1]: sockets.target: Found dependency on
> My-handling.service/start
>
>
> > My question is if there are any significant different about building
> tree dependency and handling cycle dependency between systemd-210 and
> systemd-228 that can lead to my current situation? I have checked the
> change log, source code but not found any useful info
>
> Rather than start by trying to find differences between systemd
> versions, I suggest you first find out exactly what goes wrong under
> the newer systemd version. Exactly which dependency is wrong and
> shouldn't be there? Where does that dependency come from? A system
> where ordering dependencies form a cycle is not valid, so some
> dependency explicitly listed in your unit files or implicitly added by
> systemd must be wrong. After finding that out, you can then try to find
> out what differs under the older systemd if it's still relevant.
>
> In the above log, the most suspicious part is that it seems to say
> "asi-My-5101.socket" depends on "My-sshd.target". A socket unit almost
> certainly shouldn't have such dependencies, as normally a listening
> socket can be opened regardless of the state of the rest of the system
> (the main exception I can think of would be a UNIX socket at a
> filesystem path that requires mounting something, but normally you
> wouldn't do that...).
>
>
> > And what does the message "nss-lookup.target: Dependency
> Before=nss-lookup.target dropped" mean? I do not see it in systemd-210.
>
> Apparently the target had a dependency saying that it should be started
> before itself, and such a blatantly impossible dependency was ignored.
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to