Consider removing transaction in claim_static_ip_addresses().

Bug #1379370 reported by Jason Hobbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Julian Edwards

Bug Description

It's not clear to me that this transaction needs to be here since claim_static_ip_addresses() doesn't allocate IP addresses across multiple interfaces. This needs to be looked at some more when there is more time.

Tags: tech-debt

Related branches

Revision history for this message
Gavin Panella (allenap) wrote :

The use of transaction.atomic() in there is under the assumption that we're already within a transaction. It should only be creating a savepoint on entry, and rolling back to it if there's an exception on exit. Django defines this behaviour when using atomic() within a transaction, iirc.

Also, claim_static_ip_addresses() *does* allocate addresses for multiple interfaces. Using a savepoint here means we get all-or-nothing behaviour.

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

It doesn't allocate addresses for multiple interfaces anymore - I just landed a branch that references this bug as an XXX.

Changed in maas:
status: New → Triaged
importance: Undecided → High
milestone: none → next
tags: added: tech-debt
Christian Reis (kiko)
Changed in maas:
milestone: next → 1.7.1
Changed in maas:
assignee: nobody → Julian Edwards (julian-edwards)
status: Triaged → In Progress
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.