common: remove cgv1 for podman6#417
Conversation
|
✅ A new PR has been created in buildah to vendor these changes: podman-container-tools/buildah#6449 |
e82ef0f to
c69aaf4
Compare
|
Packit jobs failed. @containers/packit-build please check. |
1c21882 to
453e6e8
Compare
9002044 to
7cf077c
Compare
7cf077c to
c30076c
Compare
|
@Luap99 @mtrmac PTAL. Smaller commits so should be hopefully easier to review. I haven't removed any of the IsCgroup2UnifiedMode calls where there were error checks. Only assumed the bool to be true there, and removed the cgv1 parts. Unless there are any critical blockers like some change being obviously wrong or some cgv1 logic still present and open to being called, I'd prefer to leave any cleanups / simplifications for followup. |
|
should obsolete #387 |
Replace with cgroups.IsCgroup2UnifiedMode. Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
And all the cgroup v1 logic that relied on the cgroup2 bool Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
I can only see it being called in libpod/oci_conmon_linux.go that too when CgroupManager is not systemd, so it should be safe to remove. Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
df3ce3a to
26e4421
Compare
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
|
@mheon PTAL. |
|
LGTM |
mtrmac
left a comment
There was a problem hiding this comment.
Thanks! This is really much easier to review when split.
(Reviewed only locally reading the code, I don’t know much about cgroups. Leaving follow-ups for a separate PR as requested.)
| @@ -212,21 +200,15 @@ func resourcesToProps(res *cgroups.Resources, v2 bool) (map[string]uint64, map[s | |||
| case res.Memory == -1 || res.MemorySwap == -1: | |||
There was a problem hiding this comment.
(Turning this into if would be nicer.)
| "strings" | ||
|
|
||
| "github.com/opencontainers/cgroups" | ||
| "github.com/opencontainers/cgroups/fs" |
There was a problem hiding this comment.
@lsm5 in all of these handler packages, we import cgroups/fs to declare fields which are never used, so it looks like this can be simplified further.
… and that makes #387 (comment) even more attractive.
Ref: podman-container-tools#417 (comment) Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Ref: podman-container-tools#417 (comment) Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This broke a lot of stuff, so this should only be re-reverted once things are known to work in Podman and Buildah. Commits reverted: - e94388d - 26e4421 - b7be55c - cce5ec8 - 5f98dfb - ceaec36 - ed47881 - 2cf45c5 - 80309d7 - 8251431 - ff00d90 - 213e7ec Ref: podman-container-tools#417 Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This broke a lot of stuff, so this should only be re-reverted once things are known to work in Podman and Buildah. Commits reverted: - e94388d - 26e4421 - b7be55c - cce5ec8 - 5f98dfb - ceaec36 - ed47881 - 2cf45c5 - 80309d7 - 8251431 - ff00d90 - 213e7ec Ref: podman-container-tools#417 Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This broke a lot of stuff, so this should only be re-reverted once things are known to work in Podman and Buildah. Commits reverted: - e94388d - 26e4421 - b7be55c - cce5ec8 - 5f98dfb - ceaec36 - ed47881 - 2cf45c5 - 80309d7 - 8251431 - ff00d90 - 213e7ec Ref: podman-container-tools#417 Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Following up on review comments in #387 . Reattempting with finer commits for easier review.