Bug 45175 - systemd does not detect libvirt LXC containers
Summary: systemd does not detect libvirt LXC containers
Status: RESOLVED NOTOURBUG
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Lennart Poettering
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-24 05:29 UTC by Jan Rękorajski
Modified: 2012-01-24 11:20 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Detect libvirt LXC (572 bytes, patch)
2012-01-24 05:29 UTC, Jan Rękorajski
Details | Splinter Review

Description Jan Rękorajski 2012-01-24 05:29:36 UTC
Created attachment 56074 [details] [review]
Detect libvirt LXC

detect_container function expects "/proc/1/environ" to contain a line starting with "container=lxc", which is not there if container is run from libvirt.
The solution is to check for LIBVIRT_LXC_ anvironment variables, which attached patch does.
Comment 1 Lennart Poettering 2012-01-24 10:51:18 UTC
libvirt upstream has agreed to set container=lxc now, too, and I think that's the better place to fix it. Hence, closing.
Comment 2 Eric Blake 2012-01-24 11:08:08 UTC
The libvirt fix won't be present until libvirt 0.9.10; you can track it here:
https://www.redhat.com/archives/libvir-list/2012-January/msg00973.html
Comment 3 Lennart Poettering 2012-01-24 11:20:19 UTC
Or actually, upstream decided to go for container=lxc-libvirt, which is even nicer.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.