Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dashboards still existing after relation removal #253

Merged
merged 6 commits into from
Feb 7, 2025
Merged

Conversation

michaeldmitry
Copy link
Contributor

@michaeldmitry michaeldmitry commented Feb 5, 2025

Issue

Fixes canonical/grafana-k8s-operator#346

Solution

On remote relation departed, empty peer data of grafana-agent for that departing relation

Context

canonical/grafana-k8s-operator#386

Drive-bys

  • Increase timeout for waiting for idle

Testing Considerations

Deploy this bundle

default-base: [email protected]/stable
saas:
  grafana:
    url: microk8s:admin/welcome-k8s.grafana
applications:
  grafana-agent:
    charm: ./[email protected]
  hardware-observer:
    charm: hardware-observer
    channel: latest/edge
    revision: 160
    resources:
      perccli-deb: 1
      sas2ircu-bin: 1
      sas3ircu-bin: 1
      storcli-deb: 1
  ubuntu:
    charm: ubuntu
    channel: latest/stable
    revision: 25
    num_units: 2
relations:
- - ubuntu:juju-info
  - hardware-observer:general-info
- - ubuntu:juju-info
  - grafana-agent:juju-info
- - grafana-agent:grafana-dashboards-provider
  - grafana:grafana-dashboard
- - grafana-agent:cos-agent
  - hardware-observer:cos-agent

Then,

juju remove-relation grafana-agent hardware-observer

Then, verify that the hardware observer dashboard has been remove from grafana.

@sed-i
Copy link
Contributor

sed-i commented Feb 5, 2025

Here's a QA you could add to the "Testing" section of the PR description. Before this change, the dashboards from hardware-observer are still present in grafana after juju remove-relation grafana-agent hardware-observer.

default-base: [email protected]/stable
saas:
  grafana:
    url: microk8s:admin/welcome-k8s.grafana
applications:
  grafana-agent:
    charm: ./[email protected]
  hardware-observer:
    charm: hardware-observer
    channel: latest/edge
    revision: 160
    resources:
      perccli-deb: 1
      sas2ircu-bin: 1
      sas3ircu-bin: 1
      storcli-deb: 1
  ubuntu:
    charm: ubuntu
    channel: latest/stable
    revision: 25
    num_units: 2
relations:
- - ubuntu:juju-info
  - hardware-observer:general-info
- - ubuntu:juju-info
  - grafana-agent:juju-info
- - grafana-agent:grafana-dashboards-provider
  - grafana:grafana-dashboard
- - grafana-agent:cos-agent
  - hardware-observer:cos-agent

@michaeldmitry michaeldmitry marked this pull request as ready for review February 6, 2025 11:04
Co-authored-by: Leon <[email protected]>
Signed-off-by: Michael Dmitry <[email protected]>
@michaeldmitry michaeldmitry merged commit bd14ba6 into main Feb 7, 2025
12 checks passed
@michaeldmitry michaeldmitry deleted the OBC-278 branch February 7, 2025 06:15
@michaeldmitry michaeldmitry restored the OBC-278 branch February 7, 2025 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After related charm removal the dashboards still exist
2 participants