Closed chanchiwai-ray closed 9 months ago
This is happening on relation-broken, so seems like self.model.get_relation(PEER)
is returning a None.
@jameinel is it correct for a peer relation to be gone before a regular relation? I recall this was discussed but didn't find the thread.
For future reference:
Bug Description
sunbeam disable observability
(removing cos-lite terraform plan) failed because of hook failed: "grafana-dashboard-relation-broken"Reference for the cos-lite terraform: https://github.com/canonical/snap-openstack/tree/main/sunbeam-python/sunbeam/plugins/observability/etc/deploy-cos
To Reproduce
In the terraform plan directory
terraform init
terraform apply
terraform apply -destroy
While waiting for the model to be destroyed, the grafana unit goes into error state:
hook failed: "grafana-dashboard-relation-broken"
Environment
The environment (e.g. the channel) is defined in the terraform plan. Also,
Relevant log output
Additional context
This issue is related to #281, and possibly having the same root.