Core snap is installed when reverting a core18 based snap

Bug #1864944 reported by Robert Liu on 2020-02-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
High
Paweł Stołowski

Bug Description

Description:
The core snap is installed automatically when reverting a core18 based snap. Though I use shellcheck to reproduce the issue, but I do meet the same issue with different snaps.

Reproduce method:
Run the ubuntu core image through KVM, and use the shellcheck snap to verify.
$ snap list --all # make sure that there's no core snap
$ snap install shellcheck
$ snap refresh --edge shellcheck
$ snap revert shellcheck # check the core snap is installed or not

Output:
$ snap list --all
Name Version Rev Tracking Publisher Notes
core18 20200124 1668 latest/beta canonical✓ base
pc 18-2 36 18/beta canonical✓ gadget
pc-kernel 4.15.0-89.89 403 18/beta canonical✓ kernel
snapd 2.43.3 6434 latest/beta canonical✓ snapd,disabled
snapd 2.44~pre1+git1315.gc9529d2 6608 latest/beta canonical✓ snapd

$ snap install shellcheck
shellcheck v0.7.0 from Vidar (koalaman) installed

$ snap refresh --edge shellcheck
shellcheck (edge) v0.7.0+git126.7b99823 from Vidar (koalaman) refreshed

$ snap revert shellcheck
shellcheck reverted to v0.7.0

$ snap list --all
Name Version Rev Tracking Publisher Notes
core 16-2.43.3 8689 latest/stable canonical✓ core
core18 20200124 1668 latest/beta canonical✓ base
pc 18-2 36 18/beta canonical✓ gadget
pc-kernel 4.15.0-89.89 403 18/beta canonical✓ kernel
shellcheck v0.7.0 760 latest/edge koalaman -
shellcheck v0.7.0+git126.7b99823 1018 latest/edge koalaman disabled
snapd 2.43.3 6434 latest/beta canonical✓ snapd,disabled
snapd 2.44~pre1+git1315.gc9529d2 6608 latest/beta canonical✓ snapd

Snap changes and tasks:
$ snap changes
ID Status Spawn Ready Summary
1 Done today at 02:06 UTC today at 02:06 UTC Initialize system state
2 Done today at 02:06 UTC today at 02:06 UTC Initialize device
3 Done today at 02:06 UTC today at 02:06 UTC Auto-refresh snap "snapd"
4 Done today at 02:08 UTC today at 02:08 UTC Install "shellcheck" snap
5 Done today at 02:08 UTC today at 02:08 UTC Refresh "shellcheck" snap from "edge" channel
6 Done today at 02:09 UTC today at 02:10 UTC Revert "shellcheck" snap

$ snap tasks 6
Status Spawn Ready Summary
Done today at 02:09 UTC today at 02:09 UTC Ensure prerequisites for "shellcheck" are available
Done today at 02:09 UTC today at 02:10 UTC Prepare snap "" (760)
Done today at 02:09 UTC today at 02:10 UTC Stop snap "shellcheck" services
Done today at 02:09 UTC today at 02:10 UTC Remove aliases for snap "shellcheck"
Done today at 02:09 UTC today at 02:10 UTC Make current revision for snap "shellcheck" unavailable
Done today at 02:09 UTC today at 02:10 UTC Setup snap "shellcheck" (760) security profiles
Done today at 02:09 UTC today at 02:10 UTC Make snap "shellcheck" (760) available to the system
Done today at 02:09 UTC today at 02:10 UTC Automatically connect eligible plugs and slots of snap "shellcheck"
Done today at 02:09 UTC today at 02:10 UTC Set automatic aliases for snap "shellcheck"
Done today at 02:09 UTC today at 02:10 UTC Setup snap "shellcheck" aliases
Done today at 02:09 UTC today at 02:10 UTC Start snap "shellcheck" (760) services
Done today at 02:09 UTC today at 02:10 UTC Run configure hook of "shellcheck" snap if present
Done today at 02:09 UTC today at 02:10 UTC Run health check of "shellcheck" snap
Done today at 02:09 UTC today at 02:09 UTC Ensure prerequisites for "core" are available
Done today at 02:09 UTC today at 02:10 UTC Download snap "core" (8689) from channel "stable"
Done today at 02:09 UTC today at 02:10 UTC Fetch and check assertions for snap "core" (8689)
Done today at 02:09 UTC today at 02:10 UTC Mount snap "core" (8689)
Done today at 02:09 UTC today at 02:10 UTC Copy snap "core" data
Done today at 02:09 UTC today at 02:10 UTC Setup snap "core" (8689) security profiles
Done today at 02:09 UTC today at 02:10 UTC Make snap "core" (8689) available to the system
Done today at 02:09 UTC today at 02:10 UTC Automatically connect eligible plugs and slots of snap "core"
Done today at 02:09 UTC today at 02:10 UTC Set automatic aliases for snap "core"
Done today at 02:09 UTC today at 02:10 UTC Setup snap "core" aliases
Done today at 02:09 UTC today at 02:10 UTC Run install hook of "core" snap if present
Done today at 02:09 UTC today at 02:10 UTC Start snap "core" (8689) services
Done today at 02:09 UTC today at 02:10 UTC Run configure hook of "core" snap if present
Done today at 02:09 UTC today at 02:10 UTC Run health check of "core" snap

Changed in snapd:
status: New → Confirmed
importance: Undecided → High
Paweł Stołowski (stolowski) wrote :

Thanks for the detailed bug report! Reproduced and understood, will be fixed soon.

Changed in snapd:
assignee: nobody → Paweł Stołowski (stolowski)
Zygmunt Krynicki (zyga) wrote :
Changed in snapd:
milestone: none → 2.44
status: Confirmed → In Progress
Robert Liu (robertliu) wrote :

re-upload state.json

Robert Liu (robertliu) wrote :

With snapd 2.44.1 (rev. 6958, candidate), the issue is not reproducible.

Paweł Stołowski (stolowski) wrote :

@Robert thanks for confirmation!

Changed in snapd:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments