[SRU] nfsd doesn't start if exports depend on mount
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nfs-utils (Ubuntu) |
Fix Released
|
Medium
|
Rodrigo Barbieri | ||
Bionic |
Won't Fix
|
Medium
|
Rodrigo Barbieri | ||
Eoan |
Won't Fix
|
Medium
|
Rodrigo Barbieri | ||
Focal |
Fix Released
|
Medium
|
Rodrigo Barbieri | ||
Groovy |
Fix Released
|
Medium
|
Rodrigo Barbieri |
Bug Description
Reproduced in Bionic and Focal, packages 1:1.3.4-
Steps to reproduce:
1) Set up a ISCSI client to a 1GB+ volume, mount it in /data and set fstab to mount at boot
2) Create a folder in /data like /data/dir1 and set up /etc/exports to export it
3) Reboot
4) Notice nfs-server does not start. Check journalctl and see it was because of "exportfs -r" returning -1 because /data/dir1 is not available.
In Xenial (1:1.2.
This can be workaroundable in two ways:
1) Editing nfs-server.service and adding "-" in "ExecStartPre=
2) Editing nfs-server.service and removing "Before=
#2 is the upstream approach with commit [0] where this new comment identifies mount dependencies and automatically sets up RequiresMountFor.
=======
[Impact]
Users attempting to export folders from iSCSI or any remote mounted filesystem will experience their exports not being available at system start up, requiring workarounds or manual intervention.
[Test case]
1. Reproducing the bug:
1a. Set up a ISCSI client to a 1GB+ volume
1b. Format /dev/<device> using mkfs.xfs
1c. Mount it in /data and set fstab as follows to mount at boot
UUID="<
1d. Create a folder in /data like /data/dir1 and set permissions as follows
chmod 777 /data/dir1
chown nobody:nogroup /data/dir1
1e. Set up /etc/exports as follows to export it
/data/dir1 *(rw,async,
1f. Reboot
1g. Notice nfs-server does not start. Running "showmount -e" displays error.
2. No cleanup necessary
3. Install the updated package that contains the fix
4. Confirming the fix:
4a. Reboot
4b. Notice nfs-server starts sucessfully, "showmount -e" displays the exports.
[Regression Potential]
Regression potential is minimal. The dependency commit only moves code around and the actual fix only introduces an external systemd-generator without changing actual pre-existing code.
I tested and confirmed that the fix introduced [0] also covers the fix removed [1], so there should not be any regression on this particular code change as well.
[Other Info]
description: | updated |
tags: | added: sts |
summary: |
- nfsd doesn't start if exports depend on mount + [SRU] nfsd doesn't start if exports depend on mount |
Changed in nfs-utils (Ubuntu): | |
assignee: | nobody → Rodrigo Barbieri (rodrigo-barbieri2010) |
status: | New → Fix Committed |
description: | updated |
tags: | added: sts-sponsor-dgadomski |
Changed in nfs-utils (Ubuntu Groovy): | |
status: | Fix Committed → In Progress |
Changed in nfs-utils (Ubuntu Eoan): | |
status: | New → In Progress |
Changed in nfs-utils (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in nfs-utils (Ubuntu Focal): | |
assignee: | nobody → Rodrigo Barbieri (rodrigo-barbieri2010) |
Changed in nfs-utils (Ubuntu Eoan): | |
assignee: | nobody → Rodrigo Barbieri (rodrigo-barbieri2010) |
Changed in nfs-utils (Ubuntu Bionic): | |
assignee: | nobody → Rodrigo Barbieri (rodrigo-barbieri2010) |
importance: | Undecided → Medium |
Changed in nfs-utils (Ubuntu Eoan): | |
importance: | Undecided → Medium |
Changed in nfs-utils (Ubuntu Focal): | |
importance: | Undecided → Medium |
Changed in nfs-utils (Ubuntu Groovy): | |
importance: | Undecided → Medium |
description: | updated |
This problem is addressed by commit [0] which requires [1] to compile.
I have created a test package with those changes and confirmed the issue is addressed.
[0] http:// git.linux- nfs.org/ ?p=steved/ nfs-utils. git;a=commitdif f;h=4776bd05994 20f9d073c9e2601 ed438062dccd19
[1] http:// git.linux- nfs.org/ ?p=steved/ nfs-utils. git;a=commitdif f;h=0386fc17578 38a096ae318347b c0bbd3ba94570b