Set Cgroup Limits for All Users in Network

cgroupfreeipagroupslinux-networking

I have a FreeIPA user authentication set up. There are many users in the system already, along with many host systems (configured IPA clients). I want to set up cgroup restrictions on the tasks these users are doing (specifically, for CPU and memory/RAM). I could test it on a single host using a single test user (using these steps). However, this involves listing all users in each host, and managing and scaling it is difficult.

I thought of adding all IPA users to a system/user group on these host PCs and adding a cgrule for this group. However, this could require me to add each IPA user to a group on each host (creating another scaling problem). Is there a way to synchronize user groups for this particular setting?

I could find something on Group Merging but couldn't figure out how to make it work.

The FreeIPA server runs Fedora, and the hosts run Ubuntu (18.04 and 20.04). The hosts are simulation servers, so GUI access to the IPA users is needed. The cgroup limit should be on the tasks run by all these users. Ideally, I'd prefer to add the IPA users to a linux user group on the FreeIPA server (when adding the user to IPA) and have that synchronized across all the hosts. Then I would set a cgrule for this group. Is such a thing possible? It would greatly help me set up even docker access for users (add them to docker group).

Best Answer

Turns out all this is not needed. The groups created in the FreeIPA server are synchronized across clients without group merging. I created a group on the server portal and added users to it. Then, on each host, I set a limit on this group.

Some reference links