-
Notifications
You must be signed in to change notification settings - Fork 348
Conversation
Signed-off-by: Lantao Liu <lantaol@google.com>
Here is a diff of the default spec 78,79c78
< },
< "noNewPrivileges":true
---
> }
88c87,92
< "source":"proc"
---
> "source":"proc",
> "options":[
> "nosuid",
> "noexec",
> "nodev"
> ]
115,117c119,121
< "destination":"/dev/shm",
< "type":"tmpfs",
< "source":"shm",
---
> "destination":"/sys",
> "type":"sysfs",
> "source":"sysfs",
122,123c126,137
< "mode=1777",
< "size=65536k"
---
> "ro"
> ]
> },
> {
> "destination":"/sys/fs/cgroup",
> "type":"cgroup",
> "source":"cgroup",
> "options":[
> "ro",
> "nosuid",
> "noexec",
> "nodev"
137,139c151,153
< "destination":"/sys",
< "type":"sysfs",
< "source":"sysfs",
---
> "destination":"/dev/shm",
> "type":"tmpfs",
> "source":"shm",
144c158
< "ro"
---
> "mode=1777"
153a168,216
> },
> {
> "allow":true,
> "type":"c",
> "major":1,
> "minor":5,
> "access":"rwm"
> },
> {
> "allow":true,
> "type":"c",
> "major":1,
> "minor":3,
> "access":"rwm"
> },
> {
> "allow":true,
> "type":"c",
> "major":1,
> "minor":9,
> "access":"rwm"
> },
> {
> "allow":true,
> "type":"c",
> "major":1,
> "minor":8,
> "access":"rwm"
> },
> {
> "allow":true,
> "type":"c",
> "major":5,
> "minor":0,
> "access":"rwm"
> },
> {
> "allow":true,
> "type":"c",
> "major":5,
> "minor":1,
> "access":"rwm"
> },
> {
> "allow":false,
> "type":"c",
> "major":10,
> "minor":229,
> "access":"rwm"
157d219
< "cgroupsPath":"/k8s.io/816b543fa52f6fc616df52a5edba5134e3eb97aca2c726e6c5cb49ed8628aeab",
160c222
< "type":"pid"
---
> "type":"mount"
163c225
< "type":"ipc"
---
> "type":"network"
169c231
< "type":"mount"
---
> "type":"pid"
172c234
< "type":"network"
---
> "type":"ipc"
183,184c245,246
< "/sys/firmware",
< "/proc/scsi"
---
> "/proc/scsi",
> "/sys/firmware"
Other diffs are what we want to keep behavior identical with Docker. |
/test pull-cri-containerd-build |
/retest |
/retest |
Agree keeping in sync with docker is a goal and I'm surprised at the number of diffs. But now we have a issue with users who are expecting us to be in sync with ourselves. Might be wise to consider config options for some of these behavior changes. |
Could this change be done more granularly and maybe with options like Mike said? We want to break away from importing from |
Yeah, make sense. :( Actually, besides the 88c87,92
< "source":"proc"
---
> "source":"proc",
> "options":[
> "nosuid",
> "noexec",
> "nodev"
> ] The docker config seems more secure. 153a168,216
> },
> {
> "allow":true,
> "type":"c",
> "major":1,
> "minor":5,
> "access":"rwm"
> },
> {
> "allow":true,
> "type":"c",
> "major":1,
> "minor":3,
> "access":"rwm"
> },
> {
> "allow":true,
> "type":"c",
> "major":1,
> "minor":9,
> "access":"rwm"
> },
> {
> "allow":true,
> "type":"c",
> "major":1,
> "minor":8,
> "access":"rwm"
> },
> {
> "allow":true,
> "type":"c",
> "major":5,
> "minor":0,
> "access":"rwm"
> },
> {
> "allow":true,
> "type":"c",
> "major":5,
> "minor":1,
> "access":"rwm"
> },
> {
> "allow":false,
> "type":"c",
> "major":10,
> "minor":229,
> "access":"rwm" I think it makes sense to whitelist those devices https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#default-devices Actually I'm not completely sure about the actual effect. |
I can do it if that is preferred. |
Let's hold this PR for now. The most useful fix in this PR is the However, I found that we are actually always overwriting containerd default in |
To keep the behavior consistent with docker, and avoid issues like:
Let's use docker oci spec as the default. /cc @estesp @containerd/containerd-maintainers
Signed-off-by: Lantao Liu lantaol@google.com