Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 169447 - net-misc/aiccu-2007.01.07 not starting due to incorrect system-clock
Summary: net-misc/aiccu-2007.01.07 not starting due to incorrect system-clock
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Guy Martin (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-05 13:00 UTC by Lutz Schildt
Modified: 2007-04-08 13:52 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lutz Schildt 2007-03-05 13:00:14 UTC
aiccu sometimes fails to start due to the systemclock being off by too much. depend() in /etc/init.d/aiccu tells it to start after ntp-client, which is not enough in my case. When it starts right after ntp-client, the clock is never adjusted yet in my case dunno if that is a general problem. Adding 'after ntpd' to depend() fixes this problem. Tips like adding sleep 20 to start() in /etc/init.d/aiccu did not help.



Reproducible: Always

Actual Results:  
Mar  5 14:54:20 gentoosrv aiccu: sock_getline() : "200 SixXS TIC Service on noc.sixxs.net ready (http://www.sixxs.net)"
Mar  5 14:54:20 gentoosrv aiccu: sock_printf()  : "client TIC/draft-00 AICCU/2007.01.07-console-linux Linux/2.6.20-ck1"
Mar  5 14:54:20 gentoosrv aiccu: sock_getline() : "200 Client Identity accepted"
Mar  5 14:54:20 gentoosrv aiccu: sock_printf()  : "get unixtime"
Mar  5 14:54:20 gentoosrv aiccu: sock_getline() : "200 1173092867"
Mar  5 14:54:20 gentoosrv aiccu: The clock is off by 9993 seconds, use NTP to sync it!
Mar  5 14:54:20 gentoosrv aiccu: sock_printf()  : "QUIT Aborting: Clock is off by 9993 seconds "
Mar  5 14:54:20 gentoosrv aiccu: Couldn't retrieve first tunnel for the above reason, aborting


Expected Results:  
Mar  5 12:09:28 gentoosrv aiccu: sock_getline() : "Heartbeat_Interval: 60"
Mar  5 12:09:28 gentoosrv aiccu: sock_getline() : "202 Done"
Mar  5 12:09:28 gentoosrv aiccu: Succesfully retrieved tunnel information for TXXXXX
Mar  5 12:09:28 gentoosrv aiccu: sock_printf()  : "QUIT Ajuuu paraplu"
Mar  5 12:09:28 gentoosrv aiccu: AICCU running as PID 4443
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-03-05 13:01:51 UTC
Well, so fix your system clock.
Comment 2 Lutz Schildt 2007-03-05 13:30:34 UTC
if I remember correctly that is what ntp-client is for, but the systemclock
only gets fixed AFTER aiccu tried to start and aborted due to incorrect
system-clock.

Without after ntpd in /etc/init.d/aiccu in depend() this is what happens:

1. ntp-client starts
2. aiccu fails to start due to the clock
3. ntpd starts and time is adjusted

With after ntpd:

1. ntp-client starts
2. ntpd starts and time is adjusted
3. aiccu starts

What bothers me is that ntp-client does not set the clock before ntpd has
started though as it should.
Comment 3 Lutz Schildt 2007-03-05 13:43:44 UTC
Please don't be so quick with such a response and marking it as RESOLVED, because obviously I AM fixing my system clock using ntp, aiccu just starts too early with the standard init-script here.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-03-05 13:52:58 UTC
Helps to set up ntp-client correctly, because it apparently fails to set the clock  for you, while ntpd does. Could you explain why is this aiccu bug?
Comment 5 Lutz Schildt 2007-03-05 14:22:49 UTC
ok, forgot to mention one thing, aiccu depends on ntp-client by default,  but I use openntpd so i don't actually have ntp-client just ntpd, the ntp-client init-script is a remainder of a previous installation of net-misc/ntp here. So, for people using openntpd instead of net-misc/ntp this is a bug in the  aiccu init-script correct?
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-03-05 14:33:45 UTC
(In reply to comment #5)
> use openntpd so i don't actually have ntp-client just ntpd, the ntp-client
> init-script is a remainder of a previous installation of net-misc/ntp here. 

Ugh, no comment. Here's a wonderful idea - go edit the init script so that it uses something that you actually *have* installed. Thanks in advance.
Comment 7 Lutz Schildt 2007-03-05 14:44:28 UTC
(In reply to comment #6)
> Ugh, no comment. Here's a wonderful idea - go edit the init script so that it
> uses something that you actually *have* installed. Thanks in advance.
I did that, see it more as an improvement instead of a bug. By default aiccu needs ntp to sync the clock. With 

depend () {
 need net
 after ntp-client
 after ntpd
}

it'll work with openntpd aswell. sixxs wants a time that is off by max 30 seconds i think. Openntpd does that so why not let aiccu be satisfied by openntpd as well instead of only ntp. You could also use a cronjob or anything else but I use openntpd.
Comment 8 Guy Martin (RETIRED) gentoo-dev 2007-04-08 13:52:03 UTC
This was fixed upstream. Fixed version in CVS.