Repository navigation
[core] Creating non-linux implementation for sysfs_cgroup_driver. - #56483
Conversation
Signed-off-by: Ibrahim Rabbani <[email protected]>
Signed-off-by: israbbani <[email protected]>
Signed-off-by: israbbani <[email protected]>
|
Windows test failures are unrelated. MacOS build passes in https://buildkite.com/ray-project/premerge/builds/48663 |
| // Used to identify if a filesystem is mounted using cgroupv2. | ||
| // See: https://docs.kernel.org/admin-guide/cgroup-v2.html#mounting | ||
| #ifndef CGROUP2_SUPER_MAGIC | ||
| #define CGROUP2_SUPER_MAGIC 0x63677270 | ||
| #endif | ||
|
|
There was a problem hiding this comment.
Moved here to make the header file support non-linux systems.
| * @param mount_file_path only used for testing. | ||
| */ | ||
| explicit SysFsCgroupDriver(std::string mount_file_path = MOUNTED) | ||
| explicit SysFsCgroupDriver(std::string mount_file_path = kMountFilePath) |
There was a problem hiding this comment.
it was /etc/mtab on line 45 and now it's /mnt/mtab? - also some comments about MOUNTED are not longer valid
There was a problem hiding this comment.
Good catch! I've deleted the comments and changed it to /etc/mtab. I need to figure out why the cgroup tests passed with the wrong mount path.
There was a problem hiding this comment.
Ah, the relevant integration tests are introduced in a later PR. This would break tests in #56352.
|
the bazel build refactoring looks good to me |
|
Summarizing my offline discussions with @jjyao here. I think the true-north for cross-platform development is to have
This has a few benefits:
For the Cgroups module, after the feature is code complete, I'll refactor this to
Once the pattern is tested and well established, I plan on trying to use it on our other process management code in |
…y-project#56483) Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: israbbani <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Jiajun Yao <[email protected]> Signed-off-by: Edward Oakes <[email protected]>
…y-project#56483) Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: israbbani <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Jiajun Yao <[email protected]> Signed-off-by: zac <[email protected]>
…y-project#56483) Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: israbbani <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Jiajun Yao <[email protected]> Signed-off-by: Marco Stephan <[email protected]>
…6483) Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: israbbani <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Jiajun Yao <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
…y-project#56483) Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: israbbani <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Jiajun Yao <[email protected]>

MacOS build is failing on post-merge. The problem was introduced by #56260.
This PR provides a noop implementation for the
sysfs_cgroup_drivertarget for non-linux systems.