On 10/01/2013 09:00 AM, Dan Kenigsberg wrote:
> It is prefered to post patches to gerrit.ovirt.org.

Apologies for jumping in David but I've pushed this here for now :

http://gerrit.ovirt.org/19741

> 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?

BZ#1011661 & BZ#1010030 downstream.

>>
>> 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
> 


-- 

Lee Yarwood
Senior Software Maintenance Engineer
Red Hat UK Ltd
200 Fowler Avenue, Farnborough Business Park, Farnborough, Hants GU14 7JP

Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham (US), Paul Hickey (Ireland), Matt Parson
(US), Charles Peters (US)

GPG fingerprint : A5D1 9385 88CB 7E5F BE64  6618 BCA6 6E33 F672 2D76
_______________________________________________
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel

Reply via email to