New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
installer: Stop adding distro-specific NTP servers into ntp.conf #279
Conversation
|
NACK |
|
Have you tested the code? I would bet that it will remove everything except 127.127... from the list of servers. |
| 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) | ||
| srv_vals.append("127.127.1.0") | ||
| fudge = ["fudge", "127.127.1.0", "stratum", "10"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace the list with single value. It will simplify the code significantly (see below).
| @@ -96,9 +82,6 @@ def __write_config(self): | |||
| break | |||
| if match: | |||
| srv_vals.remove(srv) | |||
| else: | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The list logic is now completely unncecessary. Please remove it and replace with a single boolean indicating if 127.127.1.0 was found or not.
| else: | ||
| file_changed = True | ||
| line = "" | ||
| if opt[0] == "server" and opt[1] == local_srv: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will blow up if a config line contains only single token. This an easily happen if your config contains some comments, e.g.
#####################################
# BEWARE: Do not touch this config! #
#####################################
|
NACK |
Distribution packaged ntpd has servers preconfigured in ntp.conf so there's no point in trying to add them again during FreeIPA server installation. Also fix the code to always put fudge line right after the local server line as required by ntpd. https://fedorahosted.org/freeipa/ticket/6486
|
ACK |
|
Fixed upstream |
Distribution packaged ntpd has servers preconfigured in ntp.conf so
there's no point in trying to add them again during FreeIPA server
installation.
https://fedorahosted.org/freeipa/ticket/6486