[systemd-devel] network-online.target and manual mounts

Reindl Harald h.reindl at thelounge.net
Wed Jan 1 13:30:23 PST 2014



Am 01.01.2014 22:13, schrieb Andrey Borzenkov:
> В Ср, 01/01/2014 в 15:00 -0500, Dave Reisner пишет:
>> On Wed, Jan 01, 2014 at 11:43:15PM +0400, Andrey Borzenkov wrote:
>>> systemd.special(7) suggests that network-online.target should be pulled
>>> in by consumer. Unfortunately, that means that when booting without
>>> active consumer (let's say no NFS mounts in fstab) network-online.target
>>> is not started at all. If NFS is mounted manually later, no
>>> synchronization point exists on shutdown, so network may be stopped
>>> before NFS is unmounted. This leads to prolonged timeout.
>>>
>>> Is there any mechanism to start it when NFS (or other network) mount
>>> appears? The very existence of network mount could be considered as
>>> indication that network *is* online?
>>
>> I think tihs is a post-v208 change, but if you manually mount a network
>> share manually after booting, network-online.target is pulled in as
>> Wants= and After=. This should make for correct ordering on shutdown.
>>
>> # mount.cifs //10.0.2.1/pkgs pkg -o defaults,guest,rw
>> # systemctl show -p After -p Wants $PWD/pkg
>> Wants=network-online.target system.slice
>> After=systemd-journald.socket remote-fs-pre.target network.target network-online.target system.slice -.mount
>>
> 
> Yes, units automatically created from existing mounts do get Wants, but
> as they are never activated via systemd, these Wants lines never gets
> executed.
> 
> Check "systemctl status network-online.target"

true and maybe the reason for

https://bugzilla.redhat.com/show_bug.cgi?id=1023788
https://bugzilla.redhat.com/show_bug.cgi?id=891137

https://bugzilla.redhat.com/show_bug.cgi?id=1023788 is clearly introduced by systemd at F20/RHEL7
and leads to completly frozen terminals while rebooting a F20/RHEL7 remote machine using
network.service because NM on a static config is useless

[root at srv-rhsoft:~]$ systemctl status network-online.target
network-online.target - Network is Online
   Loaded: loaded (/usr/lib/systemd/system/network-online.target; static)
   Active: inactive (dead)
     Docs: man:systemd.special(7)
           http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget

[root at srv-rhsoft:~]$ systemctl start network-online.target
[root at srv-rhsoft:~]$ systemctl status network-online.target
network-online.target - Network is Online
   Loaded: loaded (/usr/lib/systemd/system/network-online.target; static)
   Active: active since Mi 2014-01-01 22:24:25 CET; 1s ago
     Docs: man:systemd.special(7)
           http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140101/a8812e1d/attachment.pgp>


More information about the systemd-devel mailing list