get/set do not work for the core snap
Bug #1780834 reported by
Kevin W Monroe
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snap Layer |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The recent commit for configuring the snapd refresh.timer doesn't quite work. It tries to call snap.set to set a core system option, but 'snap.installed
unit-etcd-0: 16:51:04 WARNING unit.etcd/
Consumers would get a similar warning if they try to get a core option:
unit-etcd-0: 16:54:42 WARNING unit.etcd/
I see a couple options to fix this. One is specifically for the snapd_refresh handler; the other more generically sets 'snap.installed
Related branches
~stub/layer-snap:defer-refresh
- Kevin W Monroe (community): Approve
- Diff: 0 lines
~kwmonroe/layer-snap:bug/set-core-flag
- Stuart Bishop: Approve
-
Diff: 17 lines (+6/-0)1 file modifiedlib/charms/layer/snap.py (+6/-0)
Changed in layer-snap: | |
status: | New → Fix Released |
To post a comment you must log in.
@stub, choose your adventure :)
The generic fix that always sets 'snap.installed .core' feels easy, but there may be unintended side effects as it would allow consumers to call disable, enable, and restart (in addition to get/set) on the core snap. That said, it seems to fail safely:
ubuntu@ ip-172- 31-16-103: ~$ sudo snap disable core
error: cannot disable "core": snap "core" cannot be disabled
ubuntu@ ip-172- 31-16-103: ~$ sudo snap enable core
error: cannot enable "core": snap "core" already enabled
ubuntu@ ip-172- 31-16-103: ~$ sudo snap restart core
error: snap "core" has no services