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

linux: /etc/resolv.conf is updated even if DOCKSAL_DNS_DISABLED is set #1777

Closed
obriat opened this issue May 10, 2023 · 2 comments · Fixed by #1827
Closed

linux: /etc/resolv.conf is updated even if DOCKSAL_DNS_DISABLED is set #1777

obriat opened this issue May 10, 2023 · 2 comments · Fixed by #1827
Assignees
Labels

Comments

@obriat
Copy link
Contributor

obriat commented May 10, 2023

Description

With Linux, if DOCKSAL_DNS_DISABLED=1 (This automatically sets DOCKSAL_DNS_DOMAIN=docksal.site and DOCKSAL_NO_DNS_RESOLVER=1.) fin function check_docksal_environment() will append nameserver ${DOCKSAL_IP} into /etc/resolv.conf.

Steps to reproduce the issue:

  1. Set DOCKSAL_DNS_DISABLED=1 into docksal.env
  2. Reset docksal: fin system reset
  3. check that the dns container is no longer running: docker ps | grep docksal-dns
  4. Restart a projet (to trigger check_docksal_environment): fin p restart

Describe the results you received:

nameserver ${DOCKSAL_IP} has been append to the first line of /etc/resolv.conf.

Describe the results you expected:
No /etc/resolv.conf modification

Proposed solution:
I propose to add a condition into fin check_docksal_environment ():

        local mode="${1:-on}"
        [[ "$DOCKSAL_NO_DNS_RESOLVER" != "0" ]] && mode='off'
        if is_linux && ! is_gitpod; then
			configure_resolver_alpine $mode
@obriat
Copy link
Contributor Author

obriat commented Apr 11, 2024

Nobody's reviewing the PR?

@lmakarov lmakarov self-assigned this May 24, 2024
lmakarov added a commit that referenced this issue May 24, 2024
Both will be completely removed in the following release

Fixes #1777
@lmakarov
Copy link
Member

Thanks for reporting this. I incorporated your proposed fix and also set DOCKSAL_DNS_DISABLED=1 by default in preparation for a complete removal of this deprecated functionality.

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