Skip to content
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

Hosts File Cleanup #229

Open
avivonga opened this issue May 8, 2022 · 1 comment
Open

Hosts File Cleanup #229

avivonga opened this issue May 8, 2022 · 1 comment

Comments

@avivonga
Copy link

avivonga commented May 8, 2022

Hosts file is not restored when a signal is sent to the process during the actual forwarding (still writing to hosts file).
If the signal is sent after the process is done writing to the hosts file, restore is indeed happening.
I think it should be able to clean up no matter when the process is interrupted. Atm, i'm cleaning hosts file myself.
Other than that, great stuff!

@cjimti
Copy link
Member

cjimti commented May 19, 2022

@aviv-ga, I agree that some work is to be done here. kubefwd tries to err on the side of not removing entries unless it is certain they should be removed. However, please note that you should not "have" to clean up the hosts' file if entires are left in it; they will not harm anything since they point to internal IPs. If you run kubefwd again, it will reassign hostnames if there are any duplicates. Personally, if my kubefwd process is interrupted for some reason, like my computer going to sleep, then I just restart the same command, let it finish, and control-c it; this ensures it removed what it added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants