-
Notifications
You must be signed in to change notification settings - Fork 687
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
layer: make clear that diffs should not cross mountpoints #496
Comments
On Wed, Dec 14, 2016 at 02:32:16AM -0800, Aleksa Sarai wrote:
1. Should layer changesets ever cross a mountpoint? My gut says no,
but we need to make this explicit (and what mountpoint we should
start at).
I think we should start at the rootfs directory. If somebody has
mounted something on top of that directory, we'd walk it. So:
{…, "Volumes": {"/": {}}}
might end up in a volume getting walked. But unless something like
#407 lands we don't care about the empty-layers use case anyway.
2. While #492 is defining the conversion of `Volume` -> `mounts`
it's not a **hard** requirement, which means that either we have
to i) talk about `Volumes` in `layer.md` b) make the requirement
hard.
Or we can accept that folks who provide Volumes in non-mount ways can
either modify the layer-generation algorithm to compensate or slurp up
volumes when they generate new layers.
If potential volume-slurping for SHOULD-breaking implementations is
not acceptable, we can get weaker config/layer coupling than you had
in 01fce06 with a layer.md addition like:
Implementations must provide a way to ignore subtrees when
generating layers.
And then (somewhere?) require that implementations creating new layers
with a particular config in mind include that config's Volumes keys in
the ignored set. But I'm really not excited about crafting enforcable
language for “creating new layers with a particular config in mind”.
|
@cyphar From the perspective of the image spec, As far as crossing mountpoints, I am not sure what the implications are. There are going to issues in overlay, where files in sibling files in different layers may actually be a part of different devices (I think). It certainly makes creating the changesets much simpler, as you don't need to deal with problems that arise in these cases. How is crossing mountpoints represent in a tar file? |
On Wed, Dec 14, 2016 at 01:10:33PM -0800, Stephen Day wrote:
How is crossing mountpoints represent in a tar file?
It isn't. The tar archive will just hold the mount-flattened tree (or
as deep into that mount-flattened tree as you want to go, I think we
should stop after creating a stub file/directory to be a mount
destination).
|
I agree with that way of wording it (mountpoints were not a good choice of wording) -- but from what I can tell there's nothing like that in the spec? Should I add it to
Neither am I. Let's just drop it and focus on |
@cyphar This probably belongs in |
@RobDolinMS Yes, but the PR hasn't been merged yet so we should keep this open for the moment. |
This is (unfortunately) not mandated in the specification[1,2], but in order to avoid accidentally spilling private information into published layers (which is one use of Volumes) we must ignore all layers included in Config.Volumes. In future we should also add some flags or alernative ways of masking paths. [1]: opencontainers/image-spec#496 [2]: opencontainers/image-spec#504 Signed-off-by: Aleksa Sarai <asarai@suse.de>
This is (unfortunately) not mandated in the specification[1,2], but in order to avoid accidentally spilling private information into published layers (which is one use of Volumes) we must ignore all layers included in Config.Volumes. In future we should also add some flags or alernative ways of masking paths. [1]: opencontainers/image-spec#496 [2]: opencontainers/image-spec#504 Signed-off-by: Aleksa Sarai <asarai@suse.de>
This has effectively been hanlded by #694. |
From #492, I noticed that there was a concern about whether
Config.Volume
s should be included in layer changesets. IMO the answer is clearly no, but we have to make a bunch of other decisions:Should layer changesets ever cross a mountpoint? My gut says no, but we need to make this explicit (and what mountpoint we should start at). There's also a platform-dependence issue.
While conversion: add document about image -> runtime configuration #492 is defining the conversion of
Volume
->mounts
it's not a hard requirement, which means that either we have to i) talk aboutVolumes
inlayer.md
b) make the requirement hard.WDYT? Especially @vbatts who has had strong opinions about changesets in the past. 😉
The text was updated successfully, but these errors were encountered: