#6486 Add NTP server list to ipaplatform
Closed: Fixed None Opened 7 years ago by cheimes.

ipaserver/install/ntpinstance.py uses "/etc/redhat-release" and "/etc/fedora-release" to detect the current platform and a semi-hardcoded list of NTP server names. The module is the only consumer of ETC_FEDORA_RELEASE and ETC_REDHAT_RELEASE, too.

        # We use the OS variable to point it towards either the rhel
        # or fedora pools. Other distros should be added in the future
        # or we can get our own pool.
        os = ""
        if ipautil.file_exists(paths.ETC_FEDORA_RELEASE):
            os = "fedora"
        elif ipautil.file_exists(paths.ETC_REDHAT_RELEASE):
            os = "rhel"

        srv_vals = []
        srv_vals.append("0.%s.pool.ntp.org" % os)
        srv_vals.append("1.%s.pool.ntp.org" % os)
        srv_vals.append("2.%s.pool.ntp.org" % os)
        srv_vals.append("3.%s.pool.ntp.org" % os)

I propose:

  • Remove ETC_FEDORA_RELEASE and ETC_REDHAT_RELEASE
  • Add a NTP_SERVER_LIST to ipaplatform.$NAME.services
  • Use the list of platform specific NTP servers in ipaserver/install/ntpinstance.py

I agree with you in the first part, we should stop using /etc/*-release to determine time servers addresses. But I'm against hard-coding the list anywhere we should rather avoid touching NTP configuration.

triage result: this part of ntp config should be removed

master:

  • a15fdea installer: Stop adding distro-specific NTP servers into ntp.conf

Metadata Update from @cheimes:
- Issue assigned to someone
- Issue set to the milestone: FreeIPA 4.5

7 years ago

Login to comment on this ticket.

Metadata