Can't re-install captive-redirect snap after setting up a rule
Bug #1677213 reported by
Victor gonzalez
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snappy-hwe-snaps |
Fix Released
|
High
|
Unassigned |
Bug Description
Story: once captive-redirect passed canonical tests on pi3 I removed the snap and tried to re-install it but it failed.
Environment:
latest candidate image on pi3
captive-redirect --candidate
Steps:
1. $ snap install captive-redirect --candidate
2. Set a new rule(i.e following canonical tests snap):
3. $ snap remove captive redirect
4. $ snap install captive redirect --candidate
Expected result: captive-redirect is installed
Current result:
$ sudo snap install captive-redirect --candidate
error: cannot perform the following tasks:
- Run configure hook of "captive-redirect" snap if present (run hook "configure": fork/exec /sbin/iptables: permission denied)
summary: |
- Can¡t re-install captive-redirect snap after setting up a rule + Can't re-install captive-redirect snap after setting up a rule |
Changed in snappy-hwe-snaps: | |
status: | New → Fix Committed |
importance: | Undecided → High |
Changed in snappy-hwe-snaps: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
After a few investigations I've noticed that snapd doesn't fully remove configuration after a remove:
# snap set captive-redirect active=true port=8080
# cat /var/snap/ captive- redirect/ common/ config. json :true," port":8080, "interfaces" :null}
{"active"
# grep -ro '{[^{]*8080[^}]*}' /var/lib/snapd/ snapd/state. json:{" active" :true," port":8080} snapd/state. json:{" port":8080} snapd/state. json:{" active" :true," port":8080}
/var/lib/
/var/lib/
/var/lib/
# snap remove captive-redirect
# cat /var/snap/ captive- redirect/ common/ config. json captive- redirect/ common/ config. json: No such file or directory
cat: /var/snap/
# grep -ro '{[^{]*8080[^}]*}' /var/lib/snapd/ snapd/state. json:{" active" :true," port":8080} snapd/state. json:{" port":8080} snapd/state. json:{" active" :true," port":8080}
/var/lib/
/var/lib/
/var/lib/
Fortunately this will be fixed in the next version as a fix was already merged:
https:/ /github. com/snapcore/ snapd/pull/ 3052