Bug 596095 - nfs-utils initscripts improvement
Summary: nfs-utils initscripts improvement
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nfs-utils
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: yanfu,wang
: 596039 (view as bug list)
Depends On:
Blocks: 633349
TreeView+ depends on / blocked
Reported: 2010-05-26 10:04 UTC by Yulia Kopkova
Modified: 2012-05-22 18:25 UTC (History)
5 users (show)

Fixed In Version: nfs-utils-1.2.2-6.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-11-10 21:14:21 UTC
Target Upstream Version:

Attachments (Terms of Use)
init scripts patch - only check $SECURE_NFS on start (1.64 KB, patch)
2010-07-30 14:51 UTC, Jeff Layton
no flags Details | Diff
patch -- remove superfluous $SECURE_NFS checks from init scripts (1.15 KB, patch)
2010-08-02 11:18 UTC, Jeff Layton
no flags Details | Diff

Description Yulia Kopkova 2010-05-26 10:04:47 UTC
Description of problem:
According to https://fedoraproject.org/wiki/Packaging/SysVInitScript
nfs-utils init scripts need to be improved:


1. if program is dead and /var/lock/subsys/$SERVICE file exists the correct exit status code is "2"
# service $SERVICE stop
# touch /var/lock/subsys/SERVICE
# service $SERVICE status ; echo $?

now: 3
expected: 2

2. init scripts should return code "4" if stopping service under
nonprivileged user

# service $SERVICE start
# su testuserqa -c 'service $SERVICE stop' ; echo $?
now: 1
expected: 4

3. init scripts should return code "4" if starting service under
nonprivileged user

# service $SERVICE stop
# su testuserqa -c 'service $SERVICE start' ; echo $?
rpcidmapd, rpcgssd: 0 
nfs, nfslock, rpcsvcgssd: 1
expected: 4

4. init script should return usage and exit code "2" for unknown argument:
# service $SERVICE nonexist
now: 3
expected: 2

5. try-restart action should be supported 

6. force-reload action should be supported (if it makes sence)

Comment 2 Steve Dickson 2010-05-26 14:21:10 UTC
*** Bug 596039 has been marked as a duplicate of this bug. ***

Comment 3 RHEL Program Management 2010-05-26 14:36:47 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 5 Yulia Kopkova 2010-06-01 13:11:08 UTC
If services rpcgssd and rpcsvcgssd are not configured, status action should return code "3"

# cat /etc/sysconfig/nfs

# service rpcgssd status ; echo $?
now: 6
expected: 3

# service rpcsvcgssd status ; echo $?
now: 6
expected: 3

Moving to ASSIGNED

Comment 8 Steve Dickson 2010-07-13 18:54:28 UTC
Fixed in nfs-utils-1.2.2-3.el6

Comment 10 yanfu,wang 2010-07-30 10:23:52 UTC
I verified on rhel6-snapshot8 with nfs-utils-1.2.2-4.el6, test comment #5 again, still have the same problem.

Comment 12 Jeff Layton 2010-07-30 14:51:10 UTC
Created attachment 435575 [details]
init scripts patch - only check $SECURE_NFS on start

I think we may need something like this patch. It makes it only check the $SECURE_NFS var on start command.

Comment 13 Jeff Layton 2010-07-30 14:56:00 UTC
Note that patch in comment 12 is only lightly tested, but it seems to fix the problem reported in comment 5.

Comment 14 yanfu,wang 2010-08-02 04:40:46 UTC
verified on rhel6-snapshot8 with the above patch,result is good: 

# service rpcsvcgssd status ; echo $?
rpc.svcgssd is stopped

# service rpcgssd status ; echo $?
rpc.gssd is stopped

Comment 15 Jeff Layton 2010-08-02 11:18:23 UTC
Created attachment 436004 [details]
patch -- remove superfluous $SECURE_NFS checks from init scripts

Actually, it looks like we already check $SECURE_NFS in the start block of these init scripts. So we should be able to just remove those checks without adding them back.

I think we just need this patch.

Comment 20 yanfu,wang 2010-08-18 09:38:02 UTC
verified comment #14 by manual again and result is pass.
automatic jobs pass yet:
i386: http://rhts.redhat.com/cgi-bin/rhts/jobs.cgi?id=171251

Comment 21 releng-rhel@redhat.com 2010-11-10 21:14:21 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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