podman icon indicating copy to clipboard operation
podman copied to clipboard

Add possibility to completely disable cgroup management

Open zv0n opened this issue 6 years ago • 16 comments

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind feature

Description

Our organization has a use-case for podman where we need it to not manage cgroups. Podman switches cgroup when it's setting up rootless environment, so setting --cgroups disabled doesn't prevent this as it is a command flag (and rootless env is being set up in the root part of program). So we'd like an option that completely disables any and all cgroup management that podman does. This issue has been discussed in this PR - https://github.com/containers/podman/pull/7721 and we've come to the conclusion that the best/cleanest approach to solve this would probably be to add disabled option to --cgroup-manager which would automatically also set --cgroups disabled for all commands.

zv0n avatar Oct 19 '20 13:10 zv0n

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Nov 19 '20 00:11 github-actions[bot]

@giuseppe WDYT?

rhatdan avatar Nov 23 '20 12:11 rhatdan

I think that the approach could solve the issue.

@mheon are you fine with it?

giuseppe avatar Nov 23 '20 12:11 giuseppe

I'm perfectly fine with this - makes sense from my perspective.

mheon avatar Nov 23 '20 16:11 mheon

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Dec 24 '20 00:12 github-actions[bot]

@giuseppe could you create a PR to make this happen?

rhatdan avatar Dec 24 '20 11:12 rhatdan

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Jan 24 '21 00:01 github-actions[bot]

@giuseppe Did you ever get a chance to look at this?

rhatdan avatar Jan 25 '21 14:01 rhatdan

not yet.

@zv0n would accepting the cgroup manager through an environment variable work for you (e.g. CGROUP_MANAGER=disabled)?

giuseppe avatar Jan 26 '21 13:01 giuseppe

@giuseppe sure, that would work great!

zv0n avatar Jan 26 '21 14:01 zv0n

@giuseppe any progress?

rhatdan avatar Feb 11 '21 11:02 rhatdan

I had a look and I am not happy with all the plumbing needed.

If the issue is only in SetupRootless, maybe we can find another way to address it.

@zv0n would something like setting DBUS_SESSION_BUS_ADDRESS=unix:path=/dev/zero and using --cgroups=disabled work with you?

giuseppe avatar Feb 11 '21 13:02 giuseppe

@giuseppe We've done some testing and it seems that DBUS_SESSION_BUS_ADDRESS=unix:path=/dev/zero works, thanks for the idea!

zv0n avatar Mar 03 '21 08:03 zv0n

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Apr 03 '21 00:04 github-actions[bot]

@giuseppe @zv0n is this still something we need to fix.

rhatdan avatar Apr 05 '21 18:04 rhatdan

The plumbing is not trivial and there is a workaround.

Let's close it.

giuseppe avatar Apr 06 '21 07:04 giuseppe