-
Notifications
You must be signed in to change notification settings - Fork 21
procfs: do not use RHEL 8 backported fsopen(2) #64
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
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This also lets us rename them and remove the nolint:revive lines. Signed-off-by: Aleksa Sarai <[email protected]>
We need sync.OnceValues again, but while we're at it lets get the slightly performance optimised versions from Go 1.25. Signed-off-by: Aleksa Sarai <[email protected]>
File copied from | ||
https://github.com/opencontainers/runc/blob/v1.3.0/libcontainer/system/kernelversion/kernel_linux.go | ||
|
||
(Aleksa: Maybe we should put this somewhere more useful for everyone?) |
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.
I don't really like containerd's implementation, seems a tad over-engineered to me. There's a Go internal implementation which is way simpler, see https://github.com/golang/go/blob/master/src/internal/syscall/unix/kernel_version_linux.go
It returns two integers, which every programmer can compare.
If there's interest, I can try adding it to moby/sys.
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.
which every programmer can compare.
You'd be surprised with how many people I've seen screw this up.
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.
That being said, I would prefer to not have a KernelVersion
type.
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.
Opened moby/sys#204, let's see what other maintainers think of it.
d311fc9
to
19fba9b
Compare
This was originally intended to be a simple copy of runc's internal kernelversion package (which was derived from containerd, in turn derived from Docker). However, the runc one is quite over-complicated and uses quite confusing terminology and so I went ahead and wrote a more generic but less complicated version. It is very loosely based on the Go stdlib's kernelversion but completely rewritten and extended to support more than 2-digit kernel versions (for 2.6.x support) and with quite a few added tests. Signed-off-by: Aleksa Sarai <[email protected]>
There appears to be an insanely difficult to debug performance pathology with their backport (which I've struggled to debug for many weeks now). It's time to just cut our losses and not bother trying to use this feature on kernels that tried to backport it. Signed-off-by: Aleksa Sarai <[email protected]>
19fba9b
to
a13178f
Compare
There appears to be an insanely difficult to debug performance pathology
with their backport (which I've struggled to debug for many weeks now).
It's time to just cut our losses and not bother trying to use this
feature on kernels that tried to backport it.
/cc @kolyshkin
Signed-off-by: Aleksa Sarai [email protected]