[openstack-dev] [nova][oslo_messaging]Enabling notifications from nova

Eduard Matei eduard.matei at cloudfounders.com
Thu Apr 16 09:04:15 UTC 2015


Hi,

I've been trying to enable nova notifications on various actions, but
nothing is actually sent.
I found the cause in the _notify method
of /usr/local/lib/python2.7/dist-packages/oslo_messaging/notify/notifier.py.
There it performs a check "if self._driver_mgr.extensions" which always
returns False.
I removed the check and i found the following traceback in n-api:


2015-04-16 10:58:17.955 ERROR nova.notifications
[req-2909db4c-30f4-4278-8472-ec5c9440778f admin admin] [instance:
a902da95-6b42-4f71-a55e-818c1d02c05
f] Failed to send state update notification
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f] Traceback (most recent call last):
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f]   File
"/opt/stack/nova/nova/notifications.py", line
 151, in send_update
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f]     old_display_name=old_display_name)
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f]   File
"/opt/stack/nova/nova/notifications.py", line
 253, in _send_instance_update_notification
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f]     'compute.instance.update',
payload)
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f]   File
"/usr/local/lib/python2.7/dist-packages/oslo_
messaging/notify/notifier.py", line 231, in info
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f]     self._notify(ctxt, event_type,
payload, 'INFO')
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f]   File
"/usr/local/lib/python2.7/dist-packages/oslo_
messaging/notify/notifier.py", line 313, in _notify
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f]     super(_SubNotifier,
self)._notify(ctxt, event_ty
pe, payload, priority)
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f]   File
"/usr/local/lib/python2.7/dist-packages/oslo_
messaging/notify/notifier.py", line 186, in _notify
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f]     self._driver_mgr.map(do_notify)
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f]   File
"/usr/local/lib/python2.7/dist-packages/steve
dore/extension.py", line 221, in map
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f]     raise RuntimeError('No %s
extensions found' % se
lf.namespace)
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f] RuntimeError: No
oslo.messaging.notify.drivers exten
sions found
2015-04-16 10:58:17.955 TRACE nova.notifications [instance:
a902da95-6b42-4f71-a55e-818c1d02c05f]



Looking in oslo directory and trying to import that module
(oslo.messaging.notify.drivers) but no success, that module doesn't exist.

Anyone knows how to enable the notifications ?

I found also in the Notifier __init__ the following:

 self._driver_mgr = named.NamedExtensionManager(
            'oslo.messaging.notify.drivers',

What should i put there so that the extensions can be loaded ? ( i tried
with oslo.messaging._drivers but same error: No oslo.messaging._drivers
extensions found).

Thanks,
Eduard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150416/49eaca87/attachment.html>


More information about the OpenStack-dev mailing list