Bug 533891

Summary: init script, parameter reload
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: high 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:15 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:36:56 UTC
Description of three problems:
A. some strange stuff during reload
B. stop&reload - don't know this
C. force-reload


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

How reproducible:
always

Steps to Reproduce:
A]
1. 
[root@xen83 ~]# /etc/init.d/rhnsd reload
[root@xen83 ~]# echo $?                                    [  OK  ]
0
  
Actual results:
It places [OK] in wrong line

Expected results:
Reloading Red Hat Network Daemon:       [OK]

B]

stop and reload

[root@xen83 ~]# /etc/init.d/rhnsd stop
Stopping Red Hat Network Daemon:                           [  OK  ]
[root@xen83 ~]# /etc/init.d/rhnsd reload
[root@xen83 ~]# echo $?                                    [FAILED]
0

When service is stopped and you try reload then it writes [failed] but return code is zero. I am not sure what should be correct message and correct return code here. 

C]
'force-reload' has to be there somehow
service rhnsd force-reload

actual result
echo $?=1, which is wrong

expected result
# if it is unimplemented then error code should be 3

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

Comment 2 Miroslav Suchý 2010-02-10 10:41:43 UTC
I could not reproduce behaviour described in A]

Correct behaviour for B] should be not write anything on output at all.

Best fix for C] would be implement force-reload.

Comment 3 Petr Sklenar 2010-02-10 11:01:55 UTC
(In reply to comment #2)
> I could not reproduce behaviour described in A]

I still could see it with rhnsd-4.7.0-4.el5, is there some newer version?
[root@qa-psklenar ~]# /etc/init.d/rhnsd reload
[root@qa-psklenar ~]# #this is line after ---- >>>>>>>>    [  OK  ]
[root@qa-psklenar ~]# rpm -q rhnsd
rhnsd-4.7.0-4.el5

Comment 4 Miroslav Suchý 2010-02-10 11:27:40 UTC
re B] hmm some script do not write anything at all (sshd) some print [FAILURE] (httpd). I choose the second behaviour, but now it should return status code 7 which is:
7:	program is not running

Fixed in spacewalk git commits:
217731a7bcbb4c1966f00343e256a8b45359405b  (C part)
bc56ff799287f2a799a3fe4ae529e5f35ab03db4  (B part)

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

Comment 5 Miroslav Suchý 2010-02-10 11:29:15 UTC
Yes, in beta1 should go:
 rhnsd-4.8.1-2.el6.x86_64
But yes, it is still not there. 
OK. I'm ignoring this part since rhnsd-4.8.1-2.el6.x86_64 obviously do not have this bug (A] part)

Comment 10 Šimon Lukašík 2010-04-28 11:44:16 UTC
Changing to VERIFIED

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

Results:
A] output on rhel6 is neat
Reloading Red Hat Network Daemon: [  OK  ]
B] 7 (program is not running) is returned
C] lsb force-reload is implemented

Verified against:
rhnsd-4.9.3-2.el6

Comment 11 releng-rhel@redhat.com 2010-07-02 19:49:15 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.