Bug 1211600
| Summary: | RFE: add support for SRV _ntp._udp resolution | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jan Pazdziora (Red Hat) <jpazdziora> | |
| Component: | chrony | Assignee: | Miroslav Lichvar <mlichvar> | |
| Status: | CLOSED ERRATA | QA Contact: | Robin Hack <rhack> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 7.1 | CC: | jpazdziora, jprokes, jscotka, mkosek, ovasik, rhack | |
| Target Milestone: | rc | Keywords: | FutureFeature | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | chrony-2.0-1.el7 | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1234406 (view as bug list) | Environment: | ||
| Last Closed: | 2015-11-19 08:30:10 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
|
Description
Jan Pazdziora (Red Hat)
2015-04-14 12:15:42 UTC
RFE to configure chrony instead of ntpd by ipa-client-install is tracked in bug 1206608. I think we can add this functionality to the chrony-helper script. It could use the dig DNS lookup utility to obtain the SRV records and add them to the running chronyd process with chronyc, similarly to how DHCP servers are currently handled. The script could be called periodically from a templated systemd timer unit to update the servers when the SRV record changes. The user (or the ipa install script) would enable it with systemctl enable chrony-dnssrv.timer The chrony-helper script was extended to allow using servers from DNS SRV records. The dig utility is used to make DNS lookups and periodic updates are implemented with systemd timers. The systemctl calls that enable/disable them are wrapped in chrony-helper to make it easier to use and not break compatibility with scripts in case the SRV lookup functionality will be implemented in chronyd some day. Example of use: # chronyc -n sources 210 Number of sources = 0 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== # /usr/libexec/chrony-helper enable-dnssrv _ntp._udp.example.com Created symlink from /etc/systemd/system/timers.target.wants/chrony-dnssrv.example.com.timer to /usr/lib/systemd/system/chrony-dnssrv@.timer. # /usr/libexec/chrony-helper list-dnssrv _ntp._udp.example.com # chronyc -n sources 210 Number of sources = 3 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^? 192.168.100.3 0 7 0 10y +0ns[ +0ns] +/- 0ns ^? 192.168.100.2 0 7 0 10y +0ns[ +0ns] +/- 0ns ^? 192.168.100.1 0 7 0 10y +0ns[ +0ns] +/- 0ns # /usr/libexec/chrony-helper disable-dnssrv _ntp._udp.example.com Removed symlink /etc/systemd/system/timers.target.wants/chrony-dnssrv.example.com.timer. # chronyc -n sources 210 Number of sources = 0 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== # /usr/libexec/chrony-helper list-dnssrv # Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-2241.html |