<img style="border: none; background:none; width: 0; height: 0;" src="https://share.polymail.io/v2/z/a/NWIxNmUxNTY0Y2Zj/MDHLmmj_I23dConoGZ4FLKzp-Ji0nBDMJIsEwDdMwQDVvNAa5KHXa0ri4Mym-EPrBGrtwoxTHesUIYC83Oeb8LW9sRZzTsAseg_ZyCITUUpWWL92vFRViV9JIhGtUl9Rzf7hzO8XUh3IGfaw4F-3ZhmfLz2Ubvq2ZB0nbrrA.png" alt="" width="0px" height="0px" border="0" /><div></div>
<div>
Stéphane,</div><div><br></div><div>I think this could be the issue in the configuration:</div><div><br></div><div>```</div><div><div># Container specific configuration</div><div>lxc.rootfs = /dev/Main/app1-dev</div><div>lxc.mount = /var/lib/lxc/app1-dev/fstab</div><div>lxc.utsname = app1-dev</div><div>lxc.arch = amd64</div><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:14 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>/var/lib/lxc/<name>/config for the container you're testing things with.
<br/>
<br/>
</name></p><br/>On Tue, Jun 05, 2018 at 12:09:52PM -0700, Martín Fernández wrote:
<br/>> Stéphane,
<br/>>
<br/>> Not sure what configuration file you are talking about. Configuration file under /etc/lxc/default.conf looks like this:
<br/>>
<br/>> ```
<br/>> lxc.network.type = veth
<br/>> <a href="http://lxc.network.link">lxc.network.link</a> = br0
<br/>> lxc.network.flags = up
<br/>> lxc.network.hwaddr = XXXXX
<br/>> ```
<br/>>
<br/>> Any lxc-* command that I could use to introspect the containers and get more information to troubleshoot ?
<br/>>
<br/>> Thanks again!
<br/>>
<br/>> Best,
<br/>> Martín
<br/>>
<br/>> On Tue, Jun 05, 2018 at 4:05 PM "Stéphane Graber" < ">"Stéphane Graber" > wrote:
<br/>>
<br/>> >
<br/>> >
<br/>> >
<br/>> > 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/>> >
<br/>> >
<br/>> >
<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
<br/>> > 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"
<br/>> > > 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/>> >
<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
<br/>> > when
<br/>> > > > running `free` for example.
<br/>> > > > >
<br/>> > > > > lxc-info shows 1GB of memory usage and `free` shows 24GB of memory
<br/>> > usage
<br/>> > > > which is the same as the host memory usage. Anything I could be
<br/>> > 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
<br/>> > 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
<br/>> > super
<br/>> > > > easy
<br/>> > > > > > to start using it. Is there any constraint in terms of what
<br/>> > 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/>> >
<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/>> >
<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,
<br/>> > 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/>> >
<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
<br/>> > wrote:
<br/>> > > > > > > > > Hello,
<br/>> > > > > > > > >
<br/>> > > > > > > > > We are using LXC to virtualize containers in multiple of our
<br/>> >
<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
<br/>> > 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/>> >
<br/>> > > > would
<br/>> > > > > > be
<br/>> > > > > > > > required to setup LXCFS in my hosts ? Would I need to reboot
<br/>> > all
<br/>> > > > the
<br/>> > > > > > > > containers ? Do I need to restore my containers filesystem ?
<br/>> > 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
<br/>> > you
<br/>> > > > start
<br/>> > > > > >
<br/>> > > > > > > > or restart will be using it. There's no way to set it up
<br/>> > against a
<br/>> > > >
<br/>> > > > > > > > running container, but there's also no need to restart all
<br/>> > your
<br/>> > > > > > > > containers immediately, you can slowly roll it out if that
<br/>> > 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/>> >
<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/>