Bug 206208 - sloppy option broken on mount command
sloppy option broken on mount command
Status: CLOSED DUPLICATE of bug 206705
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
: Reopened
: 188945 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-12 17:57 EDT by Jeff Bastian
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-27 15:40:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jeff Bastian 2006-09-12 17:57:16 EDT
Description of problem:
The -s (sloppy) option for the mount command is broken in the latest Fedora Core
6 test release.  It ignores the sloppy mount option and returns an error message
on unsupported mount options, and it returns an error code of 0 to the shell
which indicates success even though it didn't mount anything.

   # mount -t nfs -s -o ro,nobrowse nfssrv:/path/to/dir /mnt
   Unsupported nfs mount option: nobrowse
   # echo $?
   0

Returning 0 is breaking the automounter:
  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=199777

Version-Release number of selected component (if applicable):
util-linux-2.13-0.40

How reproducible:
Every time

Steps to Reproduce:
1. Try to mount a directory using the -s flag and a bad mount option
2. Watch it return an error message on the unsupported mount option
3. Note the return value is 0 which indicates success
  
Actual results:
An error message was returned, the return value was 0 (success), and the
directory was not mounted.

Expected results:
If the -s flag is used, the unsupported mount option should be ignored (or
stripped), the mount should be made, and success returned (barring any other
problems).

If the -s flag is not used, the error message about unsupported mount options
should be printed, the return code should be non-zero, and the mount should fail.
Comment 1 Karel Zak 2006-09-13 03:28:39 EDT

*** This bug has been marked as a duplicate of 205038 ***
Comment 2 Jeffrey Moyer 2006-09-22 11:39:35 EDT
*** Bug 188945 has been marked as a duplicate of this bug. ***
Comment 3 das_deniz 2006-09-22 13:38:50 EDT
(In reply to comment #1)
> 
> *** This bug has been marked as a duplicate of 205038 ***

can you open the perms on the bug this is marked a duplicate of so we can see
the status of 'sloppy' being ignored and know what the resolution is - when
available?

thanks.
Comment 4 Karel Zak 2006-09-22 14:22:07 EDT
The problem has been fixed. Update to 

   util-linux-2.13-0.42
   nfs-utils-1.0.9-7.fc6
Comment 5 Jeff Bastian 2006-09-27 12:52:20 EDT
I've updated my system to these packages and the sloppy option is fixed. 
However, the return code from 'mount' is not:
   # mount -o ro,nobrowse server:/some/path; echo $?
   Unsupported nfs mount option: nobrowse
   0

Shouldn't $? be non-zero to indicate an error?

The automounter depends on the error codes returning accurate information.  See
BZ 199777.

(I tried to post this to BZ 205038 but it says I don't have permissions to do so.)


Comment 6 Ian Kent 2006-09-27 13:31:51 EDT
(In reply to comment #5)
> I've updated my system to these packages and the sloppy option is fixed. 
> However, the return code from 'mount' is not:
>    # mount -o ro,nobrowse server:/some/path; echo $?
>    Unsupported nfs mount option: nobrowse
>    0
> 
> Shouldn't $? be non-zero to indicate an error?

Yes I thibk that is wrong.

> 
> The automounter depends on the error codes returning accurate information.  See
> BZ 199777.

Does the mount occur anyway?
Perhaps the return is an indication of that and the message
is informational.

The handling of autofs specific mount options (they are
interpreted, removed and handled internaly) was fixed in
autofs-5.0.1-0.rc2.2 which of course is not available due
to the freeze.

Ian
Comment 7 Karel Zak 2006-09-27 15:40:58 EDT
The problem with exit code has been fixed in nfs-utils: 

* Tue Sep 26 2006 Steve Dickson <steved@redhat.com> 1.0.9-8
- mount.nfs was not returning a non-zero exit value
  on failed mounts (bz 206705)



*** This bug has been marked as a duplicate of 206705 ***

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