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-implementer
might expect the runtime to intelligently order mounts to get the
"right" order.  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.

Signed-off-by: W. Trevor King <[email protected]>
  • Loading branch information
wking committed Sep 3, 2015
1 parent 8874000 commit 760b6b0
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 (`mounts[0]` first, `mounts[1]` second, …).

* **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 760b6b0

Please sign in to comment.