Bug#794451: systemd openafs-client.service causes ordering cycles

2016-03-24 Thread Sergio Gelato
* Benjamin Kaduk [2016-03-23 22:14:18 -0400]:
> (bugs.debian.org does not show any reply from me on this bug, which is
> surprising since I thought I had replied when it came in ... my apologies
> if this is not so.)

Indeed I don't recall receiving any reply from you at the time, not even
a private one. Well, better late than never.

> I will have a look at the documentation on basic.target to see whether it
> pulls in anything that is needed by openafs.

openafs-client.service is already constrained to start after its obvious
prerequisites network-online.target and local-fs.target (for the cache).
Whatever else may be missing has to be part of either the base system or
an explicit dependency of package openafs-client or systemd, doesn't it?

The dependency of /etc/init.d/openafs-client on $time notwithstanding,
you don't want to add After=time-sync.target since ntp requires $remote_fs.
(Besides, afsd shouldn't really care about clock skew on startup, it only
begins to matter when obtaining tokens.)



Bug#794451: systemd openafs-client.service causes ordering cycles

2016-03-23 Thread Benjamin Kaduk
On Wed, 23 Mar 2016, Sergio Gelato wrote:

> This problem actually has an easy and natural solution: add
>
> [Unit]
> DefaultDependencies=no
>
> to openafs-client.service. My testing hasn't revealed any adverse side effects

Thanks for the suggestion.

(bugs.debian.org does not show any reply from me on this bug, which is
surprising since I thought I had replied when it came in ... my apologies
if this is not so.)

I will have a look at the documentation on basic.target to see whether it
pulls in anything that is needed by openafs.

-Ben



Bug#794451: systemd openafs-client.service causes ordering cycles

2016-03-23 Thread Sergio Gelato
This problem actually has an easy and natural solution: add

[Unit]
DefaultDependencies=no

to openafs-client.service. My testing hasn't revealed any adverse side effects
(but I don't claim to have good coverage of all the situations that can arise;
this fix might conceivably turn out to be incomplete).



Bug#794451: systemd openafs-client.service causes ordering cycles

2015-08-03 Thread Sergio Gelato
Package: openafs-client
Version: 1.6.13-1

/lib/systemd/system/openafs-client.service specifies
Before=remote-fs.target
It also has an implicit
Requires=basic.target
(at least on the jessie system on which I'm testing this; one can see this
with systemctl show -p Requires openafs-client.service ).

While the reverse dependency on remote-fs.target seems logical (the service
does provide access to a remote filesystem), it causes trouble in practice
since many scripts in /etc/init.d/ have a
Required-Start: $remote_fs
to signify that they need access to /usr (which, at least pre-systemd,
could be on a remote filesystem; this is explained, e.g., in
https://wiki.debian.org/LSBInitScripts/). sysinit.target depends on all
scripts in /etc/init.d/ that do not have a systemd counterpart, and
basic.target depends on sysinit.target.

I'm filing this bug against openafs-client but for my environment I'm
planning to work around the problem by changing $remote_fs to $local_fs
in the other /etc/init.d/ scripts involved. (One of them is /etc/init.d/ferm
and I do want my firewall rules to be in place before most services are
started.) I can do this since I'm not NFS-mounting /usr but it may not be
a satisfactory solution for everyone.

Maybe openafs-client.service should consider dropping Requires=basic.target .

To illustrate the problem, here is an excerpt from journalctl output that
shows an undesirable sequence of events:

systemd[1]: Found ordering cycle on basic.target/start
systemd[1]: Found dependency on sysinit.target/start
systemd[1]: Found dependency on ferm.service/start
systemd[1]: Found dependency on remote-fs.target/start
systemd[1]: Found dependency on openafs-client.service/start
systemd[1]: Found dependency on basic.target/start
systemd[1]: Breaking ordering cycle by deleting job ferm.service/start
systemd[1]: Job ferm.service/start deleted to break ordering cycle starting 
with basic.target/start
systemd[1]: Found ordering cycle on basic.target/start
systemd[1]: Found dependency on sysinit.target/start
systemd[1]: Found dependency on kbd.service/start
systemd[1]: Found dependency on remote-fs.target/start
systemd[1]: Found dependency on openafs-client.service/start
systemd[1]: Found dependency on basic.target/start
systemd[1]: Breaking ordering cycle by deleting job kbd.service/start
systemd[1]: Job kbd.service/start deleted to break ordering cycle starting with 
basic.target/start
systemd[1]: Found ordering cycle on basic.target/start
systemd[1]: Found dependency on sysinit.target/start
systemd[1]: Found dependency on console-setup.service/start
systemd[1]: Found dependency on remote-fs.target/start
systemd[1]: Found dependency on openafs-client.service/start
systemd[1]: Found dependency on basic.target/start
systemd[1]: Breaking ordering cycle by deleting job console-setup.service/start
systemd[1]: Job console-setup.service/start deleted to break ordering cycle 
starting with basic.target/start


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#794451: systemd openafs-client.service causes ordering cycles

2015-08-03 Thread Sergio Gelato
* Sergio Gelato [2015-08-03 09:53:12 +0200]:
 sysinit.target depends on all scripts in /etc/init.d/ that do not have a
 systemd counterpart

Actually the problem only affects those scripts which also have
# Default-Start: S


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org