Merge ~xavpaice/charm-telegraf:bug/lp1913489 into charm-telegraf:master

Proposed by Xav Paice
Status: Merged
Approved by: James Troup
Approved revision: 4fc265c1ee90c6d4a64a8de34aefd7ca0c447576
Merged at revision: dec0633eb0134f4222b70c4a3e4f8375baac1f61
Proposed branch: ~xavpaice/charm-telegraf:bug/lp1913489
Merge into: charm-telegraf:master
Diff against target: 43 lines (+12/-5)
2 files modified
src/reactive/telegraf.py (+6/-3)
src/tests/functional/tests/bundles/bionic-monitoring.yaml (+6/-2)
Reviewer Review Type Date Requested Status
Joe Guo (community) Approve
Canonical IS Reviewers Pending
BootStack Reviewers Pending
Review via email: mp+397050@code.launchpad.net

Commit message

Correct alert rule template names

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Joe Guo (guoqiao) wrote :

LGTM, +1

review: Approve
Revision history for this message
Alvaro Uria (aluria) wrote :

I've rebased your change against the current master and functional tests fail when testing "tests/bundles/focal-compute.yaml".

I think that is unrelated to this change, but I think we should fix it before merging any other MPs.

The "focal-compute.yaml" bundle deploys many applications such as neutron-gateway, which is in blocked state but not defined as such in "tests.yaml" (the "target_deploy_status" section).

Other than that, lint, unit tests and previous func tests passed fine.

Revision history for this message
Alvaro Uria (aluria) wrote :

FWIW, the error was:
"""
    raise ModelTimeout("Zaza has timed out waiting on the model to "
zaza.model.ModelTimeout: Zaza has timed out waiting on the model to reach idle state.
"""

That error happened while "waiting_for_application_states".

> I've rebased your change against the current master and functional tests fail
> when testing "tests/bundles/focal-compute.yaml".
>
> I think that is unrelated to this change, but I think we should fix it before
> merging any other MPs.
>
> The "focal-compute.yaml" bundle deploys many applications such as neutron-
> gateway, which is in blocked state but not defined as such in "tests.yaml"
> (the "target_deploy_status" section).
>
> Other than that, lint, unit tests and previous func tests passed fine.

Revision history for this message
Xav Paice (xavpaice) wrote :

I don't see how this relates to the change at all, and this is a bug which prevents deployment of the rules relation. Can we please re-review?

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision dec0633eb0134f4222b70c4a3e4f8375baac1f61

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/src/reactive/telegraf.py b/src/reactive/telegraf.py
index c139276..ceca7bb 100644
--- a/src/reactive/telegraf.py
+++ b/src/reactive/telegraf.py
@@ -1282,9 +1282,12 @@ def render_prometheus_rules(prometheus_rules):
1282 }1282 }
1283 formatted_rules = []1283 formatted_rules = []
1284 template_files = [1284 template_files = [
1285 "rule_cpu_usage.tmpl",1285 "rule_cpu_usage.j2",
1286 "rule_disk_predictive.tmpl",1286 "rule_diskfull.j2",
1287 "rule_mem_starvation.tmpl",1287 "rule_mem.j2",
1288 "rule_disk_ro.j2",
1289 "rule_packetdrops.j2",
1290 "rule_predict_disk_space.j2",
1288 ]1291 ]
1289 for template_file in template_files:1292 for template_file in template_files:
1290 with open(os.path.join(get_templates_dir(), template_file), "r") as fd:1293 with open(os.path.join(get_templates_dir(), template_file), "r") as fd:
diff --git a/src/tests/functional/tests/bundles/bionic-monitoring.yaml b/src/tests/functional/tests/bundles/bionic-monitoring.yaml
index 120eab8..863d322 100644
--- a/src/tests/functional/tests/bundles/bionic-monitoring.yaml
+++ b/src/tests/functional/tests/bundles/bionic-monitoring.yaml
@@ -16,8 +16,8 @@ applications:
16 prometheus2:16 prometheus2:
17 charm: cs:prometheus217 charm: cs:prometheus2
18 num_units: 118 num_units: 1
1919 prometheus-alertmanager:
2020 charm: cs:prometheus-alertmanager
2121
22relations:22relations:
23 - - percona-cluster:juju-info23 - - percona-cluster:juju-info
@@ -30,3 +30,7 @@ relations:
30 - prometheus2:grafana-source30 - prometheus2:grafana-source
31 - - grafana:dashboards31 - - grafana:dashboards
32 - telegraf:dashboards32 - telegraf:dashboards
33 - - prometheus2:prometheus-rules
34 - telegraf:prometheus-rules
35 - - prometheus2:alertmanager-service
36 - prometheus-alertmanager:alertmanager-service

Subscribers

People subscribed via source and target branches

to all changes: