snap prepare-image preseed fails with groupadd fail
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_
groupadd: cannot lock /var/lib/
-----
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_
groupadd: cannot lock /var/lib/
-----]
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 |
Proposed fix: https:/ /github. com/snapcore/ snapd/pull/ 11895