Incorrect hypervisors
and virtual
Facts with Unsupported Container Runtime Warning in Docker
#2781
Labels
bug
Something isn't working
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: