-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Workspace creation error: 404 No such file or directory #2565
Comments
Question... what are these exactly? What do these have to contain? Can I just mount /appdata/che to /home/user/che and let che create its own structure? |
@Spritekin When a workspace starts, ws-agent gets mounted into it, unpacked and started. It has to exist at /home/user/che/lib/. The same concerns the terminal. Can you change your mount bindings this way:
|
So it looks for a specific folder in the host??? That's unusual. Let me try. |
@Spritekin yes. The dirs are created on the host, and then the resources are copied to che-lib in the container, and this way they show up on the host. Then, when a workspace container starts, this host path gets mounted into it. |
@eivantsov a. Should I mount the NFS in the /home/user/che? b. Is there any parameter that changes the workspace area in the che server so that instead of using /home/user/che it uses an arbitrary folder? So I could mount: Then when Che starts a new workspace then the /mynfs/che would be mounted instead of /home/user/che? |
OOOOOOHHHHH... There is a CHE_HOME constant in the container!!!! |
At this point, I really encourage you to use the CLI. There are variables that will set the values properly for you there. Vokume mounting on different OS have quirks and we handle all of those with the CLI. |
Ok, didn't work... I imagine is because all the che binaries are in the /home/user/che and I thought CHE_HOME was a variable to tell che where to work. Would be nice to have something like that. I also tried the CLI and while it started the server fine, it didn't work well. Workspaces failed to start. Maybe because I'm running on CoreOS. So for now I'm mounting an NFS in the /home/user folder to solve this part. I got other things to test. Luck! |
The variables for the CLI are different than some of the core ones. There is no CHE_HOME. If you see a reference to that in the docs can you please point it out as it is wrong. When you have the cli installed and type "che" it will print out the available environment variables. You can then get docs for them in the configuration section of our docs. |
Hi, @eivantsov, @TylerJewell So I know it works when the /home/user/che folder is a local folder. But I want to use a mounted NFS folder so workspaces are shared between cluster nodes. I tried this:
And the workspace log (which leads me to think its a problem in the dockerfile):
And the Java exception in the che server:
g. I enabled debug mode and debug logs (-l:DEBUG -d), no additional info was printed. At this point I would like to know which Docker operation is not supported. h. Extracted the che.properties and changed it so it used Docker API 1.22 (it uses 1.20 by default) in the hope it is an API call available in a new version. No change. i. Updated the properties files so runtimes are started as privileged (helps with mounting disks). Same thing. j. Unmounted and tried in a host folder, all worked ok. Mounted and all failed again. Did this to verify my changes to the API or privileges were not the issue. I also verified that the same user 1000 and same permissions were applied to the folder. k. Checked in the docker logs at the time of the errors. I only found:
Still it tells me that the properties file did affect the Docker API version because in my original tests it was using v1.20 So, at this point I'm a bit confused. It should work. I will try to find in the code which command is being attempted that crashes the code when the folder is an NFS. As I said I know the NFS works because I can navigate it and the NFS can write it. Or maybe is just a missing permission problem but the point is I have no more information. Luck! |
@Spritekin I have found this one - http://serverfault.com/questions/763805/how-to-place-docker-images-ontop-of-an-nfs-share-in-coreos Can we take che out of equation for a while. Can you setup NFS dirs and try to mount them manually with docker? Smth like:
|
@eivantsov
Note I do not create the lib, workspace and storage folders. When I create a workspace (just create, not launch), Che creates all its folder structure, and it and saves the workspace inside. So workspace creation is not the problem. The problem comes when it tries to launch the workspace in a container. I have tracked the problem in the Java code. I also enabled the docker debug mode in order to see the json structures that Che sends to docker to start a container and it all comes down to a single flag in the mount (bind) structure. Essentially it is not accepting the volume "Z" flag when running in an NFS.
If I remove the Z and send the command manually then the workspace container is created. But then I guess it will conflict with the base che server premise that those folders may be shared (hence the Z). Also in the code there is a series of ReadWriteLocks that will be applied to those folders I guess to prevent overwrites. Anyway, that's the thing. I have no control over that Z parameter which is preventing the workspace from starting in the NFS folder. And if I force remove the Z I have no idea of the interaction problems it may bring. Not sure what to do now. |
@Spritekin we have added I think it is possible to take it out to Che conf so that it's a user who controls it. |
@eivantsov |
So @eivantsov - is the idea for the enhancement a way for users to override the volume mount attributes that are applied when creating workspace machine containers? |
@eivantsov |
If @TylerJewell and @garagatyi are comfortable with it, then yes, please open a feature request. @TylerJewell yes, the idea is to be able to provide own mount bindings in conf |
Hi guys,
the stack trace
And the relevant error messages in journalctl -u docker -f:
|
Hello @akram! Have you tried using this OpenShift template? |
@l0rd yep, I am using the template you are mentioning. |
@l0rd , you are correct, in fact, I was not using the openche.sh script and did not realise that there were the check for the Z flag that requires higher docker version or not using --selinux-enabled flag for docker. So I removed --selinux-enabled flag, and now it goes further. For the note, I am not using NFS for storage....so, that would be great if we could document it properly |
@akram that's great but beware that's under active development ;-) Can you please open a separate issue on the template repo https://github.com/l0rd/openche providing the following info:
|
When trying to start a new workspace I get this error:
Reproduction Steps:
Where appdata is a host folder. In my case an NFS shared folder.
Expected behavior:
I expect a workspace to be created.
Observed behavior:
The message pasted above.
Che version: Started from docker... I imagine "latest" as of Sep 23 2016
OS and version: CoreOS 1122.2.0
Docker version: 1.10.3
Che install: Docker server container
The text was updated successfully, but these errors were encountered: