• jmanes@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    ·
    1 year ago

    I work at Oracle and leverage WSL for for some things. It works… but I wish I could just use Linux. WSL is full of gotchas and weird bugs. Performance is not good either.

    • DigitalBits@lemmy.fmhy.ml
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      WSL2 is essentially a VM, and doesn’t seem to have any weird bugs or gotcha’s anymore (at least for command line programs). I don’t use it for work, but playing around with it as a hobby, it seems fairly solid.

      • jmanes@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        1 year ago

        I use WSL2. It has bugs. DNS stops working when you connect to a VPN, which I have to do every day for all of my work. To fix that you can either modify the resolv conf (which gets wiped out on every startup) and then chattr it to prevent it from being deleted (this still didn’t quite work for me). Or you can install wsl-vpnkit and pipe all of your network traffic through another container.

        I have been working in docker and rancher desktop, both of which have integrations with WSL but with other caviats and bugs. I basically have a bunch of very highly specific steps written up for other employees for “how to get this working with WSL” because it is so buggy.

        • RyeBread@feddit.de
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 year ago

          I feel so vinticated reading somebody else going through the DNS hell WSL2+VPN DNS issues. It is a nightmare in professional environments and for the life of me I cannot get my resolv to stop reverting after a while. Thanks for the tip on wsl-vpnkit, much harder to convince VM teams to spin you up a remote dev environment than to just use WSL sometimes.

        • communistcapy@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          1 year ago

          Tinkering around to get things working is a part of the authentic Linux experience. Performance is 95% to Ubuntu 20.0.4 so not sure what you mean by that. resolv.conf won’t get wiped out if you put

          [networking]
          generateResolvConf = false
          

          in your /etc/wsl.conf file.

          A more modern solution is outlined here which you will want to adjust if you’re using something other than Cisco.

          • jmanes@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            1 year ago

            I’ve been using Linux for 15 years. Tinkering with WSL is not as fruitful as tinkering with Linux.

            The link you provided for DNS is exactly the solution I was describing in my original post. It never worked for me, though. We have a custom DNS setup in-house and simply setting the nameserver doesn’t work. It is far too much of a hassle, so we just spin up wsl-vpnkit when we need network access.

            Mac users and Linux native users don’t have these issues and everything works out of the box.

            The performance I get when compiling and running integration tests through Rancher desktop integration on WSL is abysmal. Taking 30+ minutes to complete whereas for other employees on Macs see things done in under 5 minutes. Not sure if there is a WSL specific firewall / networking issue or what. If you look up “WSL2 poor network performacne” you’ll see dozens of open GitHub issues. It is very non-deterministic. Some days it runs great, other days it is terrible.

            I assume I’ll have a million of other replies coming along that link me to random benchmarks and articles about how great WSL2 is, but I’m telling you, I use it every single day at my job as a software engineer. It has problems. I’m grateful it exists and you can hack it just enough to work (sometimes), but it is nothing like using Linux natively.