-
Notifications
You must be signed in to change notification settings - Fork 453
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
plugins/linux/virtualization: if lxc and docker are on the same host, it can't detect lxc #833
Comments
cat /proc/1/environ say what? |
container=lxccontainer_ttys=/dev/pts/0 /dev/pts/1 /dev/pts/2 /dev/pts/3 Yes ! |
See my patch here master...lehn-etracker:lxc-2.0 |
Thanks ! |
3 tasks
This was an issue for me too. I have made another PR with tests passing at #1055 |
This should be fixed on master now with the updated PR from @jeunito |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Phys Host : ubuntu 16.04 LTS with docker engine 1.11 and lxc 2.0.1 installed.
LXC containers are ubuntu 14.04 with chef (from 11 to latest),which embeded ohai, always the same problem virtualization.rb doesn't detect the container has a guest.
With native ohai same problem.
On same environment, without docker installed in the host, it works fine.
Ohai Version
From 7.0.4 to latest (maybe before)
Platform Version
Host : Ubuntu 16.04
Lxc container : Ubuntu 14.04
Ohai Output
An LXC guest return :
On an LXC container running on a physical host without docker :
Content of cgroup inside the ubuntu 14.04 containers :
The problem seems here :
file virtualization.rb line 180
if File.read("/proc/self/cgroup") =~ %r{^\d+:[^:]+:/(lxc|docker)/.+$}
I'm currently searching a way to find any difference to be able to know if a container is lxc or docker from inside the container.
The text was updated successfully, but these errors were encountered: