disabling and re-enabling observability plugin results in terraform error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Snap |
In Progress
|
High
|
Unassigned |
Bug Description
On 2023.2/edge, I disabled the observability plugin, then enabled it again:
```
sunbeam disable observability
sunbeam enable observability
```
This resulted in an error from terraform:
```
Error: Client Error
with juju_integratio
on main.tf line 1037, in resource "juju_integration" "grafana-
1037: resource "juju_integration" "grafana-
Unable to consume remote offer, got error: saas application called
"prometheus-
Error: Client Error
with juju_integratio
on main.tf line 1051, in resource "juju_integration" "grafana-
1051: resource "juju_integration" "grafana-
Unable to consume remote offer, got error: saas application called
"loki-logging" from a different model already exists
Error: Client Error
with juju_integratio
on main.tf line 1065, in resource "juju_integration" "grafana-
1065: resource "juju_integration" "grafana-
Unable to consume remote offer, got error: saas application called
"grafana-
Error: Command '['/snap/
```
It seems the consumer side of the cross model relations from observability model aren't cleaned up on disabling the plugin.
Changed in snap-openstack: | |
importance: | Undecided → High |
status: | New → Confirmed |
tags: | added: observability |
Changed in snap-openstack: | |
assignee: | nobody → Guillaume Boutry (gboutry) |
assignee: | Guillaume Boutry (gboutry) → nobody |
status: | Confirmed → In Progress |
A workaround is to manually clean up the offers before re-enabling observability:
``` receive- remote- write receive- remote- write
juju remove-saas -m openstack prometheus-
juju remove-saas -m openstack grafana-dashboards
juju remove-saas -m openstack loki-logging
juju remove-saas -m admin/controller prometheus-
juju remove-saas -m admin/controller grafana-dashboards
juju remove-saas -m admin/controller loki-logging
```