Bug 909882 - update breaks NFSv4 exports
Summary: update breaks NFSv4 exports
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: nfs-utils
Version: 18
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-11 11:44 UTC by David Waring
Modified: 2014-02-05 23:23 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-05 23:23:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
/etc/exports contents (125 bytes, application/octet-stream)
2013-02-11 11:44 UTC, David Waring
no flags Details
/etc/fstab to show binds for nfs4export (1.13 KB, application/octet-stream)
2013-02-11 11:46 UTC, David Waring
no flags Details

Description David Waring 2013-02-11 11:44:23 UTC
Created attachment 696038 [details]
/etc/exports contents

Description of problem:

After upgrading from nfs-utils-1.2.6 to nfs-utils-1.2.7 clients could no longer see all mount points from the server. The root NFSv4 mount point is one of the exported filesystems (not the one designated by fsid=0 in /etc/exports) and other mount points do not work.

Note: this sounds like the same issue Peter had during testing of the package.


Version-Release number of selected component (if applicable):
nfs-utils-1.2.7-3.fc18.x86_64


How reproducible:
Always


Steps to Reproduce:
1. Update to nfs-utils-1.2.7-3.fc18.x86_64 on server
2. Reboot server or just restart nfs-server.service
3. Trying to mount known mount point on client fails
4. Mounting server:/ shows wrong filesystem from server (shows /nfs4exports/alldata/data/ftp_mp3_root filesystem).
  

Actual results:
Mount points fail (e.g. server:/alldata) or show wrong filesystem on client (root mount, server:/, shows /nfs4exports/alldata/data/ftp_mp3_root filesystem).
Downgrade to nfs-utils-1.2.6 fixes problem.


Expected results:
Root mount should show other exported mount point(s) (e.g. alldata directory).
Exported mount points should be mountable (i.e. server:/alldata and server:/alldata/data/ftp_mp3_root).


Additional info:
One mount point is automount via systemd (see fstab).

Comment 1 David Waring 2013-02-11 11:46:04 UTC
Created attachment 696039 [details]
/etc/fstab to show binds for nfs4export

Comment 2 Enrico Scholz 2013-03-18 11:09:46 UTC
ditto here with nfs-utils-1:1.2.7-3.fc18; downgrade to nfs-utils-1:1.2.6-14.fc18 fixes the problem

Comment 3 Steve Dickson 2013-03-23 13:05:14 UTC
(In reply to comment #0)
> Created attachment 696038 [details]
> /etc/exports contents
> 
> Description of problem:
> 
> After upgrading from nfs-utils-1.2.6 to nfs-utils-1.2.7 clients could no
> longer see all mount points from the server. The root NFSv4 mount point is
> one of the exported filesystems (not the one designated by fsid=0 in
> /etc/exports) and other mount points do not work.
> 
> Note: this sounds like the same issue Peter had during testing of the
> package.
> 
> 
> Version-Release number of selected component (if applicable):
> nfs-utils-1.2.7-3.fc18.x86_64
> 
> 
> How reproducible:
> Always
> 
> 
> Steps to Reproduce:
> 1. Update to nfs-utils-1.2.7-3.fc18.x86_64 on server
> 2. Reboot server or just restart nfs-server.service
> 3. Trying to mount known mount point on client fails
> 4. Mounting server:/ shows wrong filesystem from server (shows
> /nfs4exports/alldata/data/ftp_mp3_root filesystem).
>   
> 
> Actual results:
> Mount points fail (e.g. server:/alldata) or show wrong filesystem on client
> (root mount, server:/, shows /nfs4exports/alldata/data/ftp_mp3_root
> filesystem).
What is the failure message?

> Expected results:
> Root mount should show other exported mount point(s) (e.g. alldata
> directory).
> Exported mount points should be mountable (i.e. server:/alldata and
> server:/alldata/data/ftp_mp3_root).
/nfs4export				*(rw,fsid=0,crossmnt)
/nfs4export/alldata			*(rw,crossmnt)
/nfs4export/alldata/data/ftp_mp3_root	*(rw,nohide)
just to be clear.... /nfs4export is a different filesystem than /nfs4export/alldata

and /nfs4export/alldata is a different filesystem as /nfs4export/alldata/data/ftp_mp3_root


> 
> Additional info:
> One mount point is automount via systemd (see fstab).

Does this still work?

Comment 4 Steve Dickson 2013-03-23 14:16:52 UTC
I see the regression... It was caused by this commit

commit 8e2fb3fc8e46e61eeba7978a03c9fb50ff01b666
Author: NeilBrown <neilb>
Date:   Mon Dec 17 16:21:15 2012 -0500

    mountd: fix is_subdirectory to understand '/'

Looking into how to fix it...

Comment 5 Steve Dickson 2013-03-23 14:36:17 UTC
Proposed patch:

diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
index c8aa46f..978698d 100644
--- a/utils/mountd/cache.c
+++ b/utils/mountd/cache.c
@@ -371,8 +371,11 @@ export_matches(nfs_export *exp, char *dom, char *path, struct addrinfo *ai)
 static bool subexport(struct exportent *e1, struct exportent *e2)
 {
    char *p1 = e1->e_path, *p2 = e2->e_path;
+   size_t l2 = strlen(p2);
+
    return e2->e_flags & NFSEXP_CROSSMOUNT
-       && is_subdirectory(p1, p2);
+       && strncmp(p1, p2, l2) == 0
+       && p1[l2] == '/';
 }

 struct parsed_fsid {

Comment 6 Fedora Update System 2013-03-25 16:14:23 UTC
nfs-utils-1.2.7-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/nfs-utils-1.2.7-4.fc18

Comment 7 Peter Lemenkov 2013-03-25 17:09:15 UTC
I hate to say that but this build doesn't fix the issue.

Comment 8 Steve Dickson 2013-03-25 17:36:27 UTC
(In reply to comment #7)
> I hate to say that but this build doesn't fix the issue.

That's because there was typo in the spec file which caused the patch not to be applied... grrrr... nfs-utils-1.2.7-5.fc18 is on its way...

Comment 9 Fedora Update System 2013-03-25 22:57:04 UTC
Package nfs-utils-1.2.7-5.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing nfs-utils-1.2.7-5.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-4396/nfs-utils-1.2.7-5.fc18
then log in and leave karma (feedback).

Comment 10 David Waring 2013-03-26 22:08:43 UTC
1.2.7-5 works for me, +ve karma left

Comment 11 Fedora End Of Life 2013-12-21 15:50:37 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Fedora End Of Life 2014-02-05 23:23:42 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.