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
1diff --git a/src/reactive/telegraf.py b/src/reactive/telegraf.py
2index c139276..ceca7bb 100644
3--- a/src/reactive/telegraf.py
4+++ b/src/reactive/telegraf.py
5@@ -1282,9 +1282,12 @@ def render_prometheus_rules(prometheus_rules):
6 }
7 formatted_rules = []
8 template_files = [
9- "rule_cpu_usage.tmpl",
10- "rule_disk_predictive.tmpl",
11- "rule_mem_starvation.tmpl",
12+ "rule_cpu_usage.j2",
13+ "rule_diskfull.j2",
14+ "rule_mem.j2",
15+ "rule_disk_ro.j2",
16+ "rule_packetdrops.j2",
17+ "rule_predict_disk_space.j2",
18 ]
19 for template_file in template_files:
20 with open(os.path.join(get_templates_dir(), template_file), "r") as fd:
21diff --git a/src/tests/functional/tests/bundles/bionic-monitoring.yaml b/src/tests/functional/tests/bundles/bionic-monitoring.yaml
22index 120eab8..863d322 100644
23--- a/src/tests/functional/tests/bundles/bionic-monitoring.yaml
24+++ b/src/tests/functional/tests/bundles/bionic-monitoring.yaml
25@@ -16,8 +16,8 @@ applications:
26 prometheus2:
27 charm: cs:prometheus2
28 num_units: 1
29-
30-
31+ prometheus-alertmanager:
32+ charm: cs:prometheus-alertmanager
33
34 relations:
35 - - percona-cluster:juju-info
36@@ -30,3 +30,7 @@ relations:
37 - prometheus2:grafana-source
38 - - grafana:dashboards
39 - telegraf:dashboards
40+ - - prometheus2:prometheus-rules
41+ - telegraf:prometheus-rules
42+ - - prometheus2:alertmanager-service
43+ - prometheus-alertmanager:alertmanager-service

Subscribers

People subscribed via source and target branches

to all changes: