publish_errors won't work at all if log notifier is enabled

Bug #1053422 reported by Russell Bryant
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.messaging
Invalid
Medium
Tiantian Gao

Bug Description

When the publish_errors option is enabled, it will not work if the log notifier is enabled. The logic should be that this code doesn't run *only* for the log notifier. It should still work for all other notifiers if more than one is configured. Right now if multiple are configured and the log notifier is one of them, this feature doesn't work.

class PublishErrorsHandler(logging.Handler):
    def emit(self, record):
        if ('openstack.common.notifier.log_notifier' in
            CONF.notification_driver):
            return
        notifier.api.notify(None, 'error.publisher',
                            'error_notification',
                            notifier.api.ERROR,
                            dict(error=record.msg))

Note that publish_errors is broken for other reasons, too: https://bugs.launchpad.net/nova/+bug/1023573

Mark McLoughlin (markmc)
affects: openstack-common → oslo
Revision history for this message
Mark McLoughlin (markmc) wrote :

For reference, the check was added originally by: https://review.openstack.org/4450

Changed in oslo:
status: New → Incomplete
status: Incomplete → Confirmed
importance: Undecided → Medium
Jon Grimm (jgrimm)
Changed in oslo:
assignee: nobody → Jon Grimm (jgrimm)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

Fix proposed to branch: master
Review: https://review.openstack.org/58073

Changed in oslo:
status: Confirmed → In Progress
affects: oslo-incubator → oslo.messaging
Mehdi Abaakouk (sileht)
Changed in oslo.messaging:
assignee: Jon Grimm (jgrimm) → nobody
status: In Progress → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.messaging (master)

Fix proposed to branch: master
Review: https://review.openstack.org/168574

Changed in oslo.messaging:
assignee: nobody → Tiantian Gao (gtt116)
status: Triaged → In Progress
Changed in oslo.messaging:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on oslo.messaging (master)

Change abandoned by Tiantian Gao (<email address hidden>) on branch: master
Review: https://review.openstack.org/168574

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.