Bug 596095 - nfs-utils initscripts improvement
nfs-utils initscripts improvement
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nfs-utils (Show other bugs)
6.0
All Linux
high Severity medium
: rc
: ---
Assigned To: Steve Dickson
yanfu,wang
:
: 596039 (view as bug list)
Depends On:
Blocks: 633349
  Show dependency treegraph
 
Reported: 2010-05-26 06:04 EDT by Yulia Kopkova
Modified: 2012-05-22 14:25 EDT (History)
5 users (show)

See Also:
Fixed In Version: nfs-utils-1.2.2-6.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 16:14:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Yulia Kopkova 2010-05-26 06:04:47 EDT
Description of problem:
According to https://fedoraproject.org/wiki/Packaging/SysVInitScript
nfs-utils init scripts need to be improved:

SERVICE:
nfs
nfslock
rpcgssd
rpcidmapd
rpcsvcgssd

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 $?
now: 
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 10:21:10 EDT
*** Bug 596039 has been marked as a duplicate of this bug. ***
Comment 3 RHEL Product and Program Management 2010-05-26 10:36:47 EDT
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
inclusion.
Comment 5 Yulia Kopkova 2010-06-01 09:11:08 EDT
If services rpcgssd and rpcsvcgssd are not configured, status action should return code "3"

# cat /etc/sysconfig/nfs
SECURE_NFS=no

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

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

Moving to ASSIGNED
Comment 8 Steve Dickson 2010-07-13 14:54:28 EDT
Fixed in nfs-utils-1.2.2-3.el6
Comment 10 yanfu,wang 2010-07-30 06:23:52 EDT
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 10:51:10 EDT
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 10:56:00 EDT
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 00:40:46 EDT
verified on rhel6-snapshot8 with the above patch,result is good: 

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

# service rpcgssd status ; echo $?
rpc.gssd is stopped
3
Comment 15 Jeff Layton 2010-08-02 07:18:23 EDT
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 05:38:02 EDT
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
x86_64: 
https://beaker.engineering.redhat.com/jobs/12708
http://rhts.redhat.com/cgi-bin/rhts/jobs.cgi?id=171254
Comment 21 releng-rhel@redhat.com 2010-11-10 16:14:21 EST
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.