Skip to content

Commit d282a32

Browse files
committed
config: Require the runtime to mount Spec.Mounts in order
If we don't specify this, some bundle-authors or runtime-implementers might expect the runtime to intelligently order mounts to get the "right" order [1]. But that's not possible because: $ mkdir -p a/b/c d/e/f h # mount --bind a/b h # mount --bind d a/b $ tree --charset=ascii h h `-- c But in the other order: # umount a/b # umount h # mount --bind d a/b # mount --bind a/b h $ tree --charset=ascii h h `-- e `-- f So there's no "right" order. Allowing the bundle-author to specify their intended order is both easy to implement and unambiguous. [1]: opencontainers#136 (comment) Suggested-by: Lai Jiangshan <[email protected]> Signed-off-by: W. Trevor King <[email protected]>
1 parent 51c9265 commit d282a32

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

config.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Each container has exactly one *root filesystem*, specified in the *root* object
3838

3939
You can add array of mount points inside container as `mounts`.
4040
Each record in this array must have configuration in [runtime config](runtime-config.md#mount-configuration).
41+
The runtime MUST mount entries in the listed order.
4142

4243
* **name** (string, required) Name of mount point. Used for config lookup.
4344
* **path** (string, required) Destination of mount point: path inside container.

0 commit comments

Comments
 (0)