summaryrefslogtreecommitdiffstats
path: root/nova/log.py
diff options
context:
space:
mode:
authorAndrew Bogott <abogott@wikimedia.org>2012-04-26 13:54:08 -0500
committerAndrew Bogott <abogott@wikimedia.org>2012-05-02 15:37:32 -0500
commit2dcd8256662115e6528c2b784c08c5724c8227e8 (patch)
tree79815b17864a7d04eba0b0ba14e7838c7dabebc9 /nova/log.py
parent1d97b77ea4c31f1fb17bc20cc4c16a3f6edf2cf1 (diff)
downloadnova-2dcd8256662115e6528c2b784c08c5724c8227e8.tar.gz
nova-2dcd8256662115e6528c2b784c08c5724c8227e8.tar.xz
nova-2dcd8256662115e6528c2b784c08c5724c8227e8.zip
Pass context to notification drivers when we can.
Note that previously several notification drivers created an admin context and embedded it in their messages. Those drivers now use the passed-in context instead if it's available. For blueprint novaplugins. Change-Id: Icb89030256022d0a68db4a147611fd37fe83316a
Diffstat (limited to 'nova/log.py')
-rw-r--r--nova/log.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/log.py b/nova/log.py
index acd3ba56e..268f12f33 100644
--- a/nova/log.py
+++ b/nova/log.py
@@ -283,8 +283,10 @@ class PublishErrorsHandler(logging.Handler):
if 'list_notifier_drivers' in FLAGS:
if 'nova.notifier.log_notifier' in FLAGS.list_notifier_drivers:
return
- nova.notifier.api.notify('nova.error.publisher', 'error_notification',
- nova.notifier.api.ERROR, dict(error=record.msg))
+ nova.notifier.api.notify(None, 'nova.error.publisher',
+ 'error_notification',
+ nova.notifier.api.ERROR,
+ dict(error=record.msg))
def handle_exception(type, value, tb):