You are not logged in.

#1 2014-07-08 19:34:01

branch
Member
Registered: 2014-03-16
Posts: 209

[Solved] nfs-client.target and nfs-server.service dependency loop

Does anybody else get a systemd dependency loop when both nfs-client.target and nfs-server.service are enabled? Using nfs-utils-1.3.0-3 (the latest). This causes the following in the boot journal:

Jul 07 10:13:45 fortuna systemd[1]: Found ordering cycle on rpc-statd-notify.service/start
Jul 07 10:13:45 fortuna systemd[1]: Found dependency on nfs-server.service/start
Jul 07 10:13:45 fortuna systemd[1]: Found dependency on rpc-gssd.service/start
Jul 07 10:13:45 fortuna systemd[1]: Found dependency on nfs-client.target/start
Jul 07 10:13:45 fortuna systemd[1]: Found dependency on rpc-statd-notify.service/start
Jul 07 10:13:45 fortuna systemd[1]: Breaking ordering cycle by deleting job nfs-server.service/start

And, of course, the nfs-server processes are not started.

Last edited by branch (2014-07-08 22:33:58)

Offline

#2 2014-07-08 20:10:24

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [Solved] nfs-client.target and nfs-server.service dependency loop

It's not even necessary to enable them. I tried just starting both and all hell broke loose.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2014-07-08 20:37:40

branch
Member
Registered: 2014-03-16
Posts: 209

Re: [Solved] nfs-client.target and nfs-server.service dependency loop

Thanks for the confirmation. I am guessing the problem is the "After" implied by this "Wants" line in nfs-client.target

Wants=nfs-blkmap.service rpc-statd-notify.service

We may need

DefaultDependencies=False

in this file to remove the implied "After".

Does anybody know whether this would be a bug in upstream or the package?

Offline

#4 2014-07-08 20:51:21

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [Solved] nfs-client.target and nfs-server.service dependency loop

Based on my understanding from systemd.unit(5) it doesn't seem like things in Wants should have any effect on the outcome. But nfs-server.service has rpc-statd-notify.service in Before, and if Wants implies After I guess that could be the cause of the problem.

Edit: The aforementioned hell (post #2) only occurs when I run

systemctl start nfs-client.target nfs-server.service

Starting the two separately works fine:

systemctl start nfs-client.target
systemctl start nfs-server.service

Last edited by alphaniner (2014-07-08 20:54:52)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#5 2014-07-08 21:05:41

branch
Member
Registered: 2014-03-16
Posts: 209

Re: [Solved] nfs-client.target and nfs-server.service dependency loop

Thanks for the info. Yes, it makes sense that it would work starting them seperately since the dependencies in question are optional (Wants not Requires). With regards to the effect of "Wants", the systemd.target(5) man page states:

Unless DefaultDependencies= is set to false, target units will implicitly complement all configured dependencies of
type Wants=, Requires=, RequiresOverridable= with dependencies of type After= if the units in question also have
DefaultDependencies=true.

I assume this behaviour is so that "Wants=" in the .target file is equivalent to a sym link in the .target.wants subdirectory.

Offline

#6 2014-07-08 22:33:41

branch
Member
Registered: 2014-03-16
Posts: 209

Re: [Solved] nfs-client.target and nfs-server.service dependency loop

Installing the following file followed by "systemctl daemon-reload" seems to fix the issue.

# /etc/systemd/system/nfs-client.target.d/DefaultDependenciesFalse.conf

[Unit]
DefaultDependencies=False

Bug has been filed here https://bugs.archlinux.org/task/41137.
Will mark thread solved.

[edit: fix bug url]

Last edited by branch (2014-07-09 02:18:22)

Offline

Board footer

Powered by FluxBB