Skip to content
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

Fix docker detection on hosts with cgroup v2 (unified hierachy) #4352

Merged
merged 2 commits into from Jul 23, 2021

Conversation

dfangl
Copy link
Member

@dfangl dfangl commented Jul 23, 2021

This PR fixes the docker detection on hosts with only cgroup unified hierachy enabled.

Thanks @dominikschubert and @thrau for helping to fix this.

Similar issue and solution as here: GoogleContainerTools/kaniko#1592

Systemd also uses this mechanism: https://github.com/systemd/systemd/blob/6604fb0207ee10e8dc05d67f6fe45de0b193b5c4/src/basic/virt.c#L523-L548

Option for overriding the check with a true value, to be able to handle the case all the detection mechanisms fail.

@thrau
Copy link
Member

thrau commented Jul 23, 2021

fantastic catch @dfangl @dominikschubert ! 👏 pretty sure this would have caused a lot of headaches in the next few weeks if you hadn't spent the time with debugging. 💯

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 79.649% when pulling f26e010 on fix-docker-check into 034d3af on master.

Copy link
Member

@whummer whummer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thanks for this fix 👍

@whummer whummer merged commit 47cff41 into master Jul 23, 2021
@whummer whummer deleted the fix-docker-check branch July 23, 2021 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants