Re: [Libcg-devel] [PATCH 0/3] Add cgroup v2 support to cgclear

2021-03-29 Thread Michal Koutný via Libcg-devel
Hello. On Fri, Mar 26, 2021 at 08:02:43AM -0600, Tom Hromatka wrote: > This patchset adds cgroup v2 support to cgclear. IIUC, the "support" means that you can invoke cgclear on v2 system, however, it effectively does nothing. > I think it's best to continue support of cgclear through one > more

Re: [Libcg-devel] [PATCH 0/3] Add cgroup v2 support to cgclear

2021-03-29 Thread Tom Hromatka
On 3/29/21 7:32 AM, Michal Koutný wrote: Hello. On Fri, Mar 26, 2021 at 08:02:43AM -0600, Tom Hromatka wrote: This patchset adds cgroup v2 support to cgclear. IIUC, the "support" means that you can invoke cgclear on v2 system, however, it effectively does nothing. cgclear does two thing

Re: [Libcg-devel] [PATCH 0/3] Add cgroup v2 support to cgclear

2021-03-29 Thread Michal Koutný via Libcg-devel
On Mon, Mar 29, 2021 at 08:25:15AM -0600, Tom Hromatka wrote: > So this change allows cgclear to delete v2 cgroups, but > as you pointed out it does not unmount the hierarchy. Ah, I'm sorry. I confused the named hierarchy skip vs v2 controller skip in my head. It's not a mere dummy and my previou

Re: [Libcg-devel] [PATCH 0/3] Add cgroup v2 support to cgclear

2021-03-29 Thread Tom Hromatka
On 3/29/21 8:55 AM, Michal Koutný wrote: On Mon, Mar 29, 2021 at 08:25:15AM -0600, Tom Hromatka wrote: So this change allows cgclear to delete v2 cgroups, but as you pointed out it does not unmount the hierarchy. Ah, I'm sorry. I confused the named hierarchy skip vs v2 controller skip in my

[Libcg-devel] [PATCH v2 1/3] config.c: Add cgroup v2 support to cgclear

2021-03-29 Thread Tom Hromatka
When cgclear is invoked against a cgroup v2 controller, do not attempt to unmount the v2 controller. Signed-off-by: Tom Hromatka --- src/config.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/config.c b/src/config.c index 3ffa26371405..11d1da4897d0 100644 --- a/src/config.c ++

[Libcg-devel] [PATCH v2 0/3] Add cgroup v2 support to cgclear

2021-03-29 Thread Tom Hromatka
This patchset adds cgroup v2 support to cgclear. I think it's best to continue support of cgclear through one more release, but long term I think this is a tool that should be deprecated. It was written at a time when controllers weren't automatically and the creating/deleting of cgroups was more

[Libcg-devel] [PATCH v2 2/3] bootstrap: github: Ignore systemd hierarchy

2021-03-29 Thread Tom Hromatka
Ignore the "name=systemd" hierarchy by setting the autoconf --enable-opaque-hierarchy flag equal to "name=systemd". This instructs libcgroup to ignore mounts named "name=systemd" and thus these mounts aren't added to the cg_mount_table[]. Suggested-by: Michal Koutný Signed-off-by: Tom Hromatka

[Libcg-devel] [PATCH v2 3/3] github: Run the cgclear functional test last

2021-03-29 Thread Tom Hromatka
Run the cgclear functional test last since it is destructive to the cgroup hierarchy. Note that this test is automatically skipped by 'make check'. Signed-off-by: Tom Hromatka --- .github/workflows/continuous-integration.yml | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) d

[Libcg-devel] [PATCH v2 4/4] gunit: Ignore systemd hierarchies in test 007

2021-03-29 Thread Tom Hromatka
Now that systemd hierarchies are being ignored via the OPAQUE_HIERARCHY setting, update unit test 007 to ensure that systemd hierachies are not added to the mount table. Signed-off-by: Tom Hromatka --- gunit/007-cgroup_process_v1_mount.cpp | 27 +-- 1 file changed, 5 inse

[Libcg-devel] [PATCH v2 1/4] cgroup.py: Add support for cgclear

2021-03-29 Thread Tom Hromatka
Add support for cgclear to the Cgroup class. Signed-off-by: Tom Hromatka --- ftests/cgroup.py | 27 +++ 1 file changed, 27 insertions(+) diff --git a/ftests/cgroup.py b/ftests/cgroup.py index f5ec2471b344..50a8856fd317 100644 --- a/ftests/cgroup.py +++ b/ftests/cgroup.py

[Libcg-devel] [PATCH v2 0/4] Add tests for cgclear

2021-03-29 Thread Tom Hromatka
This patchset adds a functional test for cgclear and updates the unit tests to work with the opaque hierarchy changes. The code changes are available here: https://github.com/drakenclimber/libcgroup/tree/issues/cgclear2 The automated test changes are available here: https://github.com/drakenclimb

[Libcg-devel] [PATCH v2 2/4] ftests/consts: Add parser option to skip a test

2021-03-29 Thread Tom Hromatka
Add a flag, '-S' or '--skip', to allow a test number to be skipped. This will be used to skip the cgclear test by default since it's so destructive. Signed-off-by: Tom Hromatka --- ftests/ftests.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/ftests/ftests.py b/ftests/ftests.py in

[Libcg-devel] [PATCH v2 3/4] ftests: Add a simple cgclear functional test

2021-03-29 Thread Tom Hromatka
Add a test that invokes cgclear. Note that this test is especially destructive and is skipped by default. Github Actions invokes it separately as the final step. - Test Results: Run Date: Mar 23 16:0