Bug 1010191 - bg nfs mount option doesn't work in case of hostname lookup failures
bg nfs mount option doesn't work in case of hostname lookup failures
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: nfs-utils (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Steve Dickson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-20 04:06 EDT by Tore Anderson
Modified: 2015-02-17 12:15 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-17 12:15:57 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tore Anderson 2013-09-20 04:06:52 EDT
Description of problem:

I have several NFS mounts defined in /etc/fstab. They tend to fail to mount at boot time. This likely happens because the mount attempt is started before the network is fully operational, and therefore before the system is able to resolve the hostname of the NFS servers using DNS. However as the mounts aren't essential to the boot process, this initial failure doesn't really matter all that much, as long as they get mounted eventually I'm happy.

Therefore I specify the "bg" option to instruct the mount process to keep trying to mount them until it succeeds. According to man 5 nfs:

                      If the bg option is specified, a timeout or failure
                      causes the mount(8) command to fork a child  which  con‐
                      tinues to attempt to mount the export. The parent imme‐
                      diately returns with a zero exit code. This is known as
                      a "background" mount.

Version-Release number of selected component (if applicable):

nfs-utils-1.2.8-4.0.fc19.x86_64

How reproducible:

100%

Steps to Reproduce:
1. Purge all "nameserver" entries from /etc/resolv.conf (required only to cause the exact same "System error" failures I see in my logs)
2. sudo mount nonexistant.domain.haha:/foo /mnt -o bg ; pgrep -f mount || echo no mount process running in background

Actual results:

Output from #2 is:

mount.nfs: Failed to resolve server nonexistant.domain.haha: System error
no mount process running in background

(If step #1 is omitted, the error message is instead "Name or service not known", but the result is the same - the bg option fails to work as advertised.)

Expected results:

A backgrounded mount process would appear in the process list, and (assuming I had specified a valid NFS server/export) the file system would eventually be mounted after reinstating the nameserver entry in /etc/resolv.conf.

Additional info:

These messages from /var/log/messages shed some light on what's going on:

Sep 20 09:33:52 echo systemd[1]: Mounting /music...
Sep 20 09:33:52 echo mount[637]: mount.nfs: Failed to resolve server nfsd.domain.tld: System error
Sep 20 09:33:52 echo systemd[1]: Dependency failed for Remote File Systems.
Sep 20 09:33:52 echo systemd[1]: music.mount mount process exited, code=exited status=32
Sep 20 09:33:52 echo systemd[1]: Failed to mount /music.
Comment 1 Fedora End Of Life 2015-01-09 14:54:26 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

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.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 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 this bug is closed as described in the policy above.

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 2 Fedora End Of Life 2015-02-17 12:15:57 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 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.