Re: [SPAM]Re: Mount units with After=autofs.service cause ordering cycles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/31/19 1:08 PM, Lennart Poettering wrote:
On Mo, 14.10.19 16:23, John Florian (john@xxxxxxxxxxxxx) wrote:

So, I much prefer the expressiveness of systemd's mount units to the naive
era of /etc/fstab, but I've found one situation where I seem to always get
stuck and am never able to find a reliable solution that survives OS (Fedora
& CentOS) updates.  I have a NFS filesystem mounted by autofs at /pub that
needs to be bind mounted in various places such as /var/www/pub and
/var/ftp/pub. So I create a unit that looks like:

~~~

# /etc/systemd/system/var-www-pub.mount
[Unit]
Description=mount /pub served via httpd
Requires=autofs.service
After=autofs.service

[Mount]
What=/mnt/pub
Where=/var/www/pub
Options=bind,context=system_u:object_r:httpd_sys_content_t

[Install]
WantedBy=multi-user.target

~~~

The above worked for a long time, but once again a `dnf upgrade` seems to
have broken things because now I have a ordering cycle that systemd must
break.  Since I haven't changed my mount units, my ability to mesh with
those shipped by the OS proves fragile. I'm deliberately avoiding too much
detail here because it would seem that there should be a relatively simple
solution to this general sort of task -- I just can't seem to discover it.
Any recommendations that don't involve an entirely different approach?
What precisely is the ordering cycle you are seeing? It's usually
dumped along with the log message.

systemd[1]: local-fs.target: Found ordering cycle on var-www-pub.mount/start
systemd[1]: local-fs.target: Found dependency on autofs.service/start
systemd[1]: local-fs.target: Found dependency on rpc-statd.service/start
systemd[1]: local-fs.target: Found dependency on network-online.target/start
systemd[1]: local-fs.target: Found dependency on network.target/start
systemd[1]: local-fs.target: Found dependency on NetworkManager.service/start
systemd[1]: local-fs.target: Found dependency on sysinit.target/start
systemd[1]: local-fs.target: Found dependency on systemd-update-done.service/start
systemd[1]: local-fs.target: Found dependency on local-fs.target/start
systemd[1]: local-fs.target: Job var-www-pub.mount/start deleted to break ordering cycle starting with local-fs.target/start

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux