[Bug 804544] New: libzypp: doesn't handle symlinks in export pathname on NFSv4 properly
https://bugzilla.novell.com/show_bug.cgi?id=804544 https://bugzilla.novell.com/show_bug.cgi?id=804544#c0 Summary: libzypp: doesn't handle symlinks in export pathname on NFSv4 properly Classification: openSUSE Product: openSUSE 12.3 Version: RC 1 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: libzypp AssignedTo: zypp-maintainers@forge.provo.novell.com ReportedBy: jeffm@suse.com QAContact: qa-bugs@suse.de Found By: Development Blocker: --- Created an attachment (id=525356) --> (http://bugzilla.novell.com/attachment.cgi?id=525356) zypper.log On my home server, I have a bunch of ISOs loop mounted under /data/tftpboot/images/<release>/<arch> I've bind-mounted /data as /nfs4/data for export. Also in /nfs4 is a symlink from 'tftpboot' to 'data/tftpboot' I have the same symlink in /, linking /tftpboot to /data/tftpboot. If I mount server:/tftpboot/opensuse12.3/x86_64 with NFSv3, it works as expected and I can access the image. If I mount it with NFSv4, it also works as expected and I can access the image. However, when I use that image as a zypper repository, it fails with: 2013-02-19 16:15:13 <1> sled1(31707) [zypp] MediaHandler.cc(checkAttached):604 Looking for media(nfs<192.168.1.254:/tftpboot/images/opensuse12.2/x86_64>)attached(*/var/adm/mount/AP_0xesP9Zs) 2013-02-19 16:15:13 <1> sled1(31707) [zypp++] MediaHandler.cc(checkAttached):611 MountEntries: { [...] 2013-02-19 16:15:13 <1> sled1(31707) [zypp++] MediaHandler.cc(checkAttached):611 192.168.1.254:/data/tftpboot/images/opensuse12.2/x86_64 on /var/adm/mount/AP_0xesP9Zs type nfs4 (ro,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,soft,proto=tcp,port=0,timeo=300,retrans=2,sec=sys,clientaddr=192.168.1.2,local_lock=none,addr=192.168.1.254) 2013-02-19 16:15:13 <1> sled1(31707) [zypp++] MediaHandler.cc(checkAttached):611 } 2013-02-19 16:15:13 <2> sled1(31707) [zypp] MediaHandler.cc(checkAttached):622 Attached media not in mount table ... I tracked it here: zypp/media/MediaHandler.cc:576 if( ref.mediaSource->equals( media) && ref.attachPoint->path == Pathname(e->dir)) It turns out that the NFSv4 client will mount the root of the NFSv4 export and then work its way up the path to do the final mount. Any symbolic links in the path will necessarily be expanded and reported as part of the mount. So rather than seeing: 192.168.1.254:/tftpboot/opensuse12.3/x86_64 I see: 192.168.1.254:/data/tftpboot/images/opensuse12.2/x86_64 .. and the ref.mediaSource->equals(media) call fails. I asked Neil Brown, one of our resident NFS experts, about this and he said that there's no easy way to resolve the pathname from the requested one to the used one other than manually mounting the NFSv4 root manually and doing the same pathname resolution. Even then, NFSv4 referrals may mean that the mount attempt was referred to a different server entirely and the server reported may differ from the one requested. I don't know the history of manually checking the result of the mount command after success, but with NFSv4 it may make sense to limit it to the file system type and mount point or to trust a successful mount command. Full zypper.log attached. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=804544
https://bugzilla.novell.com/show_bug.cgi?id=804544#c1
Jeff Mahoney
https://bugzilla.novell.com/show_bug.cgi?id=804544
https://bugzilla.novell.com/show_bug.cgi?id=804544#c2
--- Comment #2 from Jeff Mahoney
https://bugzilla.novell.com/show_bug.cgi?id=804544
https://bugzilla.novell.com/show_bug.cgi?id=804544#c3
--- Comment #3 from Jeff Mahoney
https://bugzilla.novell.com/show_bug.cgi?id=804544
https://bugzilla.novell.com/show_bug.cgi?id=804544#c
Jeff Mahoney
https://bugzilla.novell.com/show_bug.cgi?id=804544
https://bugzilla.novell.com/show_bug.cgi?id=804544#c4
Michael Andres
https://bugzilla.novell.com/show_bug.cgi?id=804544
https://bugzilla.novell.com/show_bug.cgi?id=804544#c5
Michael Andres
participants (1)
-
bugzilla_noreply@novell.com