snapctl seem to cache values even if snap is removed and then installed again
Bug #1636934 reported by
Ondrej Kubik
This bug affects 6 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
Medium
|
Paweł Stołowski |
Bug Description
preconditions:
$ snap install <snap>
$ snap set <snap> KEY1="VALUE"
$ snap set <snap> KEY2="VALUE"
$ snap remove <snap>
$ snap install <snap>
$ snap set <snap> KEY1="VALUE"
expected result:
when calling last $ snap set, configure hook associated to this "snap set" I'd expect snapctl only to return value for KEY1
actual result:
snapctl return values for both, KEY1 and KEY2
Are we cleaning snapctl cache when we remove snap?
tested on Ubuntu 16.04 classing
snapd version:
snap 2.16ubuntu3
snapd 2.16ubuntu3
series 16
ubuntu 16.04
Changed in snapd (Ubuntu): | |
importance: | Undecided → Medium |
affects: | snapd (Ubuntu) → snapd |
Changed in snapd: | |
assignee: | nobody → Paweł Stołowski (stolowski) |
status: | Confirmed → In Progress |
Changed in snapd: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
Indeed, even after `snap remove` is completed, the snap's configuration settings are still held in /var/lib/ snapd/state. json. They should probably be purged, or if this behavior is desired, add a --purge option to `snap remove`.