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

Unsupported container runtime 'lxc' with facter 4.8.0+ / nightly #2737

Closed
torstenfohrer opened this issue Jul 8, 2024 · 9 comments · Fixed by #2741
Closed

Unsupported container runtime 'lxc' with facter 4.8.0+ / nightly #2737

torstenfohrer opened this issue Jul 8, 2024 · 9 comments · Fixed by #2741
Labels
bug Something isn't working triaged Jira issue has been created for this

Comments

@torstenfohrer
Copy link

Describe the Bug

Since facter 4.8.0 we getting unsupported container runtime 'lxc'

Problem origin here facter source

Expected Behavior

Support 'lxc' as runtime again, perhaps additional to 'lxcroot'

Steps to Reproduce

  1. Setup a lxc
  2. Install puppet-agent 8.8.0 (aka 8.7.0.38.gc055f2ce8-1noble)
  3. Simple run facter resulting in following output (stripped down)

[2024-07-08 10:23:33.166466 ] WARN Facter::Resolvers::Containers - Container runtime, 'lxc', is unsupported, setting to, 'container_other'

Environment

  • Puppet agent 8.8.0, (nightly 8.7.0.38.gc055f2ce8-1noble)
  • Facter 4.8.0
  • Ubuntu 20.04, 22.04, 24.04

Additional Context

See also at systemd source: https://github.com/systemd/systemd/blob/cd8eb9605f1a1f2fe1180382201d23548cad7a1c/src/nspawn/nspawn.c#L3500

@torstenfohrer torstenfohrer added the bug Something isn't working label Jul 8, 2024
@torstenfohrer torstenfohrer changed the title Facter Unsupported container runtime 'lxc' with facter 4.8.0+ / nightly Jul 8, 2024
@joshcooper
Copy link
Contributor

@lollipopman 7bc38cc may have broken lxc could you take a look?

@joshcooper
Copy link
Contributor

This is caused by #2574

@deemon87
Copy link

Hi,
i also have the same issue inside lxc container

facter is_virtual
[2024-07-29 08:46:41.170292 ] WARN Facter::Resolvers::Containers - Container runtime, 'lxc', is unsupported, setting to, 'container_other'
true

@aqueos
Copy link

aqueos commented Jul 29, 2024

same here on debian guest all facter virtual fail to work with lxd.

[~]: facter virtual
[2024-07-29 15:35:28.953018 ] WARN Facter::Resolvers::Containers - Container runtime, 'lxc', is unsupported, setting to, 'container_other'
container_other

completly broke a lot of pp script and templates :(

[~]: facter version
4.8.0

ii puppet-agent 7.32.1-1bookworm amd64 The Puppet Agent package contains ....
ii puppet7-release 7.0.0-20bookworm all Release packages for the Puppet 7 repository

@lollipopman
Copy link
Contributor

@lollipopman 7bc38cc may have broken lxc could you take a look?

will do

lollipopman added a commit to lollipopman/facter that referenced this issue Jul 29, 2024
Commit 7bc38cc removed the regex
matching for lxc, /container=lxc/, and instead matched the env var
exactly, using the value lxcroot from the rspec test. However, I can
find no evidence that lxc ever sets container to anything other than
lxc, so change lxcroot to lxc[1].

[1]: https://codesearch.debian.net/search?q=container%3Dlxc&literal=1
     https://github.com/search?q=container%3Dlxcroot&type=code

Fixes: puppetlabs#2737
@joshcooper
Copy link
Contributor

Can folks on this thread try out @lollipopman patch in #2741?

@joshcooper joshcooper added the triaged Jira issue has been created for this label Jul 31, 2024
Copy link

Migrated issue to FACT-3477

@aqueos
Copy link

aqueos commented Aug 19, 2024

hi,

just FYI the issue still exist for me

[~]: dpkg -l 'puppet'|grep ii
ii puppet-agent 7.32.1-1focal amd64 The Puppet Agent package contains all of the elements needed to run

[~]: puppet facts|grep virtual
Warning: Facter: Container runtime, 'lxc', is unsupported, setting to, 'container_other'
"is_virtual": true,
"virtual": "container_other",

i cannot follow the link to https://perforce.atlassian.net/browse/FACT-3477 to see the rest but this vital fact is still not working on lxc/lxd for me :)

best regards,
Ghislain.

@lollipopman
Copy link
Contributor

I don't think the fix has made it into any release, you would need to use git HEAD to test.

$ git tag --contains c609d1c9f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged Jira issue has been created for this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants