[Bug 1871214] Re: [SRU] nfsd doesn't start if exports depend on mount

Rodrigo Barbieri rodrigo.barbieri at canonical.com
Mon Apr 27 12:18:37 UTC 2020


** Summary changed:

- 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: (unassigned) => Rodrigo Barbieri (rodrigo-barbieri2010)

** Changed in: nfs-utils (Ubuntu)
       Status: New => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nfs-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1871214

Title:
  [SRU] nfsd doesn't start if exports depend on mount

Status in nfs-utils package in Ubuntu:
  Fix Committed

Bug description:
  Reproduced in Bionic and Focal, packages 1:1.3.4-2.1ubuntu5.2 and
  1:1.3.4-2.5ubuntu3 respectively.

  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.8-9ubuntu12.2), exportfs always returns 0, so this
  bug is not present there.

  This can be workaroundable in two ways:

  1) Editing nfs-server.service and adding "-" in
  "ExecStartPre=/usr/sbin/exportfs -r" to be
  "ExecStartPre=-/usr/sbin/exportfs -r". This will retain xenial
  behavior.

  2) Editing nfs-server.service and removing "Before=remote-fs-
  pre.target" and adding "RequiresMountsFor=/data". This will cause the
  systemd service load ordering to change, and nfs-server will wait for
  /data to be available.

  #2 is the upstream approach with commit [0] where this new comment
  identifies mount dependencies and automatically sets up
  RequiresMountFor.

  [0] http://git.linux-nfs.org/?p=steved/nfs-
  utils.git;a=commitdiff;h=4776bd0599420f9d073c9e2601ed438062dccd19

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1871214/+subscriptions



More information about the foundations-bugs mailing list