nova logs everything to syslog twice

Bug #884863 reported by Ewan Mellor
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Ewan Mellor
Diablo
Fix Released
Undecided
Unassigned

Bug Description

When use_syslog is true, nova logs everything to syslog twice. This is because the syslog handler is registered twice, because log.setup() does a first initialization, and then calls reset(), which does everything again.

Revision history for this message
Ewan Mellor (ewanmellor) wrote :
Changed in nova:
status: New → In Progress
assignee: nobody → Ewan Mellor (ewanmellor)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/1235
Committed: http://github.com/openstack/nova/commit/a807c57f5b61cb25a6f5c140a97ed744ab0a70dd
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit a807c57f5b61cb25a6f5c140a97ed744ab0a70dd
Author: Ewan Mellor <email address hidden>
Date: Tue Nov 1 11:54:59 2011 -0700

    Bug 884863: nova logs everything to syslog twice

    Fix double-registration of the syslog handler.
    NovaRootLogger.setup_from_flags is called twice from log.setup() -- once
    through NovaRootLogger.__init__ and once through reset(). setup_from_flags
    wasn't idempotent, so this resulted in the syslog handler being registered
    twice.

    Rather than fix the twisty-turny maze that is setup(), I've opted to make
    setup_from_flags idempotent in this regard, by always unregistering the
    syslog handler before doing anything else.

    Change-Id: I59ad61751e1a19d2cbb73dc1deea9c708d4c5032

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (stable/diablo)

Reviewed: https://review.openstack.org/1668
Committed: http://github.com/openstack/nova/commit/a5e0dee1500a08d335621ebdc1506dad271b9130
Submitter: Jenkins
Branch: stable/diablo

 tag in-stable-diablo
 done

commit a5e0dee1500a08d335621ebdc1506dad271b9130
Author: Ewan Mellor <email address hidden>
Date: Tue Nov 1 11:54:59 2011 -0700

    Bug 884863: nova logs everything to syslog twice

    Fix double-registration of the syslog handler.
    NovaRootLogger.setup_from_flags is called twice from log.setup() -- once
    through NovaRootLogger.__init__ and once through reset(). setup_from_flags
    wasn't idempotent, so this resulted in the syslog handler being registered
    twice.

    Rather than fix the twisty-turny maze that is setup(), I've opted to make
    setup_from_flags idempotent in this regard, by always unregistering the
    syslog handler before doing anything else.

    (cherry picked from commit a807c57f5b61cb25a6f5c140a97ed744ab0a70dd)

    Change-Id: I59ad61751e1a19d2cbb73dc1deea9c708d4c5032

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Ewan, or anyone else affected,

Accepted nova into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-1 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.