Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upOCI spec: mount type is optional for bind mounts #2330
Comments
|
Does this cause problems when using bind mounts with Docker? or is this issue just for spec completeness? |
|
Just completeness. Someone bumped into this crafting OCI spec by hand. |
## Description This fixes behavior of `getMountNameAndOptions` func based on OCI runtime spec(https://github.com/opencontainers/runtime-spec/blob/master/config.md#posix-platform-mounts). In detail, if the mount type is equal to "none" or other dummy string and the mount option includes either "bind" or "rbind", `getMountNameAndOptions` behave as the mount type is equal to "bind". ## Relevant issue Fix: #2330 Signed-off-by: moricho <ikeda.morito@gmail.com> FUTURE_COPYBARA_INTEGRATE_REVIEW=#2487 from moricho:fix/bindmount fc53d64 PiperOrigin-RevId: 308637079
## Description This fixes behavior of `getMountNameAndOptions` func based on OCI runtime spec(https://github.com/opencontainers/runtime-spec/blob/master/config.md#posix-platform-mounts). In detail, if the mount type is equal to "none" or other dummy string and the mount option includes either "bind" or "rbind", `getMountNameAndOptions` behave as the mount type is equal to "bind". ## Relevant issue Fix: #2330 Signed-off-by: moricho <ikeda.morito@gmail.com> FUTURE_COPYBARA_INTEGRATE_REVIEW=#2487 from moricho:fix/bindmount fc53d64 PiperOrigin-RevId: 308637079
## Description This fixes behavior of `getMountNameAndOptions` func based on OCI runtime spec(https://github.com/opencontainers/runtime-spec/blob/master/config.md#posix-platform-mounts). In detail, if the mount type is equal to "none" or other dummy string and the mount option includes either "bind" or "rbind", `getMountNameAndOptions` behave as the mount type is equal to "bind". ## Relevant issue Fix: #2330 Signed-off-by: moricho <ikeda.morito@gmail.com> FUTURE_COPYBARA_INTEGRATE_REVIEW=#2487 from moricho:fix/bindmount fc53d64 PiperOrigin-RevId: 308637079
|
The fix had to be rolled back because it broken the handling for EmptyDir in Kubernetes. It preserves |
Does that means |
|
It's better to fix emptydir handling in gvisor-containerd-shim to remove |
the rule for type field in mount is strange. If option is bind, then type is optional. In runsc today type is required.