Gadget snap default config values don't work reliably

Bug #1673815 reported by Tony Espy
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Fix Released
High
Samuele Pedroni

Bug Description

Default settings of snap inside gadget can't work

Currently, gadget includes the following default settings:
1. wifi-ap - automatic-setup.disable: true
2. udisks2 - automount.enable: true

When we tested the latest image to verify the default settings from gadget, the result was that values weren't set correctly, even also base image. So it suspects there's a race condition to happen this case.

This is being reported as of snapd version 2.23.1.

Tags: ce
Revision history for this message
Tony Espy (awe) wrote :

Changing this to Confirmed, as we actually had to implement a workaround via the first boot hook due to this bug.

Changed in snapd:
status: New → Confirmed
Tony Espy (awe)
tags: added: hwe
Revision history for this message
Simon Fels (morphis) wrote :

I've already spoken with Samuele about this. This is not in general broken. If default configuration is present in the gadget snap is used and correctly applied. However this isn't true when a device is booted the first time and the seed is exercise. There is no ordering for seeded snaps yet so the gadget snap is not taken first and default configuration extracted and applied for all subsequently installed snaps. See https://github.com/snapcore/snapd/blob/master/overlord/snapstate/snapstate.go#L223 for more details on this.

Revision history for this message
Renat (renat2017) wrote :

Hi!

I confirm that it doesn't work for us too.

For our rabpberrypis we use:

defaults:
  core:
    pi-config.gpu-mem: 512
    pi-config.gpu-mem-256: 128
    pi-config.gpu-mem-512: 256
    pi-config.hdmi-drive: 0
    pi-config.hdmi-force-hotplug: 1
    pi-config.hdmi-group: 0
    pi-config.hdmi-mode: 0
    pi-config.framebuffer-depth: 32
    pi-config.framebuffer-height: 0
    pi-config.framebuffer-ignore-alpha: 1
    pi-config.framebuffer-width: 0

settings to setup our node on the first boot. That's important because if we don't set gpu_mem correctly on the first boot - on the second boot our soft won't work.

We supply a default config for pi in our gadget snap, but it's overridden during the first boot.

Revision history for this message
Samuele Pedroni (pedronis) wrote :

renat: notice that even once fixed you need to use the snap-id of core, not "core" in the defaults key

Changed in snapd:
assignee: nobody → Samuele Pedroni (pedronis)
status: Confirmed → In Progress
Revision history for this message
Samuele Pedroni (pedronis) wrote :

working on fixing this

Tony Espy (awe)
tags: added: ce
removed: hwe
Revision history for this message
Samuele Pedroni (pedronis) wrote :

a fix has landed and should be in 2.27

Changed in snapd:
importance: Undecided → High
status: In Progress → Fix Committed
Changed in snapd:
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.