New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oci: fix the file mode of the device #5028
Conversation
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
Hi @Iceber. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Build succeeded.
|
Build succeeded.
|
@AkihiroSuda does libcontainer/devices.DeviceFromPath need a similar change? |
# libcontainer/devices/device.go
type Device struct {
Rule
// Path to the device.
Path string `json:"path"`
// FileMode permission bits for the device.
FileMode os.FileMode `json:"file_mode"`
// Uid of the device.
Uid uint32 `json:"uid"`
// Gid of the device.
Gid uint32 `json:"gid"`
}
|
I'm going to try to fix this issue in runc |
Thank you! |
Build succeeded.
|
@thaJeztah opencontainers/runc#2804 is approved, pls review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@AkihiroSuda PTAL, Thanks |
@AkihiroSuda Is it necessary to fix the previous version? |
I'd prefer not to backport this unless there is a strong reason |
This issue was found in the use of 1.2.10, the essence of the issue is that it does not comply with the OCI runtime specification, fixing the previous version may make sense |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The file mode of the device in the OCI runtime specification does not contain file type bits
unix.Stat_t.Mode
contains the file type and mode,details are in "The file type and mode" section of inodeThis issue causes some
config.json
to fail the runtime spec schema validationFor example, the
config.json
for the kube-proxy containerDiscussions about
FileMode
: opencontainers/runtime-spec#1082