Bug 157485

Summary: ntp - timesync blocks whole boot process
Product: [Fedora] Fedora Reporter: Christian Münscher <crion>
Component: system-config-dateAssignee: Nils Philippsen <nphilipp>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: avi, mlichvar
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-06 16:44:49 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: 150221    
Attachments:
Description Flags
/etc/rc.d/init.d/ntpd
none
ntp-4.2.0.a.20050816-2.src.rpm none

Description Christian Münscher 2005-05-11 22:33:25 UTC
Description of problem:
fc4test3-DVD, selected ntp timesync at bootup, but selected the wrong network
interface to be active on start. So no connection to the internet was there. The
ntp-service blocked the whole boot-process for more than two minutes, I think.
The timeout should be reduced to FIVE(!) seconds at most. Or the process should
do his sync-work in the background - also on boot-up!
It can easily happen that no internet-connection is there - and then it steals
you  precious time. Really annoying!

Comment 1 Petr Raszyk 2005-11-28 14:01:37 UTC
ntpd cannot block anything.
See -> ntpd/ntpd.c -> main() -> ntpdmain()

We call there:

daemom(0,0);

See man-pages (launch at the command prompt):
man 3 daemon




Comment 2 Christian Münscher 2005-11-28 14:47:56 UTC
puuuh, then call it "delay", if you don't like the word "block" - it was like I
described above...

Comment 3 Avi Kivity 2005-11-28 17:42:51 UTC
the daemon does not block, but ntpdate does. this is called by the initscript: 
 
    65              # Synchronize with servers if step-tickers exists 
    66              # or the -x option is used 
    67              echo -n $"$prog: Synchronizing with time server: " 
    68              /usr/sbin/ntpdate $dropstr -s -b -p 8 $tickers 2>/dev/null 
>/dev/null 
 
this blocks for a long while if there are connectivity problems. 
 
i believe this bug should be reopened. Can the reporter reopen it? 

Comment 4 Christian Münscher 2005-11-28 18:28:57 UTC
Thanks for these details, reopened

Comment 5 Petr Raszyk 2005-11-29 12:18:32 UTC
Created attachment 121579 [details]
/etc/rc.d/init.d/ntpd


We does not call 'ntpdate' in FEDORA CORE 4.

a) Log in (as 'root')
b) Launch at the command prompt: 
   cp ./my-ntpd-init-d-rc-d-etc /etc/rc.d/init.d/ntpd
c) Launch at the command prompt: 
   init 0
d) Restart you machnine
e) See for '--------->'

Comment 6 Avi Kivity 2005-11-29 19:29:14 UTC
[avi@firebolt ~]$ cat /etc/ntp/step-tickers 
timeserver.iix.net.il 
[avi@firebolt ~]$ sudo /sbin/service ntpd restart 
Shutting down ntpd:                                        [  OK  ] 
ntpd: Synchronizing with time server: We try to launch |--------------------> 
ntpdate 
After |--------------------> ntpdate 
                                                           [  OK  ] 
We try to launch --------------------> ntpd 
After --------------------> ntpd                           [  OK  ] 
 
 
Looks like we do call ntpdate in FC4. Please reopen. Please fix if at all 
possible. 

Comment 7 Petr Raszyk 2005-11-30 16:18:17 UTC
Created attachment 121635 [details]
ntp-4.2.0.a.20050816-2.src.rpm

cat /etc/ntp/step-tickers imeserver.iix.net.il

What is your current directory ? I do not need an answer.
Again: if we launch at the command promt (in FEDORA CORE 4, as 'root'):

service ntpd restart 

we does not launch 'ntpdate'.But this is not important too. Back to your issue.

I will send you *src.rpm (including auto-trace). Please, instll this *.src.rpm
and restart your machine.
It creates /tmp/ntpd.PID (and ?) /tmp/ntpdate.PID logs.
Please, send me this files (to see if ntpdate blocks anything).

Comment 8 Miroslav Lichvar 2006-03-01 15:13:19 UTC
ntpdate is only called when /etc/ntp/step-tickers exists and is not empty.
system-config-date creates the file. As ntpd is called with -g the best solution
is to not create the file at all. Reassigning to system-config-date component.

Comment 9 Nils Philippsen 2006-03-06 16:44:49 UTC
system-config-date-1.8.2-1 lets you configure whether to use ntpdate at startup
or not (default==off).