Open stuartz-VernonCo opened 6 years ago
I think we have the basic request already at #976, though it's interesting to have extra data about WSL.
Weave Net is built on lots of Linux facilities like the VXLAN kernel module, netfilter, network namespaces, etc.; all of the code using them will need to be replaced with the equivalent for Windows.
While #976 has to do with Windows containers rather than Linux containers on docker for windows, it appears that weave generally works on WSL for linux containers. I am able to attach to a container and communicate with other containers on the network from different hosts. Only issue was AF_UNIX error. It may be that WSL has some of the requirements since I'm able to attach and use the containers on weave net, but lacks connection to AF_UNIX...a semantic error? I'm not familiar enough with WSL to know as I just started using Windows.
It's known to work on WSL2 (not WSL1) with addition kernel configs.
Here's the issue reported to MSFT WSL2 Kernel: https://github.com/microsoft/WSL2-Linux-Kernel/issues/47
And waiting for this https://github.com/microsoft/WSL2-Linux-Kernel/pull/48 to get merged.
been fixed by an upstream patch. Guess mail list patches are expected for WSL2 as well. That is unfortunate.
This IS a FEATURE REQUEST
What are the benefits?
Able to run weave natively on Windows for development. While not probably a high priority. Putting this here so others can know how to use weave on WSL.
Brief summary of issue and solution
I have been able to get weave commands working on Windows 10 WSL including weave attach. However, WSL doesn't have unix sockets so I am not able to start containers running on the weave net. Have Weave net check for unix socket availiblity and if not create AF_INET. Also check if running on Windows WSL and add to weave the exports and aliases given below in steps to reproduce.
This post suggests using AF_INET for windows:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
What you expected to happen?
use
docker-compose $(weave config) up -d
to start a container attached to the weave networkWhat happened?
When running the command above, I get an error:
module' object has no attribute 'AF_UNIX
How to reproduce it?
On Windows 10: Install Docker for Windows Enable WSL (note uses Hyper-V and cannot run Virtualbox at the same time.) Open cmd > bash >enter Install weave Add the following to both /home/username/.bashrc & /usr/local/bin/weave, exit, & reenter bash.
from https://blog.jayway.com/2017/04/19/running-docker-on-bash-on-windows/
Weave commands work that I have tried: launch, status *, attach
Weave commands I've tried that don't: weave env, weave config
Versions:
Logs:
docker-compose.yml