Re: [systemd-devel] Why don't remote file systems wait for network-online.target?
Hey Andrei, Andrei Borzenkov [2015-03-10 15:12 +0300]: > Dependency on network-online.target is supposed to be implicitly added > (oh, those implicit undocumented dependencies ...) > > src/core/mount.c:mount_add_default_dependencies() Ah, thanks for pointing out. Indeed, I was confused by them not being in the generated /run/systemd/generator/mnt-server.mount, but systemctl show indeed does show them. So it's all clear now, they do wait on network-online.target, this is just a no-op right now because NetworkManager-wait-online.service isn't activated. Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Why don't remote file systems wait for network-online.target?
2015-03-10 14:18 GMT+01:00 Michael Biebl : > Could you share the relevant /etc/fstab line? Nvm, I noticed that this info has been added to the relevant bug report. After adding the line to /etc/fstab and running systemctl daemon-reload, I get # systemctl show -p Wants -p After mnt-server.mount Wants=system.slice network-online.target After=network.target -.mount network-online.target system.slice remote-fs-pre.target systemd-journald.socket -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Why don't remote file systems wait for network-online.target?
2015-03-10 12:40 GMT+01:00 Martin Pitt : > Hello all, > > we got a report [1] that NFS fstab mounts (sometimes) aren't being > mounted at boot as the network is still down: > > | mount[866]: mount.nfs: Network is unreachable > | systemd[1]: mnt-server.mount mount process exited, code=exited status=32 > | systemd[1]: Failed to mount /mnt/server. > | systemd[1]: Dependency failed for Remote File Systems. > | systemd[1]: Job remote-fs.target/start failed with result 'dependency'. > | systemd[1]: Unit mnt-server.mount entered failed state. > > At the moment, neither network-fs-pre.target has no dependencies at > all, and the fstab-generator-created .mount units only have > "Before=remote-fs.target" and no other dependencies. > > Wouldn't it make sense to make network-fs-pre.target > Wants/After=network-online to fix this? If you have/rely on NFS > mounts, then you usually have some static/always working network > connection via networkd/auto-connection in NM/ifupdown/etc, which all > integrate into network-online.target. Could you share the relevant /etc/fstab line? -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Why don't remote file systems wait for network-online.target?
В Tue, 10 Mar 2015 12:40:40 +0100 Martin Pitt пишет: > Hello all, > > we got a report [1] that NFS fstab mounts (sometimes) aren't being > mounted at boot as the network is still down: > > | mount[866]: mount.nfs: Network is unreachable > | systemd[1]: mnt-server.mount mount process exited, code=exited status=32 > | systemd[1]: Failed to mount /mnt/server. > | systemd[1]: Dependency failed for Remote File Systems. > | systemd[1]: Job remote-fs.target/start failed with result 'dependency'. > | systemd[1]: Unit mnt-server.mount entered failed state. > > At the moment, neither network-fs-pre.target has no dependencies at > all, and the fstab-generator-created .mount units only have > "Before=remote-fs.target" and no other dependencies. > Dependency on network-online.target is supposed to be implicitly added (oh, those implicit undocumented dependencies ...) src/core/mount.c:mount_add_default_dependencies() ... if (mount_is_network(p)) { after = SPECIAL_REMOTE_FS_PRE_TARGET; after2 = SPECIAL_NETWORK_TARGET; online = SPECIAL_NETWORK_ONLINE_TARGET; ... if (online) { r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_WANTS, UNIT_AFTER, online, NULL, true); If it does not happen, either default dependencies are not applied or systemd does not consider those filesystems network. > Wouldn't it make sense to make network-fs-pre.target > Wants/After=network-online to fix this? If you have/rely on NFS > mounts, then you usually have some static/always working network > connection via networkd/auto-connection in NM/ifupdown/etc, which all > integrate into network-online.target. > > Thanks, > > Martin > > [1] https://launchpad.net/bugs/1429975 > ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Why don't remote file systems wait for network-online.target?
Am 2015-03-10 12:40, schrieb Martin Pitt: we got a report [1] that NFS fstab mounts (sometimes) aren't being mounted at boot as the network is still down: | mount[866]: mount.nfs: Network is unreachable | systemd[1]: mnt-server.mount mount process exited, code=exited status=32 | systemd[1]: Failed to mount /mnt/server. | systemd[1]: Dependency failed for Remote File Systems. | systemd[1]: Job remote-fs.target/start failed with result 'dependency'. | systemd[1]: Unit mnt-server.mount entered failed state. At the moment, neither network-fs-pre.target has no dependencies at all, and the fstab-generator-created .mount units only have "Before=remote-fs.target" and no other dependencies. I can't reproduce that under Debian Jessie with systemd-215. Individual NFS mounts (mnt-server.mount in your case) are ordered like this here: After=systemd-journald.socket remote-fs-pre.target network.target network-online.target system.slice -.mount Wants=network-online.target system.slice This is part of mount unit's DefaultDependencies, see: http://cgit.freedesktop.org/systemd/systemd/tree/src/core/mount.c#n366 (mount_is_network checks for fstype or _netdev; and nfs is in the list of filesystems considered network.) Christian ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel