[BUGS] Dovecot not starting on startup
Jerahmy Pocott
quakenet1 at optusnet.com.au
Wed Apr 23 04:18:55 EST 2008
On 22/04/2008, at 6:30 PM, John Marshall wrote:
> I don't understand why ntpdate is being depracated. Running ntpd
> with the
> "-g" flag (which is what ntpd_sync_on_start="YES" does) is not the
> same
> thing. ntpdate -b sets synchronizes the time immediately - and then
> the rc
> continues. ntpd -g allows ntpd to synchronize instead of panic if
> the offset
> is big, but it can take several minutes to decide to do that - by
> which time
> the system has been running for a couple of minutes and the time
> will go
> backwards (or forwards).
I'm thinking the whole retiring of ntpdate may actually be the issue
here, NOT running ntpdate is probably causing this issue, since in the
pr it is stated ntpd_sync_on_start="YES" is being used, not ntpdate.
From the ntpdate man page:
Note: The functionality of this program is now available in the
ntpd(8) program. See the -q command line option in the ntpd(8) page.
After a suitable period of mourning, the ntpdate utility is to be
retired from this distribution.
But if we look at the ntpd man page for the -q option:
-q
Exit the ntpd just after the first time the clock is set. This
behavior mimics that of the ntpdate(8) program, which is to be
retired. The -g and -x options can be used with this option. Note: The
kernel time discipline is disabled with this option.
Which does NOT mimic ntpdate at all, it just quits ntpd after the
first sync. To get the same function as ntpdate you would also need
the -g flag. I suspect using ntpd in this way, while doing the same
thing as ntpdate, probably takes longer to actually apply the time.
The next issue is that ntpd_sync_on_start="YES" simply provides the -g
flag to ntpd (I'm assuming this was supposed to replace using ntpdate
for the initial clock setting on boot), but there is no telling WHEN
ntpd will actually sync the initial time, it could happen at any point
after it is started. Interestingly if you look at the ntpd rc script
it REQUIRES ntpdate. So the solution would seem to be to continue
using ntpdate on boot and not bothering with the
ntpd_sync_on_start="YES". It seems to me that for ntpd to replace
ntpdate it would actually need to be run twice on system start up,
once with the -q and -g flags then a second time without them to stay
as daemon. This way you know that after the first instance quit, the
timing has been put in sync.
My suggestion would be to just change the existing ntpdate script to
run ntpd -q -g if the ntpd_sync_on_start="YES" is found, since that is
the point where it really should be started and need to happen before
ntpd is started normally.
Maybe this should be a pr regarding ntpdate/ntpd/rc?
Cheers,
Jerahmy.
More information about the BUGS
mailing list