RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 596095 - nfs-utils initscripts improvement
Summary: nfs-utils initscripts improvement
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nfs-utils
Version: 6.0
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: yanfu,wang
URL:
Whiteboard:
: 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:
Environment:
Last Closed: 2010-11-10 21:14:21 UTC
Target Upstream Version:
Embargoed:


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:

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 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
inclusion.

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
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 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
3

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

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
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 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.