-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add ability to specify custom directories in chroot #347
Comments
Thanks for filing this! Definitely something we want to expose. I just want to clarify one thing. The way the chroot is created is that it creates hard links to files inside those directories and when that fails it copies the data. So if you including a folder that was a NFS mount for your persistent data you would not have the expected behavior (it would just copy everything). We need a separate notion for mounts to accomplish that use case (something we are planning for future versions) |
Thanks thats great to hear. Ill be honest my version was just a hack to get something working. Our services currently require some config files in a certain directory so having read only (or at least non-permanent) access is not an issue. Slightly unrelated but I had a quick look into this issue and noticed that driver config has the type |
@dancannon This is in design phase for us and is not in the current dev cycle so I don't want to get into specifics that may change, but I think we will pass this into the driver via a specialized data structure, not as key-value pairs -- similar to what you might see now for networking. |
@cbednarski Ok sounds good, I am just trying to understand how the internals work as I am really interested in the project. |
@dancannon For some examples: |
Another example -- a simple Spring Boot app needs to find a "/tmp" directory in order to startup. Currently it fails with
So just the simple ability to specify a directory that is created is useful. |
@bsoutham: Is it possible to create the temp folder? The directory structure in the chroot is a starting point. The application should be able to create anything it needs |
@dadgar With the Spring Boot -- no. It is starting tomcat to handle connections to the app, which occurs automatically, before the actual app is started. The app doesn't have a chance to create a directory, because it fails prior to even running any code that I've written. It fails in the Spring bootstrapping, over which I don't have control. The directory needs to exist prior to being executed. |
This was fixed via #1518 |
…inting/formatting fixes (hashicorp#351)
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Unfortunately we have services that have a dependency on files in an external directory and to get our services to run in Nomad I have had to fork nomad and add out directory to the list of chroot directories manually (dancannon@8b6a394)
It would be nice to specify a list of environments in the driver config which are mounted when the service starts. I imagine this could also be useful for stateful services but I am interested to hear what other people think.
The text was updated successfully, but these errors were encountered: