AlertEngine Jabber plugin crashes on missing config

Bug #330436 reported by Morten Brekkevold
2
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
Medium
Thomas Adamcik

Bug Description

As reported in bug 330426, AlertEngine will spew out error messages in its logs and via email when a plugin raises an unhandled exception.

The Jabber plugin will raise such an exception if a originating JID hasn't been configured in alertengine.conf:

[2009-02-17 09:24:59,224] [ERROR] [pid=15877 nav.alertengine] Unhandeled error from Jabber
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/nav/models/profiles.py", line 255, in send
    self.type.send(self, alert, language=lang, type=type)
  File "/usr/lib/python2.4/site-packages/nav/models/profiles.py", line 287, in send
    self.handler_instance = getattr(module, self.handler)(config=AlertSender.config.get(self.handler, {}))
  File "/usr/lib/python2.4/site-packages/nav/alertengine/dispatchers/jabber_dispatcher.py", line 45, in __init__
    self.connect()
  File "/usr/lib/python2.4/site-packages/nav/alertengine/dispatchers/jabber_dispatcher.py", line 85, in connect
    self.jid = xmpp.protocol.JID(self.config['jid'])
KeyError: 'jid'

Plugins should check their config at startup, and be disabled for the remainder of the process life if found to not be configured properly.

Tags: alertengine
Changed in nav:
assignee: nobody → adamcik
importance: Undecided → Medium
milestone: none → v3.5.1
status: New → Confirmed
Thomas Adamcik (adamcik)
Changed in nav:
status: Confirmed → In Progress
Revision history for this message
Thomas Adamcik (adamcik) wrote :
Changed in nav:
status: In Progress → Fix Committed
Changed in nav:
status: Fix Committed → Fix Released
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.