Bug 504175 - nfs init script "Shutting down NFS services:" fails if there are no exports
Summary: nfs init script "Shutting down NFS services:" fails if there are no exports
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: nfs-utils
Version: 14
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jeff Layton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-04 15:25 UTC by Jeff Layton
Modified: 2010-10-28 05:54 UTC (History)
2 users (show)

Fixed In Version: nfs-utils-1.2.3-1.fc14
Clone Of:
Environment:
Last Closed: 2010-10-28 05:54:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jeff Layton 2009-06-04 15:25:46 UTC
When the exports list is empty, the nfs init script throws a spurious error on stop:

# service nfs stop
Shutting down NFS mountd:                                  [  OK  ]
Shutting down NFS daemon:                                  [  OK  ]
Shutting down NFS quotas:                                  [  OK  ]
Shutting down NFS services:                                [FAILED]

...the problem seems to be this code that was introduced as part of bug 240225:

        cnt=`/usr/sbin/exportfs -v | /usr/bin/wc -l`
        if [ $cnt -gt 0 ]; then 
                action $"Shutting down NFS services: " /usr/sbin/exportfs -au
        else
                action $"Shutting down NFS services: " /bin/false
        fi

...maybe that should be "/bin/true" instead of "/bin/false"?

Then again, why not just do "/usr/sbin/exportfs -au" unconditionally? It looks like that returns success when there are no exports.

Comment 1 Bug Zapper 2009-06-09 17:05:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Steve Dickson 2009-06-11 14:30:18 UTC
Jeff, 

If I remember correctly, using /bin/false (i.e. failing when stop NFS
with no exports) was that should happen as far as the initscript exit
rules for Fedora... So at this point i'm going to close this as NOTABUG...

Comment 3 Jeff Layton 2009-06-11 15:05:27 UTC
That doesn't seem right...

Why should "service nfs start" succeed when there are no exports but "service nfs stop" fail in that situation?

I guess you're trying to use a populated exports table as an indicator of whether the "nfs" service is running? That doesn't seem like the right heuristic to me. Maybe looking for whether there's at least one running nfsd daemon would be a better indicator?

Comment 4 Bug Zapper 2010-04-27 14:39:28 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  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 '11'.

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 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Bug Zapper 2010-07-30 10:40:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Fedora Update System 2010-10-15 22:57:58 UTC
nfs-utils-1.2.3-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/nfs-utils-1.2.3-1.fc14

Comment 7 Fedora Update System 2010-10-17 15:41:54 UTC
nfs-utils-1.2.3-1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update nfs-utils'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/nfs-utils-1.2.3-1.fc14

Comment 8 Fedora Update System 2010-10-28 05:54:26 UTC
nfs-utils-1.2.3-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


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