Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 120298 - openntpd-3.7_p1 - ntp -s not working without rdate
Summary: openntpd-3.7_p1 - ntp -s not working without rdate
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Thilo Bangert (RETIRED) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-25 06:18 UTC by Heikki Pernu
Modified: 2006-05-30 14:20 UTC (History)
2 users (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 Heikki Pernu 2006-01-25 06:18:47 UTC
Had ntp -s enabled and the clock still wasn't synchronizing at startup.

However, it seems that installing the rdate package changes the situtation.

There was no mention of this anywhere, ntp did complain about the fairly
large time difference, but did not correct the situation nor tell that rdate is missing.

Please update the error messages so that ntp actually complains about missing rdate if (when) it is needed.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-01-25 06:24:51 UTC
What ebuild (and version) are you talking about?
Comment 2 Heikki Pernu 2006-01-25 07:41:08 UTC
/usr/portage/net-misc/openntpd/openntpd-3.7_p1.ebuild
Comment 3 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2006-05-29 07:10:27 UTC
AFAICT openntpd does not need rdate, thats what the -s switch is for.

from ntpd man page:

     -s     Set  the time immediately at startup if the local clock is off by more than
              180 seconds.  Allows for a large time correction, eliminating the  need  to
              run rdate(8) before starting .

do you have the actual error message you got?
also, could you try to reproduce the bug in openntpd-3.9p1?
Comment 4 Heikki Pernu 2006-05-29 09:35:15 UTC
Not running gentoo right now.
However, there was no error message.
The clock simply was not synchronized.
Emerge rdate package solved the problem.
Apparently ntpd runs rdate but does not report if it is missing.
Comment 5 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2006-05-30 11:45:47 UTC
well, openntpd doesn't run rdate - but when the time is off by too much, then it will fail to set the time correctly and abort. 

running rdate would bring the time closer to the actual time after which openntpd would run without error.
perhaps you have seen this behavior?
Comment 6 Heikki Pernu 2006-05-30 12:41:14 UTC
Nope.

ntp -s should synchronize even if the clock is off by a large amount.
Also, emerging rdate did help with no other changes to the system
configuration.

I have not looked at the source code but if it really does not run rdate then it is admittedly strange.
Comment 7 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2006-05-30 13:12:27 UTC
strange indeed

anyway - i don't have rdate installed and openntpd syncs fine.

i didnt check the source either, but the man page for adjtime says that there is a max of 2145 secs that the time can be adjusted with - see also bug #128566
Comment 8 Heikki Pernu 2006-05-30 13:24:29 UTC
Yes, that's true, when you do not use the -s flag.

With the -s flag it should (and does on some other systems) do a full synchronization regardless of the time difference.

And works with the rdate installed.
Which is strange since there is no mention of rdate in the source code either.
A library thing, perhaps ...
Comment 9 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2006-05-30 14:20:19 UTC
alright - thanks for looking at the code. if your problem is still not solved i suggest opening a new bug... please include logfiles ;)

regards
bangert