bootresources.yaml contains "selections: null"

Bug #1298652 reported by Raphaël Badin
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Julian Edwards

Bug Description

After installing the daily package, /etc/maas/bootresources.yaml contains the following configuration:

# <lots of comments>
boot:
  sources:
  - keyring: /usr/share/keyrings/ubuntu-cloudimage-keyring.gpg
    path: http://maas.ubuntu.com/images/ephemeral-v2/daily/
    selections: null
  storage: /var/lib/maas/boot-resources/

Looks related to the config-rewriting code that landed recently.

The result is that *all* the images published in http://maas.ubuntu.com/images/ephemeral-v2/daily/ are downloaded.

Related branches

Raphaël Badin (rvb)
description: updated
Changed in maas:
milestone: none → 14.04
Revision history for this message
Julian Edwards (julian-edwards) wrote :

I think I found the source of the bug. This code is wrong:

def rewrite_boot_resources_config(config_file):
    """Rewrite the `bootresources.yaml` configuration.

    Supports the `generate_boot_resources_config` upgrade hook.
    """
    tftproot = Config.load_from_cache()['tftp']['root']

tftproot ends up pointing at the *new* tftp area rather than the old one. This is because the default tftp "root" config on pserv.yaml is commented out so it comes from the default schema value which has been updated to the new area.

This highlights a second problem; if someone altered their tftp root and configured it in pserv.yaml, the new boot resources will not be found.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Actually that is a separate bug! I can confirm that when I set tftp root to the old area in pserv.yaml that I see my existing selections wiped out and replaced with:

    selections: null

Revision history for this message
Julian Edwards (julian-edwards) wrote :

I filed it as bug 1298714

Changed in maas:
status: Triaged → In Progress
assignee: nobody → Julian Edwards (julian-edwards)
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.