cgroups icon indicating copy to clipboard operation
cgroups copied to clipboard

Allow for passing properties to NewSystemd

Open shell-skrimp opened this issue 1 year ago • 3 comments

I had a need to disable some functionality but couldnt do so with current implementation so I made a tweak that allows for passing custom properties.

shell-skrimp avatar Jun 23 '24 20:06 shell-skrimp

@shell-skrimp Unfortunately this changes the public API of NewSystemd which would be a breaking change. You could introduce a new "constructor" that takes in the properties. Basically what you have right now just with a new name like NewSystemdWithProperties

dcantah avatar Jul 22 '24 22:07 dcantah

I had a need to disable some functionality

Can you tell us more about your use-case? As @dcantah noted this is a breaking change; a new constructor would be a better option but as of now I don't think we know of a particular use-case for this in containerd.

samuelkarp avatar Jul 22 '24 23:07 samuelkarp

Hey all, sorry I didnt reply sooner, been busy ;)

My use case was in a different project where I needed to create cgroups for a parent and its child processes. I think that @samuelkarp idea to have a new constructor is probably best way to go to prevent breakage. However, I'm not sure if this cgroups project wants to be consumable by other projects or if it only wants to stay in the scope of containerd? If the latter then you can disregard this PR.

shell-skrimp avatar Jul 26 '24 22:07 shell-skrimp