-
Notifications
You must be signed in to change notification settings - Fork 665
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
Volume mountpoints should have additional flags #443
Comments
On Thu, Nov 03, 2016 at 02:18:21PM -0700, Vish Ishaya wrote:
I'd like to support all of these by distributing opaque directories $ oci-unpack some-image.tar some-image 3 directories, 1 file Of course, my proposed sanitizer would clobber some of those ‘source’ |
These seems more like a runtime concern and there are good reasons it is the way it is today. The
Allowing the image to name volumes will lead to security problems in systems that have a single volume namespace or overlap in volume names within a namespace (imagine a malicious container that wants to mount the The other issue with such a design is that booleans without considering mutual exclusion create a number of combinations that don't make a lot of sense. As you add more booleans, the space of invalid option combinations increases. For example, what is the use of a temporary, readonly volume with More than just booleans, such a design would probably also call for parameterization. How would these parameters interact with mount specifications? Given this, we may want to be more explicit about how directory permissions are maintained between unpacking the image and mounting the volume over a directory location. NB. The term |
I agree, I don't think this is a good feature. And even if it might be we need more people asking for it. |
I am moving this to post v1.0 |
I'm not sure I follow your logic here. I'm not suggesting the image spec defines anything about what the runtime names the volumes. My goal here is for the builder of the image to specify locations in the image filesystem that represent a interfaces (either input-->config or output-->logs). The current definition is not rich enough. Either we need to put enough information into the image-spec so that a runtime could determine how to set up mounts properly, or (as @wking suggests) we allow a runtime spec to be shipped. I personally like the separation between
I agree that a list of booleans might not be the best description, maybe we define a simple enum that describes how the volume should be used.
If we don't think that we can agree on a common set of bind types, then it probably would be enough to allow some arbitrary metadata in the Bind (or as it is currently written: Volume) definition. |
Volume mountpoints in a container should have data explaining how they are used to help runtimes decide what should be done with them. The first and most obvious is a "readonly" boolean. There are a couple other flags which also could be useful.
The purpose of these flags might be illustrated with an example. Lets say I'm making a mysql container. I might have the following mountpoints defined:
Clearly some of these could be consolidated using symlinks (tmp and run could share the same dir, as well as db and logs), but I wanted to give a verbose description.
The text was updated successfully, but these errors were encountered: