Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 250901

Summary: "service named restart" fails
Product: Red Hat Enterprise Linux 5 Reporter: Zenon Panoussis <redhatbugs>
Component: bindAssignee: Adam Tkac <atkac>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 5.0CC: ovasik, raina
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2008-0300 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 14:17:39 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:

Description Zenon Panoussis 2007-08-04 20:16:12 UTC
Description of problem:

# service named stop
Stopping named_sdb:                                        [FAILED]
# ps -A |grep named
 2933 ?        00:00:00 named_sdb

# service named restart
Stopping named_sdb:                                        [FAILED]
Starting named_sdb: named_sdb: already running             [FAILED]

It's the init file's fault. When stopping, line 197 tries to 
kill rndc. If rndc is not running or for some other reason 
isn't killed, the exit code is != 0, so none of the code in 
lines 200-214 gets executed. 

If I comment out the if/fi statements in lines 199/215, I get 

# service named restart
Stopping named_sdb: .......................................[  OK  ]...
Starting named_sdb:                                        [  OK  ]

The dots after "Stopping named_sdb" are printed two seconds 
apart, so the shutdown takes more than a minute. 

Version-Release number of selected component (if applicable):
9.3.3-9.0.1.el5

How reproducible:
Every time

Comment 1 Adam Tkac 2007-08-06 09:19:46 UTC
Patch is change line 199 to
if ! [ $RETVAL -eq 0 ]; then

But it's not standard way that rndc fails. Could you please call `rndc stop`
explicitly and attach output (why rndc fails). Also please attach log what
exactly is doing during stopping.

Thanks, Adam

Comment 2 Zenon Panoussis 2007-08-06 11:08:24 UTC
rndc failed to stop the server because I hadn't configured it. 
The log said:
general: rejected command channel message from 127.0.0.1#53464

If I leave rndc unconfigured and change line 199 as you suggest, 
the script stops the server with killproc and the delay. 

If I configure rndc, the script with your patch also stops the 
server, but now through rndc and without the delay. 

Thus, your patch seems to be the right solution either way, with 
or without rndc misconfiguration. 

Comment 3 RHEL Program Management 2007-10-26 10:04:34 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 5 Adam Tkac 2007-12-14 11:06:18 UTC
*** Bug 423101 has been marked as a duplicate of this bug. ***

Comment 9 Răzvan Sandu 2008-05-04 16:09:36 UTC
As of May 04, 2008, this bug seems to be present in Fedora 9 (rawhide) too.

Razvan

Comment 10 Adam Tkac 2008-05-05 07:19:13 UTC
(In reply to comment #9)
> As of May 04, 2008, this bug seems to be present in Fedora 9 (rawhide) too.
> 
> Razvan

Hm, are you sure this is same bug? This should be fixed in all supported Fedoras.

Comment 11 errata-xmlrpc 2008-05-21 14:17:39 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2008-0300.html