Skip to content

WSL resolv.conf issues with tailscale status change #3690

Closed

Description

@JayWStapleton

What is the issue?

Disconnecting/Reconnecting to tailscale crashes WSL Ubuntu and deletes resolv.conf

Steps to reproduce

New install of wsl ubuntu 20.04.

jay@Nautilus:~$ cat /etc/resolv.conf                                                                                    
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:                                                                                                            
# [network]                                                                                                             
# generateResolvConf = false                                                                                            
nameserver 172.17.32.1   

On the Windows system: Disconnect/Reconnect to tailscale.

jay@Nautilus:~$ cat /etc/resolv.conf
cat: /etc/resolv.conf: No such file or directory
jay@Nautilus:~$ sudo touch /etc/resolv.conf
jay@Nautilus:~$

On the Windows system: Disconnect/Reconnect to tailscale.

jay@Nautilus:~$ cat /etc/resolv.conf
# resolv.conf(5) file generated by tailscale
# DO NOT EDIT THIS FILE BY HAND -- CHANGES WILL BE OVERWRITTEN

nameserver 100.100.100.100
search corp.ts.net tailscale.com.beta.tailscale.net ts.tailscale.com ts-dns.test

After rebooting, resolv.conf disappears again, and must be manually created or touched before tailscale will set nameservers.

Are there any recent changes that introduced the issue?

No response

OS

Windows

OS version

wsl Ubuntu 20.04 on Windows 11

Tailscale version

1.19.180

Bug report

No response

Activity

  1. JayWStapleton commented on Jan 10, 2022

    @JayWStapleton
    ContributorAuthor

    Behaviour is also observed in 1.18.2
    1.16.2 does not have this bug.

  2. crawshaw commented on Jan 10, 2022

    @crawshaw
    Contributor

    I suspect this was broken a while ago by some unrelated changes to this code, but we have no tests so never noticed. Maybe a320d70?

  3. dblohm7 commented on Jan 10, 2022

    @dblohm7
    Member

    These symptoms might also have been masked because of #3437 -- once that was fixed, it probably opened the floodgates with respect of triggering the code in question.

  4. voltagex commented on Jan 11, 2022

    @voltagex

    As I mentioned in the other bug on this, I don't think Tailscale should be touching things it doesn't own - at least not without asking first.

  5. DentonGentry commented on Jan 22, 2022

    @DentonGentry
    Contributor

    a14d445 means that resolv.conf will only be written if a TS_DEBUG_CONFIGURE_WSL environment variable exists. I'm going to close this issue as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions