ubuntu-snappy.firstboot fails when oem snap contains preinstalled snap

Bug #1511435 reported by Simon Eisenmann
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Critical
John Lenton

Bug Description

sudo systemctl status ubuntu-snappy.firstboot.service -l
● ubuntu-snappy.firstboot.service - Run snappy firstboot setup
   Loaded: loaded (/lib/systemd/system/ubuntu-snappy.firstboot.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2015-10-29 15:26:16 UTC; 4min 0s ago
  Process: 808 ExecStart=/usr/bin/snappy firstboot (code=exited, status=1/FAILURE)
 Main PID: 808 (code=exited, status=1/FAILURE)

Oct 29 15:26:15 localhost.localdomain systemd[1]: Starting Run snappy firstboot setup...
Oct 29 15:26:16 localhost.localdomain snappy[808]: config failed with: 'aa-exec: ERROR: profile 'spreed-webrtc.sideload_snappy-config_IENQKIBcWPBJ' does not exist
Oct 29 15:26:16 localhost.localdomain snappy[808]: ' (exit status 1)
Oct 29 15:26:16 localhost.localdomain systemd[1]: ubuntu-snappy.firstboot.service: main process exited, code=exited, status=1/FAILURE
Oct 29 15:26:16 localhost.localdomain systemd[1]: Failed to start Run snappy firstboot setup.
Oct 29 15:26:16 localhost.localdomain systemd[1]: Unit ubuntu-snappy.firstboot.service entered failed state.
Oct 29 15:26:16 localhost.localdomain systemd[1]: ubuntu-snappy.firstboot.service failed.

This happens on the first boot of the created image with u-d-f build with an OEM snap which contains preinstalled: spreed-webrtc

Revision history for this message
Simon Eisenmann (longsleep) wrote :

Seen on 15.04/stable (armhf)

Revision history for this message
Simon Eisenmann (longsleep) wrote :

Same problem with 15.04/edge

John Lenton (chipaca)
Changed in snappy:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Joachim Bauch (fancycode) wrote :

Also happens with non-sideloaded snaps:

● ubuntu-snappy.firstboot.service - Run snappy firstboot setup
   Loaded: loaded (/lib/systemd/system/ubuntu-snappy.firstboot.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2015-10-30 11:13:25 UTC; 1min 6s ago
  Process: 806 ExecStart=/usr/bin/snappy firstboot (code=exited, status=1/FAILURE)
 Main PID: 806 (code=exited, status=1/FAILURE)

Oct 30 11:13:24 localhost.localdomain systemd[1]: Starting Run snappy firstboot setup...
Oct 30 11:13:25 localhost.localdomain snappy[806]: config failed with: 'aa-exec: ERROR: profile 'spreed-webrtc.longsleep_snappy-config_0.24.8-4' does not exist
Oct 30 11:13:25 localhost.localdomain snappy[806]: ' (exit status 1)
Oct 30 11:13:25 localhost.localdomain systemd[1]: ubuntu-snappy.firstboot.service: main process exited, code=exited, status=1/FAILURE
Oct 30 11:13:25 localhost.localdomain systemd[1]: Failed to start Run snappy firstboot setup.
Oct 30 11:13:25 localhost.localdomain systemd[1]: Unit ubuntu-snappy.firstboot.service entered failed state.
Oct 30 11:13:25 localhost.localdomain systemd[1]: ubuntu-snappy.firstboot.service failed.

Revision history for this message
John Lenton (chipaca) wrote :

Easy way to reproduce:

* branch snappy-systems, patch with attached diff, build oem package
* build system with that oem package
* boot it
* look at ubuntu-snappy.firstboot.service; notice it's marked as failed, and “sudo journalctl -u ubuntu-snappy.firstboot.service” tells you why.

Revision history for this message
John Lenton (chipaca) wrote :

The fix is to ensure run-hooks is run before firstboot.

John Lenton (chipaca)
Changed in snappy:
assignee: nobody → John Lenton (chipaca)
status: Confirmed → In Progress
Revision history for this message
Simon Eisenmann (longsleep) wrote :

When running run-hooks before firstboot is has the side effact that snap services start before firstboot. It lets firstboot run through fine, though all configuration applied by it is not there as firstboot ran too late.

A workaround is to add a external port to the service. That makes it run after snappy-wait4network.service which is after firstboot.

Revision history for this message
Michael Vogt (mvo) wrote :

This mechanism got reworked in ubuntu core 16 and firstboot and pre-installed snaps works now.

Changed in snappy:
status: In Progress → 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.