Bug 757766

Summary: ntp running multiple instances
Product: Red Hat Enterprise Linux 5 Reporter: Mohammed Arafa <bugzilla>
Component: ntpAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-29 17:17:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Mohammed Arafa 2011-11-28 16:35:10 UTC
Description of problem:
it is possible to run ntp service multiple times.

i have verified this on rhel5.7.

i ran /etc/init.d/ntp status - verified it was up and running
i ran ps aux | grep ntp - observed only 1 instance of ntp running
i next ran /etc/init.d/ntp start - it ran without problems giving a green OK status
i checked again and found ps aux | grep ntp showed a 2nd ntp running
this apparently can go on for quite a bit

Version-Release number of selected component (if applicable):


How reproducible:
everytime

Steps to Reproduce:
1. /etc/init.d/ntp start
2. ps aux | grep ntp
3. /etc/init.d/ntp start
  
Actual results:
multiple instances of ntp running

Expected results:
only a single instance of ntp running

Additional info:

Comment 1 Miroslav Lichvar 2011-11-29 17:17:47 UTC
The ntpd process forks when it resolves names of the servers specified in ntp.conf to avoid blocking, so this is expected behavior.

Comment 2 Mohammed Arafa 2011-12-12 12:03:10 UTC
no no - i am not talking about forking

while true do
/etc/init.d/ntp start
done

_can go on forever!_


it apparently doesnt check to see if ntp service is started or if a pid file was created for the service.

Comment 3 Miroslav Lichvar 2011-12-12 12:40:42 UTC
With what version of the ntp package is that? I don't see it with ntp-4.2.2p1-15.el5, /etc/init.d/ntp start is a no-op.