<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 16 February 2017 at 07:30, Shyam <span dir="ltr"><<a href="mailto:srangana@redhat.com" target="_blank">srangana@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 02/15/2017 08:51 PM, Atin Mukherjee wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
<br>
On Thu, 16 Feb 2017 at 04:09, Jeff Darcy <<a href="mailto:jdarcy@redhat.com" target="_blank">jdarcy@redhat.com</a><br></span><div><div class="gmail-h5">
<mailto:<a href="mailto:jdarcy@redhat.com" target="_blank">jdarcy@redhat.com</a>>> wrote:<br>
<br>
One of the issues that has come up with multiplexing is that all of<br>
the bricks in a process end up sharing a single log file. The<br>
reaction from both of the people who have mentioned this is that we<br>
should find a way to give each brick its own log even when they're<br>
in the same process, and make sure gf_log etc. are able to direct<br>
messages to the correct one. I can think of ways to do this, but it<br>
doesn't seem optimal to me. It will certainly use up a lot of file<br>
descriptors. I think it will use more memory. And then there's the<br>
issue of whether this would really be better for debugging. Often<br>
it's necessary to look at multiple brick logs while trying to<br>
diagnose this problem, so it's actually kind of handy to have them<br>
all in one file. Which would you rather do?<br>
<br>
(a) Weave together entries in multiple logs, either via a script or<br>
in your head?<br>
<br>
(b) Split or filter entries in a single log, according to which<br>
brick they're from?<br>
<br>
To me, (b) seems like a much more tractable problem. I'd say that<br>
what we need is not multiple logs, but *marking of entries* so that<br>
everything pertaining to one brick can easily be found. One way to<br>
do this would be to modify volgen so that a brick ID (not name<br>
because that's a path and hence too long) is appended/prepended to<br>
the name of every translator in the brick. Grep for that brick ID,<br>
and voila! You now have all log messages for that brick and no<br>
other. A variant of this would be to leave the names alone and<br>
modify gf_log so that it adds the brick ID automagically (based on a<br>
thread-local variable similar to THIS). Same effect, other than<br>
making translator names longer, so I'd kind of prefer this<br>
approach. Before I start writing the code, does anybody else have<br>
any opinions, preferences, or alternatives I haven't mentioned yet?<br></div></div></blockquote></blockquote><div><br></div><div><br></div><div><br></div><div>A few questions/thoughts here:</div><div><br></div><div>Debugging will involve getting far more/bigger files from customers unless we have a script (?) to grep out only those messages pertaining to the volume in question. IIUC, this would just be grepping for the volname and then determining which brick each message pertains to based on the brick id, correct? </div><div><br></div><div>Would brick ids remain constant across add/remove brick operations? An easy way would probably be just to use the client xlator number as the brick id which would make it easy to map the brick to client connection.</div><div><br></div><div>With several brick processes all writing to the same log file, can there be problems with interleaving messages? </div><div><br></div><div>Logrotate might kick in faster as well causing us to lose debugging data if only a limited number of files are saved, as all those files would now hold less log data per volume. The logrotate config options would need to be changed to keep more files.<br></div><div><br></div><div>Having all messages for the bricks of the same volume in a single file would definitely be helpful. Still thinking through logging all messages for all bricks in a single file. :)</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5">
</div></div></blockquote>
<br>
(b) is better. Considering centralized logging or log file redirection etc, (a) becomes unnatural and unwieldy, (b) is better.<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
<br>
<br>
I like this idea. +1<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
Gluster-devel mailing list<br></span>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a> <mailto:<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.<wbr>org</a>><span class="gmail-"><br>
<a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/mailm<wbr>an/listinfo/gluster-devel</a><br>
<br>
--<br>
- Atin (atinm)<br>
<br>
<br>
______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/mailm<wbr>an/listinfo/gluster-devel</a><br>
<br>
</span></blockquote><div class="gmail-HOEnZb"><div class="gmail-h5">
______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/mailm<wbr>an/listinfo/gluster-devel</a><br>
</div></div></blockquote></div><br></div></div>