<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Well disabling kernel logging in system containers worked fine for me. Only the rsyslog instance on the host should log kernel messages. If several rsyslog
 instances read the kernel log the result will be … garbled<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">See man proc & kmsg where it clearly states that only one process should read that data source.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">/Hans<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> lxc-users [mailto:lxc-users-bounces@lists.linuxcontainers.org]
<b>On Behalf Of </b>Yannick Barbeaux<br>
<b>Sent:</b> den 29 oktober 2014 13:35<br>
<b>To:</b> LXC users mailing-list<br>
<b>Subject:</b> Re: [lxc-users] upgrade to LXC 1.0.6 : segfault<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Sorry to say so but I am very doubtful about the fact that lxc does not have anything to do with the garbled logs problem.<o:p></o:p></p>
</div>
<p class="MsoNormal">I have been using Debian servers (with or without xen) for many years and it is the first time I face such issues.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
One relevant example is that my guest domain has iptables rules and logs dropped packets.
<br>
The logging rule is:<br>
<span style="font-family:"Courier New"">iptables -A OUTPUT -j LOG --log-prefix " dropped by firewall (OUTPUT) "</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">so I find the following lines in kern.log: (when not garbled)<br>
<br>
<span style="font-family:"Courier New"">Oct 29 12:22:31 myhost kernel: [68725.452738]  dropped by firewall (OUTPUT)IN= OUT=eth0 SRC=ip_address DST=ip_address LEN=109 TOS=0x00 PREC=0x00 TTL=255 ID=5689 DF PROTO=41
</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I discovered that I have similar lines in the kern.log of my containers while they have absolutely no iptables rules:<br>
<br>
<span style="font-family:"Courier New"">Oct 29 13:10:04 localhost kernel: [71575.889092]  dropped by firewall (OUTPUT)IN= OUT=eth0 SRC=ip_address DST=ip_address LEN=116 TOS=0x00 PREC=0x00 TTL=255 ID=7628 DF PROTO=41
</span><br>
<br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">As suggested <a href="https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1003888">
here</a>, I added the following lines in my containers conf file:<br>
<br>
<o:p></o:p></p>
<p><span style="font-family:"Courier New"">lxc.cap.drop = sys_module mac_admin syslog</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">but that did not help.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Commenting out/removing the line including “$ModLoad imklog” in /etc/rsyslog.conf as suggested is not an option since I need the
 logging possibilities.</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Any help is greatly appreciated.<br>
<br>
Thank you.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Yannick<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 28 October 2014 06:45, Hans Feldt <<a href="mailto:hans.feldt@ericsson.com" target="_blank">hans.feldt@ericsson.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Regarding garbled logs, you should disable kernel logging in the guest by commenting out/removing
 the line including “$ModLoad imklog” in /etc/rsyslog.conf</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hans</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> lxc-users [mailto:<a href="mailto:lxc-users-bounces@lists.linuxcontainers.org" target="_blank">lxc-users-bounces@lists.linuxcontainers.org</a>]
<b>On Behalf Of </b>Yannick Barbeaux<br>
<b>Sent:</b> den 27 oktober 2014 17:08<br>
<b>To:</b> <a href="mailto:lxc-users@lists.linuxcontainers.org" target="_blank">lxc-users@lists.linuxcontainers.org</a><br>
<b>Subject:</b> [lxc-users] upgrade to LXC 1.0.6 : segfault</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">Hi everyone,<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">my first post in the LXC world!<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">I have been using LXC 1.0.3 on debian wheezy for a few months now and everything worked fine, except that the kern.log (and thus syslog too) on "Dom0" was garbled as soon as I started
 any container : <o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">example:<br>
<span style="font-family:"Courier New"">Oct 27 16:19:51 myserver kernel: rl(NU)I=r.0 U=MC0:05:00:1f:ac:1e:60:0SC0000DT24001LN3 O=x0PE=x0TL1I= FPOO2<br>
Oct 27 16:19:53 myserver kernel: 91845] rpe yfrwl IPT Nb012OT A=10:e0:00:e5:86:88:80 R=... S=2... E=2TS00 RC0C T= D0D RT=  2.233 rp  ra NTIb.4U C10e001ece20480R0. =..E2S0R0 =DDR=4>[  922.837874]  dropped by firewall (INPUT) IN=br0105 OU=MC0:05:00:16:09:99:f0:0SC0000DT=2...
 E=2TS00 RC0C T= D0D RT= ==x0PE=x0TL1I= FPOO2</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">it seems that various processes write at the same time in the logs and thus it is totally messy.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">I thought that upgrading to LXC 1.0.6 could solve that issue. I downloaded the sources and compiled the new version with python enabled.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The real problems started with that new version: after rebooting, the containers would simply not start (<span style="font-family:"Courier New"">lxc-start -d -n p1
</span>does not do anything, nothing in the logs either). After investigations, I found out that the link to the liblxc pointed to the
<span style="font-family:"Courier New"">liblxc.so.1.1.0.alpha1.</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">After deleting the symbolic link and recreating it to point to
<span style="font-family:"Courier New"">liblxc.so.1.0.6,</span><span style="font-family:"Arial","sans-serif""> I was able to launch the containers successfully but unfortunately, one of the command I used the most,
</span><span style="font-family:"Courier New"">lxc-ls --fancy </span><span style="font-family:"Arial","sans-serif"">was broken (Segmentation fault). Same issue for the
</span><span style="font-family:"Courier New"">lxc-autostart</span><span style="font-family:"Arial","sans-serif""> command.</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial","sans-serif"">Furthermore, after each reboot, the link to the alpha1 version of the lib is automatically recreated so before launching the containers,
 I have to execute those commands to recreate the correct link:<br>
</span><span style="font-family:"Courier New"">rm /usr/local/lib/liblxc.so.1<br>
ln -s /usr/local/lib/liblxc.so.1.0.6 /usr/local/lib/liblxc.so.1</span><o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">And guess what, with the v1.0.6, my kern.log and syslog are still garbled so the upgrade was definitely not efficient in my case.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">To sum up, since the upgrade, I face the following issues:<br>
- garbled logs on "Dom0" (same issue as with v1.0.3)<br>
- link to the liblxc.so.1.1.0alpha is recreated at each system startup (and implies that I cannot launch my containers)<br>
- lxc-ls --fancy and lxc-autostart not working anymore<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">Any help on this would be really appreciated.<br>
<br>
Thanks<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Yannick<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><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" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>