-
Notifications
You must be signed in to change notification settings - Fork 462
PoC of /etc/hosts.d functionality #2334
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
Conversation
Instead of relying on coredns to provide the api-int record, which requires our coredns to be deployed as a static pod so it will be available before the node tries to register with the api, we can put the api-int record in /etc/hosts. This way the node can register without coredns running and then coredns can be started at a later point in the deployment. This makes our coredns deployment much more flexible. Since I'm told we should not try to template all of /etc/hosts because other service may be trying to add entries to it as well, this change adds a systemd service and timer to ensure that the correct entry is in /etc/hosts. It will run once per minute and append the api-int line if it doesn't already find one there.
|
/hold It's a PoC and I'm not sure we're actually going to use this mechanism anymore. In designing the feature that needed it, we found some issues with using /etc/hosts for this. I wanted to push it because I'd already done most of the work on it and it might be useful for someone else. This logic should also be moved into MCD as discussed in the other PR about this: #2258 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cybertron The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
darkmuggle
left a comment
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.
Implicitly this creates a new path /etc/hosts.d that is used add hosts to /etc/hosts -- and I'm not sure that is the best path forward. /etc/hosts.d is not used by anything in RHCOS. I'm not wild using a block in /etc/hosts.
| @@ -0,0 +1,12 @@ | |||
| name: etc-hosts.d.timer | |||
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.
A path unit might be better than running a periodic.
https://www.freedesktop.org/software/systemd/man/systemd.path.html
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
|
@cybertron: PR needs rebase. DetailsInstructions 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. |
|
@cybertron: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
|
@openshift-bot: Closed this PR. DetailsIn response to this:
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. |
As discussed in #2236 this is a PoC of how a /etc/hosts.d feature might work. Currently it is used to provide the api-int record for on-prem platforms.