Skip to content

Commit

Permalink
Merge pull request #2741 from lollipopman/containers-fix-lxc
Browse files Browse the repository at this point in the history
Fix lxc container detection
  • Loading branch information
joshcooper authored Jul 31, 2024
2 parents fabedea + c609d1c commit e776b42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/facter/resolvers/containers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def read_environ(fact_name)

info = {}
case container
when 'lxcroot'
when 'lxc'
vm = 'lxc'
when 'podman'
vm = 'podman'
Expand Down
2 changes: 1 addition & 1 deletion spec/facter/resolvers/containers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

context 'when hypervisor is lxc and it is discovered by environ' do
let(:cgroup_output) { load_fixture('cgroup_file').read }
let(:environ_output) { ['container=lxcroot'] }
let(:environ_output) { ['container=lxc'] }
let(:result) { { lxc: {} } }

it 'return lxc for vm' do
Expand Down

0 comments on commit e776b42

Please sign in to comment.