[sheepdog] [PATCH] add INFO level operation logging on each node.

Matsuo Yoshinori ml.yosinori at gmail.com
Fri Jan 31 05:31:29 CET 2014


Hitoshi & I discussed again.

We have an another future idea that adds context id in the log message to
trace easily.

i.e.
dog command logs:
    Jan 31 13:19:34 sheep-01-00 sheepdog admin operation[1998]: dog cluster
format, context=c-aaaa

sheep process logs:
   Jan 31 13:19:34  INFO [main] rx_main(770) req=0x7f8c500008c0, fd=31,
client=127.0.0.1:46608, op=MAKE_FS, data=plain, context=c-aaaa
   Jan 31 13:19:34  INFO [main] tx_main(770) req=0x7f8c500008c0, fd=31,
client=127.0.0.1:46608, op=MAKE_FS, result=00, context=c-aaaa

where context=c-aaaa is some uniqe string or timestamp.

It works like NDC(Nested Diagnostic Context. we are not focused on "nested"
though.) feature in log4j.
We can correct with tools such as syslogd and fluentd.
And then we can analyze the operation and troubles with grepped by context.
We are also trying to use tools like fluentd for helping our practical
operatin.

So, I would like you to think both dog and sheep logging functions as first
step of it.

Thanks,
Yoshi


2014-01-24 MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>:

> At Fri, 24 Jan 2014 12:53:15 +0900,
> Matsuo Yoshinori wrote:
> >
> > Wrapping dog command can also solve dog logging,
> > but dog command may be called directory especially in the small cluster.
> > And it's simpler that having a logging function in dog command
> > than writing log on every wrapper scripts, isn't it?
>
> What you guys have to do is only to create one wrapper.  E.g.
>
>  1. Create ~/bin/dog as follows
>
>     ==
>     #!/bin/bash
>
>     logger begin dog $*
>     /usr/sbin/dog $*
>     logger end dog $*
>     ==
>
>  2. Make users use ~/bin/dog instead of /usr/sbin/dog.  You can do it
>     easily by changing your PATH order.
>
> No need to change any other things at all.  I don't think logging in
> dog is simpler than this.  Am I missing something?
>
> Thanks,
>
> Kazutaka
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20140131/fb8c3d53/attachment-0004.html>


More information about the sheepdog mailing list