Skip to content

ntpd should warn/error if minsane > number of associations configured

A Debian user reported: https://bugs.debian.org/1036821

The cause here is that they had tos minsane 3 (from the Debian default config) but had removed the pool and configured two of their own servers.

In a comment below, Gary said this comes up with some regularity.

It seems like we could do a little better here. I propose the following logic at startup:

if (no_pool_association && number_of_configured_associations < minsane) {
    log(ERROR, "minsane is %i, but only %i assocations are configured.",
        minsane, number_of_configured_associations);
    exit(1);

Alternatively, this could be a warning and not exit. Is it theoretically possible to add servers at runtime? If so, that might force us to go the warning route.

Edited by Richard Laager