[sos-devel] Support for in-container detection
Louis Bouchard
louis.bouchard at canonical.com
Wed Dec 7 11:18:54 UTC 2016
Hello,
Following discussion in PR #893[1], I am opening the discussion on how to better
support in-container detection.
The Policy class has a _in_container variable available. As far as I can tell,
it is only used by the RedHat policy to detect Docker.
cloud-init has a rather simple container detection method that uses
systemd-detect-virt and a few other methods[2]. This could be used as a base for
such an amelioration.
My idea was to adapt the cloud-init method and use it to document _in_container
through the __init__().
Let me hear your comments.
TIA,
...Louis
[1] https://github.com/sosreport/sos/pull/893
[2]
https://git.launchpad.net/cloud-init/tree/cloudinit/util.py?id=7f2e99f5345c227d07849da68acdf8562b44c3e1#n1763
--
Louis Bouchard
Software engineer, Cloud & Sustaining eng.
Canonical Ltd
Ubuntu developer Debian Maintainer
GPG : 429D 7A3B DD05 B6F8 AF63 B9C4 8B3D 867C 823E 7A61
More information about the sos-devel
mailing list