<img style="border: none; background:none; width: 0; height: 0;" src="https://share.polymail.io/v2/z/a/NWIxNmRmNWY1MmQ4/ICrnu7lUGb4IioeV3PivkgWrykfOcTLOhzTbRbr6HSTEPENMNMxqBa5Dn_a_KJLgTETiY1wseqpxW0h2PHAItOfqy9w5HZ-IHryK60UHaxEmsdWUkztVos9VdkDfXAjGZyqgNTKOSTSV9ElwrQgJckvJIjQ_SqfSl0w0Nz3q.png" alt="" width="0px" height="0px" border="0" /><div></div>
<div>
Stéphane,</div><div><br></div><div>Not sure what configuration file you are talking about. Configuration file under /etc/lxc/default.conf looks like this:</div><div><br></div><div>```</div><div><div>lxc.network.type = veth</div><div>lxc.network.link = br0</div><div>lxc.network.flags = up</div><div>lxc.network.hwaddr = XXXXX</div>```</div><div><br></div><div>Any lxc-* command that I could use to introspect the containers and get more information to troubleshoot ?</div><div><br></div><div>Thanks again!</div><div><br></div><div>Best,</div>
<div id="psignature"><div>Martín</div></div>
<div class="gmail_extra"><br/><div class="gmail_quote"><div dir="ltr">On Tue, Jun 05, 2018 at 4:05 PM "Stéphane Graber" <stgraber> <<a href="mailto:" st="" graber="">">"Stéphane Graber" <stgraber> </stgraber></a>> wrote:<br/></stgraber></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><style><![CDATA[a, pre, code, a:link, body { word-wrap: break-word !important; }]]></style><p>What's your container's config like?
<br/>
<br/>I wonder if it's somehow missing the include (usually indirect through
<br/>common.conf) that's needed for the lxcfs hook.
<br/>
</p><br/>On Tue, Jun 05, 2018 at 11:57:39AM -0700, Martín Fernández wrote:
<br/>> Stéphane,
<br/>> 
<br/>> `grep lxcfs /proc/1/mountinfo` doesn’t return any output.
<br/>> 
<br/>> On the other hand,  /var/lib/lxcfs/ shows `cgroup` and `proc` folders with multiple files.
<br/>> 
<br/>> Best,
<br/>> Martín
<br/>> 
<br/>> On Tue, Jun 05, 2018 at 3:54 PM "Stéphane Graber" < ">"Stéphane Graber" > wrote:
<br/>> 
<br/>> > 
<br/>> > 
<br/>> > 
<br/>> > What do you see if you run "grep lxcfs /proc/1/mountinfo" inside the
<br/>> > container?
<br/>> > 
<br/>> > And do you see the lxcfs tree at /var/lib/lxcfs/ on the host?
<br/>> > 
<br/>> > 
<br/>> > 
<br/>> > On Tue, Jun 05, 2018 at 11:50:51AM -0700, Martín Fernández wrote:
<br/>> > > Stéphane,
<br/>> > >
<br/>> > > I just got time to do my work on lxcfs. Installed lxcfs running on a
<br/>> > Ubuntu 14.04 box, installed version is 2.0.8. 
<br/>> > >
<br/>> > > I restarted one of our containers and “I think” I see wrong output when
<br/>> > running `free` for example. 
<br/>> > >
<br/>> > > lxc-info shows 1GB of memory usage and `free` shows 24GB of memory usage
<br/>> > which is the same as the host memory usage. Anything I could be missing ?
<br/>> > >
<br/>> > > Short version of the process done would be:
<br/>> > >
<br/>> > > - apt-get install lxcfs
<br/>> > > - sudo init 0 (in container)
<br/>> > > - lxc-start -n container-name -d 
<br/>> > >
<br/>> > > Best,
<br/>> > > Martín
<br/>> > >
<br/>> > > On Thu, May 31, 2018 at 12:39 AM "Stéphane Graber" < ">"Stéphane Graber"
<br/>> > > wrote:
<br/>> > >
<br/>> > > >
<br/>> > > >
<br/>> > > >
<br/>> > > > On Wed, May 30, 2018 at 07:16:04PM -0700, Martín Fernández wrote:
<br/>> > > > > Stéphane,
<br/>> > > > >
<br/>> > > > > Thank you very much for the quick reply!
<br/>> > > > >
<br/>> > > > > What are you are saying is pretty awesome! That would make it super
<br/>> > easy
<br/>> > > > to start using it. Is there any constraint in terms of what versions
<br/>> > of
<br/>> > > > LXC are supported ? I can run LXCFS with LXC 1.0.10 ? 
<br/>> > > >
<br/>> > > > 1.0.10 should be fine though we certainly don't have all that many
<br/>> > users
<br/>> > > > of that release now that it's two LTS ago :)
<br/>> > > >
<br/>> > > > In any case, it'll be safe to install LXCFS, then create a test
<br/>> > > > container, confirm it behaves and if it does then start restarting
<br/>> > your
<br/>> > > > existing containers, if it doesn't, let us know and we'll try to
<br/>> > figure
<br/>> > > > out why.
<br/>> > > >
<br/>> > > > > In order to understand a little bit more about how LXCFS works, does
<br/>> > 
<br/>> > > > LXCFS hook into LXC starting process and mount /proc/* files ?
<br/>> > > >
<br/>> > > > That's correct, LXCFS when installed will create a tree at
<br/>> > > > /var/lib/lxcfs those files then get bind-mounted on top of the
<br/>> > > > containers /proc/* files through a LXC startup hook.
<br/>> > > >
<br/>> > > > > Thank you very much again!
<br/>> > > > >
<br/>> > > > > Best,
<br/>> > > > > Martín
<br/>> > > > >
<br/>> > > > > On Wed, May 30, 2018 at 10:52 PM "Stéphane Graber" < ">"Stéphane
<br/>> > Graber"
<br/>> > > > > wrote:
<br/>> > > > >
<br/>> > > > > >
<br/>> > > > > >
<br/>> > > > > >
<br/>> > > > > > _______________________________________________
<br/>> > > > > > lxc-users mailing list
<br/>> > > > > > <a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>
<br/>> > > > > > <a href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a>
<br/>> > > > > >
<br/>> > > > > >
<br/>> > > > > >
<br/>> > > > > > On Wed, May 30, 2018 at 05:08:59PM -0700, Martín Fernández wrote:
<br/>> > > > > > > Hello,
<br/>> > > > > > >
<br/>> > > > > > > We are using LXC to virtualize containers in multiple of our
<br/>> > hosts.
<br/>> > > > We
<br/>> > > > > > have been running with LXC for a while now. 
<br/>> > > > > > >
<br/>> > > > > > > We started adding monitoring tools to our systems and found the
<br/>> > > > known
<br/>> > > > > > issue that LXC containers show the host information on
<br/>> > /proc/meminfo
<br/>> > > > and
<br/>> > > > > > /proc/cpuinfo.  
<br/>> > > > > > >
<br/>> > > > > > > I found that LXCFS solves the problems mentioned above. What
<br/>> > would
<br/>> > > > be
<br/>> > > > > > required to setup LXCFS in my hosts ? Would I need to reboot all
<br/>> > the
<br/>> > > > > > containers ? Do I need to restore my containers filesystem ? Is
<br/>> > there
<br/>> > > > any
<br/>> > > > > > guide/documentation around it ?
<br/>> > > > > > >
<br/>> > > > > > > Thanks before hand!
<br/>> > > > > > >
<br/>> > > > > > > Best,
<br/>> > > > > > > Martín
<br/>> > > > > >
<br/>> > > > > > Hey there,
<br/>> > > > > >
<br/>> > > > > > You should just need to install lxcfs and then any container you
<br/>> > start
<br/>> > > >
<br/>> > > > > > or restart will be using it. There's no way to set it up against a
<br/>> > 
<br/>> > > > > > running container, but there's also no need to restart all your
<br/>> > > > > > containers immediately, you can slowly roll it out if that helps.
<br/>> > > > > >
<br/>> > > > > > And no changes needed to the containers, it gets setup
<br/>> > automatically
<br/>> > > > > > through a lxc hook when the container starts.
<br/>> > > > > >
<br/>> > > > > >
<br/>> > > > > > --
<br/>> > > > > > Stéphane Graber
<br/>> > > > > > Ubuntu developer
<br/>> > > > > > <a href="http://www.ubuntu.com">http://www.ubuntu.com</a>
<br/>> > > > > >
<br/>> > > > > >
<br/>> > > > > >
<br/>> > > >
<br/>> > > > --
<br/>> > > > Stéphane Graber
<br/>> > > > Ubuntu developer
<br/>> > > > <a href="http://www.ubuntu.com">http://www.ubuntu.com</a>
<br/>> > > >
<br/>> > > >
<br/>> > > >
<br/>> > 
<br/>> > --
<br/>> > Stéphane Graber
<br/>> > Ubuntu developer
<br/>> > <a href="http://www.ubuntu.com">http://www.ubuntu.com</a>
<br/>> >
<br/>
<br/>-- 
<br/>Stéphane Graber
<br/>Ubuntu developer
<br/><a href="http://www.ubuntu.com">http://www.ubuntu.com</a>
<br/></blockquote></div></div><br/>