It is prefered to post patches to gerrit.ovirt.org.

On Tue, Oct 01, 2013 at 01:18:25PM +1000, David Gibson wrote:
> At present, if the super vdsm server dies with an exception inside
> Python's multiprocessing module, then it will not usually produce any
> useful debugging output.

For our context - when do you notice such supervdsm deaths?
Is it frequent? What is the cause?

> 
> The multiprocessing module includes error logging using Python's logging
> module, but it is not enabled by default.  This patch enables the
> logging and sets it to propagate to the supervdsmServer's root logger,
> so it now defaults to producing logging and can be configured easily
> from /etc/vdsm/svdsm.logger.conf.
> 
> Signed-off-by: David Gibson <da...@gibson.dropbear.id.au>
> ---
>  vdsm/supervdsmServer | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer
> index 40ec9df..43a408f 100755
> --- a/vdsm/supervdsmServer
> +++ b/vdsm/supervdsmServer
> @@ -42,6 +42,7 @@ except:
>      log.warn("Could not init proper logging", exc_info=True)
>  
>  from storage import fuser
> +import multiprocessing
>  from multiprocessing import Pipe, Process
>  from gluster import listPublicFunctions
>  import storage.misc as misc
> @@ -356,6 +357,9 @@ class _SuperVdsm(object):
>  
>  def main(sockfile, pidfile=None):
>      log = logging.getLogger("SuperVdsm.Server")
> +    # Wire up the multiprocessing logger
> +    mlog = multiprocessing.get_logger()
> +    mlog.propagate = 1

The code seems fine, though I'd avoid the variable

    multiprocessing.get_logger().propagate = 1

Thanks.
_______________________________________________
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel

Reply via email to