[2.1] Deleting all boot sources and creating a new boot source, does not update the cache

Bug #1636992 reported by Blake Rouse
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Lee Trager

Bug Description

This is a really bad check:

def is_first_run(sender, instance, *args, **kwargs):
    """Store whether or not this is the first BootSource added to MAAS.

    On first run the ImportResourceService sets the default BootSource then
    caches the stream's contents as normal. Setting the default BootSource
    triggers this signal. This prevents updating the cache twice.
    """
    instance.__is_first_run = BootSource.objects.count() == 0

This makes it so if you deleted all boot sources then create a new source the cache will not be updated. This prevents the ability to make any selections as MAAS thinks the source has no items. This is only an issue with the API and something I am running into with meta-MAAS.

Related branches

Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
assignee: nobody → Lee Trager (ltrager)
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.