Bug 533895

Summary: init script, restarting
Product: Red Hat Enterprise Linux 6 Reporter: Petr Sklenar <psklenar>
Component: rhnsdAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact: Šimon Lukašík <slukasik>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0CC: borgan, dkovalsk, jhutar, msuchy, slukasik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhnsd-4.9.2-2.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-02 19:49:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 533839, 633349    

Description Petr Sklenar 2009-11-09 16:48:14 UTC
Description of problem:
A] su - nonroot; service rhnsd restart
B] try-restart

Version-Release number of selected component (if applicable):
rhnsd-4.7.0-4.el5

How reproducible:
always


A]
Steps to Reproduce:
[root@xen83 ~]# service rhnsd start
Starting Red Hat Network Daemon:                           [  OK  ]
[root@xen83 ~]# su - testuser
[testuser@xen83 ~]$ /etc/init.d/rhnsd restart
rm: cannot remove `/var/run/rhnsd.pid': Permission denied  [FAILED]

Starting Red Hat Network Daemon: 
touch: cannot touch `/var/lock/subsys/rhnsd': Permission denied
[testuser@xen83 ~]$ echo $?
0

Actual results:
restart like a nonroot return 0 when service is running and 1 when service is stopped

Expected results:
restart like a nonroot should return 4 in all cases

B]
Expected results:
try-restart have to be there and it should be same as condrestart

Additional info:
https://fedoraproject.org/wiki/Packaging/SysVInitScript

Comment 2 Miroslav Suchý 2010-02-10 13:26:04 UTC
Try-restart is implement for some time in spacewalk (commit d295180e5fbc3d49fd4891d9f2e36a9decaf0187)

the a] part has been fixed by commit ea34b43d2fd66b401c617748aa0379da4c5246db

Not cherrypicking to rhel6 as we will be rebasing within a month.

Comment 7 Šimon Lukašík 2010-04-27 11:52:52 UTC
Changing to VERIFIED

Testing procedure:
- general automation on i386, x86_64
- manual run on x86_64, RHEL6.0-20100422.12

Results of manual run:
- run as nonroot return 4 in all cases
- both condrestart & try-restart are implemented 
(same behaviour)

Verified against:
rhnsd-4.9.3-2.el6

Comment 8 releng-rhel@redhat.com 2010-07-02 19:49:17 UTC
Red Hat Enterprise Linux Beta 2 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.