register_mac_type is called from the module level

Bug #1215446 reported by Jeroen T. Vermeulen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Jeroen T. Vermeulen

Bug Description

(At the time of writing, this code has not actually landed yet: https://code.launchpad.net/~jtv/maas/router-macs/+merge/181480 )

This call is necessary on program startup, but it needs a database connection. Very impolite to do that from the module level — it'll try to connect to the database even when parsing the module, as typically happens during lint checks.

I suppose we could call it during start_up() instead. Tests may need a separate call.

Tags: tech-debt

Related branches

Changed in maas:
assignee: nobody → Jeroen T. Vermeulen (jtv)
status: Triaged → In Progress
milestone: none → 13.10
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
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.