-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: don't erase previous record from /etc/hosts #175
Conversation
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.
Great! Blazingly fast too.
Could we add a unit-test for this and fix the failing ones? I'll approve early though 👍🏾
Oh, and open a mirror PR on K8s, but that's lower priority.
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.
I think we are still missing some corner cases such as IP changes. Even converting to a set()
, this case would be considered different and, depending on the order, the older ones may end up being prioritized.
I have a quick proposal: we could first check if either fqdn or hostname is present in the host_entries
, if yes, then we remove that line.
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.
Thanks @imanenami, I left one last remark but I think other than that, we are good to go.
Co-authored-by: phvalguima <[email protected]>
Changes: