macwatch AttributeError when attempting to post events under NAV 4.3.0

Bug #1464660 reported by Morten Brekkevold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
High
Morten Brekkevold

Bug Description

Under NAV 4.3.0, when the macwatch cron job tries to post an event about a watched mac, it crashes with a Python AttributeError, which is mailed back to the admin through crond.

It appears the problem is that the event posting code tries to extract a deviceid from a Netbox, which is no longer possible under the new db schema in NAV 4.3.

Traceback example:

Traceback (most recent call last):
  File "/usr/lib/nav/macwatch.py", line 263, in <module>
    main()
  File "/usr/lib/nav/macwatch.py", line 247, in main
    if post_event(mac_watch, cam, logger):
  File "/usr/lib/nav/macwatch.py", line 103, in post_event
    deviceid=cam.netbox.device_id,
AttributeError: 'Netbox' object has no attribute 'device_id'

Tags: macwatch
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :
Changed in nav:
milestone: none → 4.3.1
status: In Progress → Fix Released
status: Fix Released → 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.