-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
ntp: add config to filter and set ntp interfaces #11066
Conversation
Welcome @Pavan-Gunda! |
Hi @Pavan-Gunda. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
/ok-to-test
# Specify the interfaces | ||
# Only takes effect when ntp_filter_interface is true | ||
ntp_interfaces: | ||
- ens3 |
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.
It's risky. ens3
is an exact NIC name and is not applicable in most scenarios. I prefer to comment them out and suggest that when ntp_filter_interface
is true, we should update the value of ntp_interfaces
to match the node's NIC name.
But, do you think this still works for scenarios with inconsistent NIC names per node?
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.
Sure! I will comment out the ntp_interfaces
section and add your suggestion as a comment.
When having inconsistent NIC names per node, One can have all interfaces from all nodes listed under this list of interfaces and if the interface does not exist on a node, I did a quick test and NTP simply just listens on the set of interfaces that do exist.
interface listen ens3
interface listen test
The ntp server logs looked something like this when I restarted the service
systemd[1]: Started Network Time Service.
ntpd[252818]: proto: precision = 0.050 usec (-24)
ntpd[252818]: restrict: 'monitor' cannot be disabled while 'limited' is enabled
ntpd[252818]: Listen normally on 0 lo 127.0.0.1:123
ntpd[252818]: Listen normally on 1 ens3 xx.xx.xx.xx:123
ntpd[252818]: Listen normally on 2 lo [::1]:123
ntpd[252818]: Listen normally on 3 ens3 [xxx.xxx.xxx.xxx]:123
ntpd[252818]: Listen normally on 4 ens3 [xxx.xxx.xxx.xxx]:123
ntpd[252818]: Listening on routing socket on fd #21 for interface updates
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.
Hi @Pavan-Gunda , It looks like the ntp_interfaces
section is still not commented out. Is that right?
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.
Hi!
I commented ntp_interfaces
section out now. :)
interface listen {{ item }} | ||
{% endfor %} | ||
{% endif %} | ||
|
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.
# Some comments
{% for item in ntp_interfaces %}
interface {{ item }}
{% endfor %}
@@ -98,6 +98,12 @@ ntp_servers: | |||
ntp_restrict: | |||
- "127.0.0.1" | |||
- "::1" | |||
# Specify whether to filter interfaces |
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.
HI @Pavan-Gunda
Because there is only one variable that needs to be config, so
# Some comments
# Uncomment `ntp_interfaces` if enable xxxx
# ntp_interfaces:
# - ignore wildcard
# - isten xxx
Which Can be easier for the code.
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.
Thank you 👍
I made the change now and pushed the code :)
Thanks @Pavan-Gunda |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Pavan-Gunda, yankay The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @cyclinder and @yankay This pull request apparently also requires an LGTM label for me to be able to merge this. Can I get some help with that :) |
Thanks @Pavan-Gunda! /lgtm |
* ntp: add config to set which interface ntp should listen * Fixed config to only have one variable
* ntp: add config to set which interface ntp should listen * Fixed config to only have one variable
* ntp: add config to set which interface ntp should listen * Fixed config to only have one variable
* ntp: add config to set which interface ntp should listen * Fixed config to only have one variable
What type of PR is this?
/kind feature
What this PR does / why we need it:
It makes ntp interfaces configurable
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: