Default zone can not be renamed

Bug #2055009 reported by Jacopo Rota
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Jacopo Rota

Bug Description

Resurrecting bug https://bugs.launchpad.net/maas/+bug/1381125 .

A user can

- create a zone `test`
- rename the default zone to `my_new_default`
- delete the zone `test`
=> a new `default` zone gets created.

Meaning that it's not possible to rename the `default` zone as it's possible to trigger the creation of it in multiple ways.

### More info abut the bug

In multiple places there is a call to https://github.com/maas/maas/blob/dbd701455fa1045d7fbab45e4fc1daa139e4c6cb/src/maasserver/models/zone.py#L29 which can recreate the 'default' zone in case no zone with name `default` exists

Related branches

Jacopo Rota (r00ta)
Changed in maas:
milestone: none → 3.5.0
Revision history for this message
Jacopo Rota (r00ta) wrote :

I think the main conceptual issue here is that we are identifying the "default" zone by name. We should identify it in another unique way, which could be with another table with a FK or with a new column "is_default"

Changed in maas:
importance: High → Medium
Jacopo Rota (r00ta)
Changed in maas:
status: Triaged → In Progress
assignee: nobody → Jacopo Rota (r00ta)
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 3.5.0 → 3.5.0-beta1
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.