Re: Fedora 20 nfs

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

 



On Mon, Oct 14, 2013 at 8:56 AM, Mike Chambers <mike@xxxxxxxxxxxxxx> wrote:
> Ok, think I've figured out the problem, but might be beyond my expertise
> to fix it..
>
> 1 - Network Manager is set to come online/start
> 2 - Network Manger wait-online shows in log as well here.
> 3 - Network Manger device itself shows up (as in I guess drivers and
> assigned what name it is called, p5p1 is my wired ethernet).
> 4 - Systemd tries here to mount the remote nfs directory, which fails
> 5 - Network Manger actually configures itself, via dhcp, to get it's
> network settings, such as IP, dns, etc..
>
> So it seems, via /var/log/messages that nfs is trying to get mounted
> BEFORE the network is completely configured.

There are several possibilities here:

1.) DHCP on your network is sloooow and NetworkManager-wait-online is
timing out after the default 30s waiting for it.

2.) NetworkManager-wait-online is just stupid and doesn't wait for
DHCP to complete.

3.) NM-wait-online is working fine, but systemd isn't waiting for it
for some reason.

I believe something in the logs would indicate if it's 1.  If that's
the case, you can increase the timeout by copying
/usr/lib/systemd/system/NetworkManager-wait-online.service to
/etc/systemd/system/ (so rpm doesn't overwrite your changes on
updates) and increasing the `-t` argument to `nm-online` in that file.

If it's 2, file a bug against NetworkManager, which ships the
`nm-online` program that is being stupid.  :-p  If it's 3, systemd
obviously deserves the bug.

> So no idea which one is wrong, either mounting gets done alot later
> (guess I could add to rc.local again like used to until fixed?), or NM
> needs to be configured a lot earlier.

Well, lets try a more systemd-esque hack that will also identify
whether the problem is 2 or 3 as described above.  Drop something like
this in /etc/systemd/system/really-wait-online.service:
--
[Unit]
Description=Really wait for the damn network
Requisite=NetworkManager.service
After=NetworkManager.service
Wants=network.target
Before=network.target network-online.target

[Service]
Type=oneshot
ExecStart=/bin/bash -c 'until ifconfig p5p1 | grep '192.\168'; do
continue; done'
TimeoutSec=120

[Install]
WantedBy=multi-user.target
--

Remember to adjust the network interface and grep string to something
that makes sense for your network, and run `systemctl daemon-reload &&
systemctl enable really-wait-online.service` to enable it when you're
done. (And if you're aware of a better method for figuring out DHCP is
done than grepping the output of `ifconfig`, feel free to use it.  ;-)

If mounting works after that, NM-wait-online is really the culprit and
NetworkManager deserves the bug.  If mounting still fails, systemd is
not ordering things right and deserves the bug.

And if systemd is to blame, fix your system nao by explicitly ordering
your little wait-online service before the mount unit (e.g.
mnt-foo.mount) discussed upthread.  Just add said mount unit to the
end of the Before line in that file.

-T.C.
-- 
test mailing list
test@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe:
https://admin.fedoraproject.org/mailman/listinfo/test





[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]

  Powered by Linux