-
Notifications
You must be signed in to change notification settings - Fork 240
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
Rename the package to github.com/containerd/cgroups/v2 #251
Conversation
498e53b
to
78ab8d5
Compare
f0b5393
to
3bb251d
Compare
v2/manager.go
Outdated
@@ -30,7 +30,7 @@ import ( | |||
"syscall" | |||
"time" | |||
|
|||
"github.com/containerd/cgroups/v2/stats" | |||
"github.com/containerd/cgroups/v2/v2/stats" |
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.
This is ugly, but if we move types from v2/v2 to v2, having cgroups v3 (if there is) could be a headache. So I'd stay with this simple-yet-ugly naming.
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.
Having github.com/containerd/cgroups/v2/cgroup2 (instead of v2/v2) could be an option, by following the filesystem type.
https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html
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.
Can we just rename that to “unified” ?
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.
The cgroup v1 impl can be named “legacy”
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.
unified
may work, but legacy
is not future-proof. Would cgroup v2 be considered as legacy eventually?
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.
Hmm, but unified.NewManager doesn't look better than cgroups.NewManager.
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'm settled to use cgroup2 now.
c279a06
to
86d803c
Compare
I'm open to move cgroup v1 files to cgroup1 directory, but I'd like to do that in a different PR since this one already touches 47 files. |
Does that change need to happen in this PR, this PR looks good. We can make the naming consistent in another PR since they will be separate commits anyway. |
I don't think so. |
Migrating off from gogo/protobuf is backward-incompatible for some consumers that use proto-generated structs such as hcsshim. Signed-off-by: Kazuyoshi Kato <[email protected]>
Signed-off-by: Kazuyoshi Kato <[email protected]>
Signed-off-by: Kazuyoshi Kato <[email protected]>
Can we now drop "v1" from github.com/containerd/cgroups/v2/stats/v1 ? |
Yes. How about doing the following in a follow-up PR?
Then we have the most under cgroups/v2/cgroup1 and cgroups/v2/cgroup2. |
SGTM I thought it can be just done in this PR (with a separate commit maybe) but either is fine to me |
Migrating off from gogo/protobuf is backward-incompatible for some
consumers that use proto-generated structs such as hcsshim.
Signed-off-by: Kazuyoshi Kato [email protected]