race on snap installation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Prometheus2 charm |
Triaged
|
Medium
|
Unassigned |
Bug Description
It looks like the charm creates missing directories when writing daemon_arguments, which causes problems because snapd expects "current" to be a symlink:
ubuntu@
error: cannot perform the following tasks:
- Make snap "prometheus" (20) available to the system (cannot cleanup failed attempt at making snap "prometheus" available to the system: cannot remove snap current symlink: remove /var/snap/
- Make snap "prometheus" (20) available to the system (symlink 20 /var/snap/
ubuntu@
/var/snap/
total 4
drwxr-xr-x 2 root root 4096 Jul 6 05:31 current
/var/snap/
total 4
-r--r--r-- 1 root root 2337 Jul 6 05:31 daemon_arguments
ubuntu@
Is the race that the charm is configuring the snap before the snap has been installed, or that the charm thinks that the snap is installed but snapd is still setting it up?