-
Notifications
You must be signed in to change notification settings - Fork 496
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
Incorrect hypervisors
and virtual
Facts with Unsupported Container Runtime Warning in Docker
#2781
Comments
Thank you for reporting this @molhamalnasr , we have added this issue to our backlog. |
Migrated issue to FACT-3488 |
@molhamalnasr I can't reproduce this ever working. In particular,
Also it doesn't appear any version of facter correctly detects those facts:
EDIT: The |
Describe the Bug
When running Puppet Facter inside a Docker container, the
hypervisors
andvirtual
facts are incorrectly set. Additionally, a warning is displayed:Warning: Facter: Container runtime, 'docker', is unsupported, setting to, 'container_other'
.Example Output:
Expected Behavior
In previous versions (e.g., Tag 4.7.0), the
hypervisors
andvirtual
facts returned the correct values:Steps to Reproduce
facter -p hypervisors
orfacter -p virtual
.Environment
Additional Context
After debugging the repository, I identified the root cause in the following line within
lib/facter/resolvers/containers.rb
:The call to
read_environ(fact_name)
always returns a value, which preventsread_cgroup(fact_name)
from being executed. This causes the resolver to misidentify the container runtime and set incorrect values for thehypervisors
andvirtual
facts.The text was updated successfully, but these errors were encountered: