Skip to content

Commit 2e71558

Browse files
committed
runtime: Clarify UTS and mount cleanup on 'delete'
Now that d43fc42 (config-linux: Lift no-tweaking namespace restriction, 2017-01-11, opencontainers#649) allows us to get into this sort of situation. This sort of ownership may also apply to other resources (cgroups?), but we can handle them in follow-up commits. Also drop "Configuration" from the root header. Everything in that file is a configuration. container-namespace3 (instead of container-namespace) supports the single-page, Pandoc-generated file (see e7be40f, Cleanup the spec a bit to remove WG/git text that's not really part of the spec, 2016-11-14, opencontainers#626). Signed-off-by: W. Trevor King <[email protected]>
1 parent aad1f38 commit 2e71558

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ For example, if a configuration is compliant with version 1.1 of this specificat
2020
"ociVersion": "0.1.0"
2121
```
2222

23-
## Root Configuration
23+
## Root
2424

2525
**`root`** (object, REQUIRED) configures the container's root filesystem.
2626

@@ -41,7 +41,7 @@ For example, if a configuration is compliant with version 1.1 of this specificat
4141

4242
## Mounts
4343

44-
**`mounts`** (array, OPTIONAL) configures additional mounts (on top of [`root`](#root-configuration)).
44+
**`mounts`** (array, OPTIONAL) configures additional mounts (on top of [`root`](#root)).
4545
The runtime MUST mount entries in the listed order.
4646
The parameters are similar to the ones in [the Linux mount system call](http://man7.org/linux/man-pages/man2/mount.2.html).
4747
For Solaris, the mounts corresponds to fs resource in zonecfg(8).

runtime.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,17 @@ When the process in the container is stopped, irrespective of it being as a resu
121121
This operation MUST generate an error if it is not provided the container ID.
122122
Attempting to delete a container that does not exist MUST generate an error.
123123
Attempting to delete a container whose process is still running MUST generate an error.
124-
Deleting a container MUST delete the resources that were created during the `create` step.
125-
Note that resources associated with the container, but not created by this container, MUST NOT be deleted.
126124
Once a container is deleted its ID MAY be used by a subsequent container.
127125

126+
Deleting a container MUST delete the resources that were created during the `create` step.
127+
Resources associated with the container, but not created by this container, MUST NOT be deleted.
128+
129+
On Linux, [`mounts`](config.md#mounts), [`root`](config.md#root), [`linux.devices`](config-linux.md#devices), and other filesystem changes belong to the container which created the [container mount namespace][container-namespace3].
130+
If a container joins an existing mount namespace and applies those settings, deleting the container MUST NOT reverted the settings.
131+
Similarly [`hostname`](config.md#hostname) changes belong to the container which created the container UTS namespace.
128132

129133
## Hooks
130134
Many of the operations specified in this specification have "hooks" that allow for additional actions to be taken before or after each operation.
131135
See [runtime configuration for hooks](./config.md#hooks) for more information.
136+
137+
[container-namespace3]: glossary.md#container-namespace

0 commit comments

Comments
 (0)