http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c0
Summary: nfs4 mounts from script don't always work Classification: openSUSE Product: openSUSE 11.2 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Network AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: jnelson-suse@jamponi.net QAContact: qa@suse.de Found By: --- Blocker: ---
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091103 SUSE/3.5.5-1.1.2 Firefox/3.5.5
Very odd: I have some NFS mounts which take place in /etc/sysconfig/network/ifservices-eth0 so that when eth0 comes up, the script determines which network it is in and (if appropriate) NFS mounts some directories.
This worked great in openSUSE 10.X and 11.0, 11.1 but does not work in 11.2
It gets weirder. I set the script up so that it logs every statement via logger, and the mount commands are succeeding. And nfs "stuff" of some sort is happening, but for some reason I don't end up with any mounts.
For example:
From /var/log/messages:
Nov 28 15:17:06 worklaptop ifup-services: + mount -t nfs4 -o soft,noacl,timeo=200 192.168.2.1:/multimedia /multimedia Nov 28 15:17:06 worklaptop ifup-services: + mount -t nfs4 -o soft,noacl,timeo=200 192.168.2.1:/isos /isos Nov 28 15:17:06 worklaptop ifup-services: + exit 0 Nov 28 15:17:06 worklaptop rpc.idmapd[3178]: Stale client: 81 Nov 28 15:17:06 worklaptop rpc.idmapd[3178]: -> closed /var/lib/nfs/rpc_pipefs/nfs/clnt81/idmap Nov 28 15:17:06 worklaptop rpc.idmapd[3178]: Stale client: 7d Nov 28 15:17:06 worklaptop rpc.idmapd[3178]: -> closed /var/lib/nfs/rpc_pipefs/nfs/clnt7d/idmap Nov 28 15:17:06 worklaptop rpc.idmapd[3178]: Stale client: 7f Nov 28 15:17:06 worklaptop rpc.idmapd[3178]: -> closed /var/lib/nfs/rpc_pipefs/nfs/clnt7f/idmap Nov 28 15:17:06 worklaptop rpcbind: connect from 127.0.0.1 to unset(1073741824) Nov 28 15:17:06 worklaptop sm-notify[3770]: Already notifying clients; Exiting! Nov 28 15:17:06 worklaptop rpc.idmapd[3776]: libnfsidmap: using domain: localdomain Nov 28 15:17:06 worklaptop rpc.idmapd[3776]: libnfsidmap: loaded plugin libnfsidmap_nsswitch.so for method nsswitch Nov 28 15:17:06 worklaptop rpc.idmapd[3777]: Expiration time is 600 seconds. Nov 28 15:17:06 worklaptop rpc.idmapd[3777]: nfsdopenone: Opening /proc/net/rpc/nfs4.nametoid/channel failed: errno 2 (No such file or directory)
If I issue the mount commands from the commandline, they work fine. I even put an strace in the script and the mount *syscall* works:
31014 14:44:42.661157 mount("192.168.2.1:/multimedia", "/multimedia", "nfs4", 0, "soft,noacl,timeo=200,clientaddr="...) = 0 <0.186784>
and it even writes it into /etc/mtab:
31014 14:44:42.851267 open("/etc/mtab", O_RDWR|O_CREAT|O_APPEND, 0666) = 5 <0.000029> 31014 14:44:42.851372 umask(022) = 077 <0.000018> 31014 14:44:42.851468 fstat(5, {st_mode=S_IFREG|0644, st_size=1144, ...}) = 0 <0.000020> 31014 14:44:42.851605 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9de6d44000 <0.000025> 31014 14:44:42.851696 fstat(5, {st_mode=S_IFREG|0644, st_size=1144, ...}) = 0 <0.000019> 31014 14:44:42.851822 lseek(5, 0, SEEK_SET) = 0 <0.000019> 31014 14:44:42.851900 read(5, "/dev/mapper/system-root / jfs rw"..., 1144) = 1144 <0.000031> 31014 14:44:42.852061 write(5, "192.168.2.1:/multimedia /multime"..., 110) = 110 <0.000232> 31014 14:44:42.852374 close(5) = 0 <0.000030> 31014 14:44:42.852467 munmap(0x7f9de6d44000, 4096) = 0 <0.000039> 31014 14:44:42.852567 close(4) = 0 <0.000031> 31014 14:44:42.852657 unlink("/etc/mtab~") = 0 <0.000103> 31014 14:44:42.852844 exit_group(0) = ?
Eventually, I discovered that the /etc/NetworkManager/dispatcher.d/nfs script was interfering with this script. Disabling nfs (chkconfig --del nfs) lets OTHER scripts that use NFS not run into weird problems.
I haven't a clue how to fix this.
Reproducible: Always
Steps to Reproduce: 1. 2. 3.
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c
shuang qiu sqiu@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sqiu@novell.com AssignedTo|bnc-team-screening@forge.pr |nfbrown@novell.com |ovo.novell.com |
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c1
Neil Brown nfbrown@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |jnelson-suse@jamponi.net
--- Comment #1 from Neil Brown nfbrown@novell.com 2009-12-08 06:53:51 UTC --- The error message:
rpc.idmapd[3777]: nfsdopenone: Opening /proc/net/rpc/nfs4.nametoid/channel failed: errno 2 (No such file or directory)
seems significant. The only way that file can not exit is if the sunrpc module hasn't been loaded. If you put "modprobe sunrpc" at the top of your ifservices-eth0 script, does it make a difference?
Maybe you need NFS_START_SERVICES=yes in /etc/sysconfig/nfs ??
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c2
Jon Nelson jnelson-suse@jamponi.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|jnelson-suse@jamponi.net |
--- Comment #2 from Jon Nelson jnelson-suse@jamponi.net 2009-12-08 13:03:50 UTC --- I have/had/still have NFS_START_SERVICES=yes in /etc/sysconfig/nfs. I'll check out the sunrpc thing. That explains the weird UID/GID behavior I'm seeing (not part of this report).
However, the core issue of this bug is the fact that the NFS control is insufficiently granular:
the /etc/NetworkManager/dispatcher.d/nfs is intended to mount (and unmount) nfs/nfs4 filesystems when a connection has been established or lost. It runs when /etc/fstab has the right stuff in it, or always if NFS_START_SERVICES is yes. The problem occurs when one mounts nfs filesystems manually and then loses a connection (or gains one) - the script then runs, unmounts all of the filesystems, and since there aren't any in /etc/fstab they are gone.
In my specific case, a script that is part of the ifservices setup runs, determines which network it is in, and *then* mounts or unmounts some filesystems (and starts or stops some other things) based entirely on which network it is able to determine the connection is in. After upgrading to 11.2, I noticed that didn't work any more and my investigation showed me that it was actually working, but the NFS filesystems were being unmounted right after that by the networkmanager script (the script issues "nfs restart").
Ultimately, I had to disable the network manager script. I will re-enable the nfs init script so that my uids resolve properly, thus the NFS_START_SERVICES stuff will work the way it is intended.
At this point, I'm not really sure what to do - the network manager script interferes with the rest of the system (the ifservices stuff), and seems like it is a little naieve (spelling..)
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c3
--- Comment #3 from Jon Nelson jnelson-suse@jamponi.net 2009-12-08 13:05:58 UTC --- Indeed. I just re-enabled nfs (chkconfig --add nfs), unplugged my network cable and plugged it back in and my NFS filesystems continue to mount and unmount *properly*, *and* I have my UIDs back. THANK YOU.
NOTE: the only way this continues to work is if I disable the /etc/NetworkManager/dispatcher.d/nfs script (chmod ugo-x ....) otherwise it fights with my ifservices script.
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c4
Neil Brown nfbrown@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nfbrown@novell.com AssignedTo|nfbrown@novell.com |mls@novell.com
--- Comment #4 from Neil Brown nfbrown@novell.com 2009-12-15 04:34:12 UTC --- Thanks for the more detailed explanation.
I think it is inappropriate for the NetworkManager 'nfs' script to be calling '/etc/init.d/nfs restart' in the 'up' case. As you say, that can easily unmount filesystems that should be left mounted.
I think that the best option would probably be to make the 'up' case be simply mount -at nfs,nfs4
That would be pleasingly symmetric with the 'down' case, and should be sufficient without any negative side effects.
So: reassigning the the registered maintainer of NetworkManager (I hope...)
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c
yang xiaoyu xyyang@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xyyang@novell.com AssignedTo|bnc-team-screening@forge.pr |bnc-team-gnome@forge.provo. |ovo.novell.com |novell.com
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c7
Jon Nelson jnelson-suse@jamponi.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|Network |Network AssignedTo|bnc-team-gnome@forge.provo. |bnc-team-screening@forge.pr |novell.com |ovo.novell.com Product|openSUSE 11.2 |openSUSE 11.3
--- Comment #7 from Jon Nelson jnelson-suse@jamponi.net 2010-07-12 15:01:30 UTC --- ping!
Just upgraded to 11.3 and the problem persists ( /etc/init.d/nfs restart called from /etc/NetworkManager/dispatcher.d/nfs )
I've modified /etc/NetworkManager/dispatcher.d/nfs to use
/bin/mount -alt nfs,nfs4
instead of
/etc/init.d/nfs restart
and it works again.
HOWEVER: please fix.
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c
yang xiaoyu xyyang@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |bili@novell.com |ovo.novell.com |
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c
Li Bin bili@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c
Jon Nelson jnelson-suse@jamponi.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|nfs4 mounts from script |networkmanager nfs script |don't always work |should *not* issue rcnfs | |restart
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c8
Li Bin bili@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fjkong@novell.com AssignedTo|bili@novell.com |fjkong@novell.com
--- Comment #8 from Li Bin bili@novell.com 2010-07-21 10:18:42 UTC --- FanJun,
Could take care of this issue?
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c9
fanjun kong fjkong@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO InfoProvider| |jnelson-suse@jamponi.net
--- Comment #9 from fanjun kong fjkong@novell.com 2010-07-22 09:38:13 UTC --- Hi Jon Nelson
#cat /etc/fstab | tail 147.2.207.240:/repo_a /lab_a nfs defaults 0 0
#mount -a #df -kh ... 147.2.207.240:/repo_a 826G 718G 66G 92% /lab_a #umount /lab_a
#NetworkManager --no-daemon #df -kh ... 147.2.207.240:/repo_a 826G 718G 66G 92% /lab_a
so please supply more information on how to reproduce this bug. Thanks :)
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c10
Jon Nelson jnelson-suse@jamponi.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED InfoProvider|jnelson-suse@jamponi.net |
--- Comment #10 from Jon Nelson jnelson-suse@jamponi.net 2010-07-22 12:47:30 UTC --- NOTE: /bin/umount -alt nfs,nfs4 is actually still insufficiently granular, as it still unmounts all (nfs,nfs4) filesystems regardless of how they were mounted (/etc/fstab or manually).
Ideally this would work:
/bin/umount -alt nfs,nfs4 -O auto
but, much to my surprise, filesystems listed in /etc/fstab that do not have noauto do not implicitly get an 'auto' option. Sigh. THis, too, is wrong (IMO).
The procedure I *was* going to use is the following, but it doesn't work.
0. have NFS_START_SERVICES="yes" in /etc/sysconfig/nfs
1. Have nothing in /etc/fstab for NFS
2. Run /etc/init.d/nfs start (to prepare for step 3)
3. *manually* mount an NFS filesystem
4. Using network manager (nm-applet, knetworkmanager, whatever) force a new connection.
Observe:
the manually mounted filesystem is no longer mounted
Now, make the change Neil Brown and I suggest above, which is in Comment #7, and repeat steps 3 and 4.
Observe:
The filesystem remains mounted.
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c11
Li Bin bili@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO CC| |bili@novell.com InfoProvider| |maintenance@opensuse.org
--- Comment #11 from Li Bin bili@novell.com 2010-07-23 05:21:01 UTC --- Got it, we should let it in updates.
Maintenance,
Could we let it in 11.3 updates?
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c12
--- Comment #12 from Li Bin bili@novell.com 2010-07-23 05:35:20 UTC --- And I submitted it into the Factory. The request id is 43783.
43783 State:new By:BinLi When:2010-07-23T07:34:01 submit: home:BinLi:branches:GNOME:Factory/NetworkManager -> GNOME:Factory Descr: nfs script should not use nfs restart(bnc#559021)
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c13
--- Comment #13 from Vincent Untz vuntz@novell.com 2010-07-23 06:24:39 UTC --- (In reply to comment #12)
And I submitted it into the Factory. The request id is 43783.
43783 State:new By:BinLi When:2010-07-23T07:34:01 submit: home:BinLi:branches:GNOME:Factory/NetworkManager -> GNOME:Factory Descr: nfs script should not use nfs restart(bnc#559021)
Could you submit your changes to home:dimstar:NetworkManager-0.8.1: Dominique has been packaging the 0.8.1 branch of NM, and will submit the packages soon.
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c14
--- Comment #14 from Li Bin bili@novell.com 2010-07-23 08:16:34 UTC --- Vincent, Done, thanks!
43810 State:new By:BinLi When:2010-07-23T10:14:51 submit: home:BinLi:branches:home:dimstar:NetworkManager-0.8.1/NetworkManager -> home:dimstar:NetworkManager-0.8.1 Descr: nfs script should not use nfs restart(bnc#559021).
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c15
--- Comment #15 from Jon Nelson jnelson-suse@jamponi.net 2010-07-25 18:25:08 UTC --- Is "NEEDINFO" the right status for this? If I might ask, what is the timeframe for this bug?
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c16
--- Comment #16 from Marcus Meissner meissner@novell.com 2010-07-26 07:32:29 UTC --- yes, needinfo to maintenance@opensuse.org is the right state.
I think there is a networkmanager update for 11.3 in the queue already? then add it there please
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c17
Christian Dengler cdengler@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED CC| |cdengler@novell.com InfoProvider|maintenance@opensuse.org |
--- Comment #17 from Christian Dengler cdengler@novell.com 2010-07-26 15:59:01 UTC --- Update started. There was only a NetworkManager-novellvpn in the queue for 11.3 ;-)
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c18
Swamp Workflow Management swamp@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard| |maint:running:34788:low
--- Comment #18 from Swamp Workflow Management swamp@suse.com 2010-07-26 15:59:07 UTC --- The SWAMPID for this issue is 34788. This issue was rated as low. Please submit fixed packages until 2010-08-23. Also create a patchinfo file using this link: https://swamp.suse.de/webswamp/wf/34788
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c19
--- Comment #19 from Christian Dengler cdengler@novell.com 2010-08-12 12:40:11 UTC --- Be so kind and submit a missing patchinfo and the fixed sources.
http://bugzilla.novell.com/show_bug.cgi?id=559021
http://bugzilla.novell.com/show_bug.cgi?id=559021#c20
fanjun kong fjkong@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED
--- Comment #20 from fanjun kong fjkong@novell.com 2010-08-13 07:19:43 UTC --- 45535 State:new By:fjkong When:2010-08-13T09:18:24 submit: home:fjkong:branches:openSUSE:11.3:Update:Test/NetworkManager -> openSUSE:11.3:Update:Test Descr: nfs script should not use nfs restart(bnc#559021, swampid#34788).
https://bugzilla.novell.com/show_bug.cgi?id=559021
https://bugzilla.novell.com/show_bug.cgi?id=559021#c21
Swamp Workflow Management swamp@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard|maint:running:34788:low |maint:running:34788:low | |maint:released:11.3:35153
--- Comment #21 from Swamp Workflow Management swamp@suse.com 2010-08-23 11:41:54 UTC --- Update released for: NetworkManager, NetworkManager-debuginfo, NetworkManager-debugsource, NetworkManager-devel, NetworkManager-doc, NetworkManager-glib, NetworkManager-glib-debuginfo Products: openSUSE 11.3 (debug, i586, x86_64)
https://bugzilla.novell.com/show_bug.cgi?id=559021
https://bugzilla.novell.com/show_bug.cgi?id=559021#c
Swamp Workflow Management swamp@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard|maint:running:34788:low |. |maint:released:11.3:35153 |
http://bugzilla.novell.com/show_bug.cgi?id=559021 http://bugzilla.novell.com/show_bug.cgi?id=559021#c22
--- Comment #22 from Bernhard Wiedemann bwiedemann@suse.com --- This is an autogenerated message for OBS integration: This bug (559021) was mentioned in https://build.opensuse.org/request/show/45535 11.3:Test / NetworkManager