snap prepare-image preseed fails with groupadd fail

Bug #1978850 reported by Ondrej Kubik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
In Progress
High
Unassigned

Bug Description

Fail to build preseeded Ubuntu Core image if service has service which are not running as root

snap prepare-image --preseed --preseed-sign-key ubuntu-core-model <model>

Image build fails with the following error:

stateengine.go:149: state ensure error: devicemgr: cannot seed: cannot ensure users for snap "xxx-xxx-app" required system username "snap_daemon": groupadd failed with:
-----
ENTER EXTRAUSERS_GROUP_FILEEXIT EXTRAUSERS_GROUP_FILEENTER EXTRAUSERS_SHADOWGROUP_FILEEXIT EXTRAUSERS_SHADOWGROUP_FILEgroupadd: /var/lib/extrausers/group.760908: Read-only file system
groupadd: cannot lock /var/lib/extrausers/group; try again later.
-----
cannot preseed: state ensure errors: [devicemgr: cannot seed: cannot ensure users for snap "xxx-xxx-app" required system username "snap_daemon": groupadd failed with:
-----
ENTER EXTRAUSERS_GROUP_FILEEXIT EXTRAUSERS_GROUP_FILEENTER EXTRAUSERS_SHADOWGROUP_FILEEXIT EXTRAUSERS_SHADOWGROUP_FILEgroupadd: /var/lib/extrausers/group.760908: Read-only file system
groupadd: cannot lock /var/lib/extrausers/group; try again later.
-----]
error: error running snapd in preseed mode: exit status 1

Offending snap in question has following
system-usernames:
  snap_daemon:
    scope: shared

Changed in snapd:
importance: Undecided → High
status: New → Triaged
Changed in snapd:
status: Triaged → Confirmed
Revision history for this message
Paweł Stołowski (stolowski) wrote :
Changed in snapd:
status: Confirmed → In Progress
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.