-
Notifications
You must be signed in to change notification settings - Fork 45
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
make musl cgroupv2 identifying same as other target_envs #127
Conversation
@liubin I'm not familiar with this so please take a look at this. |
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.
@nrxus Now nix
is 0.25.0, so it could compile.
Close and reopen to trigger the CI. |
@nrxus CI was failed, you can fix it follow the error message, thanks |
When compiling for a musl target, use the same CGROUP2_SUPER_MAGIC constant that we use for other linux targets Signed-off-by: Andrés Medina <[email protected]>
1a5cd15
to
17a6c6b
Compare
@Tim-Zhang I have fixed the commit message to match the expectations from CI (as per the contributing guidelines) |
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.
LGTM, thanks @nrxus
To include kata-containers#126, kata-containers#127, kata-containers#129 Signed-off-by: Tim Zhang <[email protected]>
To include kata-containers#126, kata-containers#127, kata-containers#129 Signed-off-by: Tim Zhang <[email protected]>
I've been noticing an issue where creating a cgroup instance with an auto hierarchy fails and the error seems to come from:
cgroups-rs/src/cgroup.rs
Lines 556 to 560 in 8d29c19
.I believe this is because
cgroups-rs
thinks that the machine is using cgroup v2 where it isn't. This is happening at a customer site so I can't be sure 100% but we do compile all of our binaries withmusl
as the target as we want static builds. The system is an older aws endpoint with a 4.14 kernel so I'd assume it's using a hybrid cgroup (where systemd makes a fake unified cgroup but it's still cgroup v1 in reality) instead of a pure cgroup v2 system so that may be where the musl specific cgroupv2 check fails. I think we can avoid this musl specifc code now that the crate is using v0.25 ofnix
as the needed constant was added in this version: nix-rust/nix@23f1787This PR just removes the cfg gates so that musl targets hit the same code as other targets.
I also considered updating
nix
while i was at it since it is a couple of versions behind but I wasn't sure what your policy was for upgrading crates that cause an MSRV bump.