-
Notifications
You must be signed in to change notification settings - Fork 455
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
windows: Linux builds don't work on windows filesystems (via docker/WSL) #3184
Comments
Hi, docker run -d --name=roach1 --hostname=roach1 --net=roachnet -p 26257:26257 -p 8080:8080 -v "D:\docker\cockroach\data1:/cockroach/cockroach-data" cockroachdb/cockroach:v2.0.2 start --insecure report me
Failed running "start" |
Thanks for the report, @ssmun and @quartex. @BramGruneir, @bdarnell, @a-robinson, based on the provided logs, do you have ideas about what's going on? |
Our linux builds don't currently work very well on windows filesystems (this affects both the windows linux subsystem and docker). We recommend using the native windows binaries on windows. Or if you want to run linux on windows for some reason, create and mount a linux filesystem instead of having them write directly to your windows filesystem. |
Hi, I'm using a docker.compose.yaml like this ` services: roach1: |
@quartex Wonderful! We'll try that out and update our docs accordingly. |
I have been using a CockroachDB cluster in Swarm Mode in Docker for Windows for a few months now and it has worked well (was using volumes). I'd never tried direct path mapping to Windows file system. What's actually the difference that makes one work and not the other? It seems docker volumes are pretty much the same thing except docker keeps the data in a special directory on the host that you don't need to know the path of. Now I'm moving everything over to Kubernetes in Docker for Windows and it seems |
Circling back to answer my own question in case it helps someone else in future. This is how I got around this issue in Kubernetes in Docker for Windows.
The above is actually the file I use to patch the production cockroachdb.yaml with Kustomize (which is where It's a little hacky, but it seems to work well. After the container has received the signal to terminate it saves CockroachDB's data to a This gets around the issue because CockroachDB doesn't ever have to do its operations on a |
@rmloveland This needs to be tested and our docs need to be updated, we're leading users astray. |
Also I should add that my solution above does have a problem, so there still isn't a good solution to this. The problem is that the |
@lhirata, @rolandcrosby, this problem has come up several time, so we may want to prioritize a docs update for 2.2. |
Is there a proposed workaround like a certain modification to the |
sorry for the bump. but are there any plans to fix this? |
Thanks for the bump, @xambas84. I'm looking into this now. I think this issue encompasses two separate issues. I'll update again soon. |
For this issue:
|
Adding @rolandcrosby for PM support. |
I encounter the same problem with vagrant where the crdb is in the /vagrant shared directory. |
I should've passed this to you long ago, @taroface and @johnrk. The crux seems to be that running Cockroach via Docker or Kubernetes on Windows doesn't work because our linux builds don't currently work very well on windows filesystems. I've split off a separate issue to focus on Kubernetes: #4333. I'm not sure that was the right approach. Feel free to collapse into one again. @bdarnell said:
@bdarnell, I'm trying to understand the implications:
|
Maybe that would work, but it seems complicated, and I doubt it's going to be a great experience.
Yes, for testing purposes (i.e. all your data goes away on restart) this would work. We should redo some tests here - it's possible that things have gotten better (WSL 2 made a lot of improvements in compatibility but I'm not sure if it fixes the filesystem-level concerns). But assuming the old comments here are still accurate, I think we should probably tell people not to use docker or WSL on windows, and either use the native windows binaries or a full-fledged linux VM. |
We have closed this issue because it is more than 3 years |
Exalate commented:
I tried to test CockroachDB and followed instructions on this link: [https://www.cockroachlabs.com/docs/stable/start-a-local-cluster-in-docker.html#os-windows](url]
Log file:
Jira Issue: DOC-176
The text was updated successfully, but these errors were encountered: