-
Notifications
You must be signed in to change notification settings - Fork 7k
[core] (cgroups 17/n) Removing controller check when adding a constraint #57731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cpu.weight. It needs to be enabled in the parent cgroup. Python integration tests were not running in CI. Signed-off-by: irabbani <israbbani@gmail.com>
|
All tests are now running properly |
| // Check if the required controller for the constraint is enabled. | ||
| StatusOr<std::unordered_set<std::string>> available_controllers_s = | ||
| GetEnabledControllers(cgroup_path); | ||
| RAY_RETURN_NOT_OK(available_controllers_s.status()); | ||
| const auto &controllers = available_controllers_s.value(); | ||
| if (controllers.find(controller) == controllers.end()) { | ||
| return Status::InvalidArgument(absl::StrFormat( | ||
| "Failed to apply %s to cgroup %s. To use %s, enable the %s controller.", | ||
| constraint, | ||
| cgroup_path, | ||
| constraint, | ||
| controller)); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I wrote this, I assumed that the controller needs to be enabled on the cgroup to apply a constraint. This isn't always the case (e.g. the cpu controller needs to be enabled on a parent cgroup) and the constraint is applied to the child cgroup.
I could keep the check and complicate the API (e.g. pass in the path of the cgroup on which to check that the controller is enabled), but I think it's cleaner for the caller to check first and then enable the constraint. This is what CgroupManager does.
…int (ray-project#57731) In ray-project#57269, I introduced a bug: * the `cpu` controller is not enabled on the system and user cgroups because it only needs to be enabled on the parent. * however, CgroupDriver::AddConstraint checked that for every constraint, the matching controller was enabled. This was not caught in CI because the python integration tests were not running. For the time being, I've removed the manual tag and excluded `cgroup` from all other python tests. We need to fix this properly because tests shouldn't exclude other tests but rather include the right targets. --------- Signed-off-by: irabbani <israbbani@gmail.com>
…int (ray-project#57731) In ray-project#57269, I introduced a bug: * the `cpu` controller is not enabled on the system and user cgroups because it only needs to be enabled on the parent. * however, CgroupDriver::AddConstraint checked that for every constraint, the matching controller was enabled. This was not caught in CI because the python integration tests were not running. For the time being, I've removed the manual tag and excluded `cgroup` from all other python tests. We need to fix this properly because tests shouldn't exclude other tests but rather include the right targets. --------- Signed-off-by: irabbani <israbbani@gmail.com> Signed-off-by: xgui <xgui@anyscale.com>
…int (#57731) In #57269, I introduced a bug: * the `cpu` controller is not enabled on the system and user cgroups because it only needs to be enabled on the parent. * however, CgroupDriver::AddConstraint checked that for every constraint, the matching controller was enabled. This was not caught in CI because the python integration tests were not running. For the time being, I've removed the manual tag and excluded `cgroup` from all other python tests. We need to fix this properly because tests shouldn't exclude other tests but rather include the right targets. --------- Signed-off-by: irabbani <israbbani@gmail.com> Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
…int (ray-project#57731) In ray-project#57269, I introduced a bug: * the `cpu` controller is not enabled on the system and user cgroups because it only needs to be enabled on the parent. * however, CgroupDriver::AddConstraint checked that for every constraint, the matching controller was enabled. This was not caught in CI because the python integration tests were not running. For the time being, I've removed the manual tag and excluded `cgroup` from all other python tests. We need to fix this properly because tests shouldn't exclude other tests but rather include the right targets. --------- Signed-off-by: irabbani <israbbani@gmail.com>
…int (ray-project#57731) In ray-project#57269, I introduced a bug: * the `cpu` controller is not enabled on the system and user cgroups because it only needs to be enabled on the parent. * however, CgroupDriver::AddConstraint checked that for every constraint, the matching controller was enabled. This was not caught in CI because the python integration tests were not running. For the time being, I've removed the manual tag and excluded `cgroup` from all other python tests. We need to fix this properly because tests shouldn't exclude other tests but rather include the right targets. --------- Signed-off-by: irabbani <israbbani@gmail.com> Signed-off-by: Aydin Abiar <aydin@anyscale.com>
In #57269, I introduced a bug:
cpucontroller is not enabled on the system and user cgroups because it only needs to be enabled on the parent.This was not caught in CI because the python integration tests were not running. For the time being, I've removed the manual tag and excluded
cgroupfrom all other python tests.We need to fix this properly because tests shouldn't exclude other tests but rather include the right targets.