Skip to content

Commit

Permalink
config: Require the runtime to mount Spec.Mounts in order
Browse files Browse the repository at this point in the history
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 <jiangshanlai@gmail.com>
Signed-off-by: W. Trevor King <wking@tremily.us>
  • Loading branch information
wking committed Sep 11, 2015
1 parent 51c9265 commit d282a32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Each container has exactly one *root filesystem*, specified in the *root* object

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

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

0 comments on commit d282a32

Please sign in to comment.