Juju doesn't clean up all resources on remove-application
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Invalid
|
Medium
|
Jack Shaw |
Bug Description
`juju remove-application` doesn't fully remove charm resources. For example, after deploying and removing metacontroller-
Environment:
microk8s 1.21/stable
Enabled addons: dns storage
juju 2.9.31
Steps to reproduce:
1. Add a new model named `test`
2. Deploy metacontroller-
3. Check the k8s resources:
```
$ kubectl get all -n test
NAME READY STATUS RESTARTS AGE
pod/modeloperat
pod/metacontrol
pod/metacontrol
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/
service/
service/
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.
NAME DESIRED CURRENT READY AGE
replicaset.
NAME READY AGE
statefulset.
statefulset.
```
4. Remove the charm and verify if its resources were cleaned up:
```
kubectl get all -n test
NAME READY STATUS RESTARTS AGE
pod/modeloperat
pod/metacontrol
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.
NAME DESIRED CURRENT READY AGE
replicaset.
NAME READY AGE
statefulset.
```
There are no errors in debug-log.
Changed in juju: | |
status: | Incomplete → New |
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → 2.9.34 |
Changed in juju: | |
milestone: | 2.9.34 → 2.9.35 |
Changed in juju: | |
milestone: | 2.9.35 → 2.9.36 |
Changed in juju: | |
milestone: | 2.9.36 → 2.9.37 |
Changed in juju: | |
milestone: | 2.9.37 → 2.9.38 |
Changed in juju: | |
milestone: | 2.9.38 → 2.9.39 |
Changed in juju: | |
milestone: | 2.9.39 → 2.9.40 |
Changed in juju: | |
assignee: | nobody → Jack Shaw (jack-shaw) |
Changed in juju: | |
milestone: | 2.9.40 → 2.9.42 |
While reproducing the steps I found this in the debug-log
unit-metacontro ller-operator- 0: 11:40:12 ERROR unit.metacontro ller-operator/ 0.juju- log Uncaught exception while in charm code: MetacontrollerO peratorCharm) juju/agents/ unit-metacontro ller-operator- 0/charm/ venv/ops/ main.py" , line 406, in main charm_event( charm, dispatcher. event_name) juju/agents/ unit-metacontro ller-operator- 0/charm/ venv/ops/ main.py" , line 140, in _emit_charm_event to_emit. emit(*args, **kwargs) juju/agents/ unit-metacontro ller-operator- 0/charm/ venv/ops/ framework. py", line 278, in emit _emit(event) juju/agents/ unit-metacontro ller-operator- 0/charm/ venv/ops/ framework. py", line 722, in _emit _reemit( event_path) juju/agents/ unit-metacontro ller-operator- 0/charm/ venv/ops/ framework. py", line 767, in _reemit handler( event) rror()
Traceback (most recent call last):
File "./src/charm.py", line 320, in <module>
main(
File "/var/lib/
_emit_
File "/var/lib/
event_
File "/var/lib/
framework.
File "/var/lib/
self.
File "/var/lib/
custom_
File "./src/charm.py", line 139, in _remove
raise NotImplementedE
Can you confirm this is not an issue related to the charm itself?