<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:10pt;color:#000000;background-color:#FFFFFF;font-family:'Courier New',monospace;">
<p><a href="http://www.stacktach.com/about.html#enabling" title="http://www.stacktach.com/about.html#enabling
Ctrl+Click or tap to follow the link">http://www.stacktach.com/about.html#enabling</a><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Eduard Matei <eduard.matei@cloudfounders.com><br>
<b>Sent:</b> Thursday, April 16, 2015 6:04 AM<br>
<b>To:</b> OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b> [openstack-dev] [nova][oslo_messaging]Enabling notifications from nova</font>
<div> </div>
</div>
<div>
<div dir="ltr"><br clear="all">
<div><br>
</div>
Hi,
<div><br>
</div>
<div>I've been trying to enable nova notifications on various actions, but nothing is actually sent.</div>
<div>I found the cause in the _notify method of /usr/local/lib/python2.7/dist-packages/oslo_messaging/notify/notifier.py.</div>
<div>There it performs a check "if self._driver_mgr.extensions" which always returns False.</div>
<div>I removed the check and i found the following traceback in n-api:</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>2015-04-16 10:58:17.955 ERROR nova.notifications [req-2909db4c-30f4-4278-8472-ec5c9440778f admin admin] [instance: a902da95-6b42-4f71-a55e-818c1d02c05</div>
<div>f] Failed to send state update notification</div>
<div>2015-04-16 10:58:17.955 TRACE nova.notifications [instance: a902da95-6b42-4f71-a55e-818c1d02c05f] Traceback (most recent call last):</div>
<div>2015-04-16 10:58:17.955 TRACE nova.notifications [instance: a902da95-6b42-4f71-a55e-818c1d02c05f] File "/opt/stack/nova/nova/notifications.py", line</div>
<div> 151, in send_update</div>
<div>2015-04-16 10:58:17.955 TRACE nova.notifications [instance: a902da95-6b42-4f71-a55e-818c1d02c05f] old_display_name=old_display_name)</div>
<div>2015-04-16 10:58:17.955 TRACE nova.notifications [instance: a902da95-6b42-4f71-a55e-818c1d02c05f] File "/opt/stack/nova/nova/notifications.py", line</div>
<div> 253, in _send_instance_update_notification</div>
<div>2015-04-16 10:58:17.955 TRACE nova.notifications [instance: a902da95-6b42-4f71-a55e-818c1d02c05f] 'compute.instance.update', payload)</div>
<div>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_</div>
<div>messaging/notify/notifier.py", line 231, in info</div>
<div>2015-04-16 10:58:17.955 TRACE nova.notifications [instance: a902da95-6b42-4f71-a55e-818c1d02c05f] self._notify(ctxt, event_type, payload, 'INFO')</div>
<div>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_</div>
<div>messaging/notify/notifier.py", line 313, in _notify</div>
<div>2015-04-16 10:58:17.955 TRACE nova.notifications [instance: a902da95-6b42-4f71-a55e-818c1d02c05f] super(_SubNotifier, self)._notify(ctxt, event_ty</div>
<div>pe, payload, priority)</div>
<div>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_</div>
<div>messaging/notify/notifier.py", line 186, in _notify</div>
<div>2015-04-16 10:58:17.955 TRACE nova.notifications [instance: a902da95-6b42-4f71-a55e-818c1d02c05f] self._driver_mgr.map(do_notify)</div>
<div>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</div>
<div>dore/extension.py", line 221, in map</div>
<div>2015-04-16 10:58:17.955 TRACE nova.notifications [instance: a902da95-6b42-4f71-a55e-818c1d02c05f] raise RuntimeError('No %s extensions found' % se</div>
<div>lf.namespace)</div>
<div>2015-04-16 10:58:17.955 TRACE nova.notifications [instance: a902da95-6b42-4f71-a55e-818c1d02c05f] RuntimeError: No oslo.messaging.notify.drivers exten</div>
<div>sions found</div>
<div>2015-04-16 10:58:17.955 TRACE nova.notifications [instance: a902da95-6b42-4f71-a55e-818c1d02c05f] </div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Looking in oslo directory and trying to import that module (oslo.messaging.notify.drivers) but no success, that module doesn't exist.</div>
<div><br>
</div>
<div>Anyone knows how to enable the notifications ?</div>
<div><br>
</div>
<div>I found also in the Notifier __init__ the following:</div>
<div><br>
</div>
<div>
<div> self._driver_mgr = named.NamedExtensionManager(</div>
<div> 'oslo.messaging.notify.drivers',</div>
</div>
<div><br>
</div>
<div>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).</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Eduard</div>
<div><br>
</div>
</div>
</div>
</div>
</body>
</html>