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

Virtualization is inconsistent when HOST_PROC is defined #1736

Open
pgimalac opened this issue Oct 18, 2024 · 0 comments
Open

Virtualization is inconsistent when HOST_PROC is defined #1736

pgimalac opened this issue Oct 18, 2024 · 0 comments

Comments

@pgimalac
Copy link
Contributor

In a container where the host's /proc is mounted and given by the HOST_PROC environment variable, what is host.Virtualization supposed to return ?
Is it supposed to give information about the host or about the container ?

The function checks a lot of files to get information, some about the host (eg. $HOST_PROC/cpuinfo) and some about the current process (which relate to the container, eg. $HOST_PROC/self/cgroup), which is inconsistent.

In particular when called inside an lxc container with HOST_PROC given then it will still show lxc (despite the host itself not being virtualized).

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

No branches or pull requests

1 participant