Bug 1019415

Summary: nm-online returns success before DHCP completes, causing NFS mounts to fail on boot
Product: [Fedora] Fedora Reporter: Mike Chambers <mike>
Component: NetworkManagerAssignee: Dan Williams <dcbw>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: bugzilla, dcbw, dr.diesel, eblake, johannbg, jonathan, lnykryn, msekleta, ngaywood, phil_g, plautrba, rdieter, samuel-rhbugs, systemd-maint, tchollingsworth, tflink, vpavlin, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-10 19:36:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
my /var/log/messages file none

Description Mike Chambers 2013-10-15 16:37:17 UTC
Description of problem:During boot, the system tries to mount an nfs mount before networkmanager is configured.


Version-Release number of selected component (if applicable):


How reproducible:Everytime


Steps to Reproduce:
1. Install Fedora 20
2. Add NFS info to /etc/fstab
3. mount /nfs/share
4. systemctl enable NetworkManager-wait-online.service
5. reboot machine

Actual results:
mount fails to happen due to dependency error.


Expected results:
Should auto mount my nfs share on boot without intervention

Additional info:

Can manually mount my nfs share after boot via mount /home/download with no problems.  Will add my /var/log/messages file in a few after submission.

Comment 1 Mike Chambers 2013-10-15 17:03:40 UTC
Created attachment 812630 [details]
my /var/log/messages file

The system actually has auto mounted my nfs share *1* time, if you look at the boot sequence around the 11:38ish mark, you will see where it gets mounted, /home/download is the nfs directory.  It looks like on this one, NetworkManager got 100% configured 1st, then maybe it was able to mount with network running?

All other times before it or after it have failed, and nothing was done before or after (as far as changes or commands) to make a difference.  It seems on all the others, that NM isn't yet totally configured and therefore won't work?

Comment 2 T.C. Hollingsworth 2013-10-18 02:14:35 UTC
After some debugging on test.o [1] we figured out that /usr/bin/nm-online seems to be returning before DHCP is fully configured.  If you look at his logs, you'll notice that dhclient reports success after NetworkManager-wait-online.service successfully exits.

To make double-sure, I had him add a extra service Before=network.target [2] that just waits until it can successfully grep his IP address from ifconfig, and his nfs mounts started to work again.

Moving to NetworkManager since that ships NetworkManager-wait-online.service and /usr/bin/nm-online.

[1] https://lists.fedoraproject.org/pipermail/test/2013-October/118240.html
[2] https://lists.fedoraproject.org/pipermail/test/2013-October/118356.html

Comment 3 Jonathan Hoser 2013-12-20 08:57:57 UTC
Seconded! Thanks guys,
the bug-report (and mail-discussion) really saved my christmas!

(I changed my "Network Manager Wait Online" service description
from using nm-online - which will just tell about NetworkManager being started or not, to
ExecStart=/bin/bash -c "until ping -c1 [someIPonYourNetwork]; do sleep 1; continue; done"

I added the 'sleep 1' because otherwise, it's putting many 'network unreachable' into the startup logs... 
)

Comment 4 Steve 2013-12-21 15:06:05 UTC
NetworkManager-0.9.9.0-22.git20131003 (updates-testing) fixes the problem.

Comment 5 Mike Chambers 2013-12-21 17:42:48 UTC
(In reply to Steve from comment #4)

This does indeed fix the problem, and everything seems to work as normal.  Unless someone else has other issues with it, will close it if no issues.