Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
blkio limits don't get applied on attached BeegFS volume #6277
As discussed here when working with an rbd volumes it appears
Steps to reproduce
Let me know how I can help with this.
So I'm pretty confused as to how limits would actually ever have worked since @tomponline's rework of devices.
The issue is that the
I suspect what we need to do is move the limit calculation to a PostHook, which then allows us to inspect the mounted disks. That PostHook should then return a RunConfig with the cgroup entries we expect and we can then have LXD apply them through LXC.
@tomponline does that sound right to you?
@stgraber the cgroup settings are returned as part of run config by Start() and if being called as part of container start then the cgroup rules are translated into liblxc settings so they are applied when the container actually starts. Here: https://github.com/lxc/lxd/blob/master/lxd/container_lxc.go#L2243-L2251 this is the same technique used for the actual mounts.
I'll take a look and check its working on other disk types to check its not specific to RBD.
@tomponline the problem is that those rules cannot be generated until a mount entry exists and that mount entry won't exist until RunConfig is applied.
That's why I'm now adding a PostRunConfig which can be filed through PostHooks and get applied after the container has started.
This then allows us to resolve the mounts to block devices and figure out the limits.