Merge ~barryprice/charm-telegraf:misc-fixes into charm-telegraf:master

Proposed by Barry Price
Status: Merged
Approved by: Barry Price
Approved revision: b37e1a30ba6ab37698f0e57183ed4da44b7d704e
Merged at revision: 1533cfbe067b9c225c5bbbb5b7716bda009bd872
Proposed branch: ~barryprice/charm-telegraf:misc-fixes
Merge into: charm-telegraf:master
Prerequisite: ~barryprice/charm-telegraf:add_ip_range_support
Diff against target: 30 lines (+3/-2)
1 file modified
src/reactive/telegraf.py (+3/-2)
Reviewer Review Type Date Requested Status
Haw Loeung +1 Approve
Canonical IS Reviewers Pending
Paul Goins Pending
Review via email: mp+398222@code.launchpad.net

This proposal supersedes a proposal from 2021-01-27.

Commit message

small fixes: remove unneeded host.service_reload, add a debug log for configure_telegraf(), and remove un unneeded 'else:'

To post a comment you must log in.
Revision history for this message
Laurent Sesquès (sajoupa) wrote : Posted in a previous version of this proposal

passes `make test`

Revision history for this message
Laurent Sesquès (sajoupa) wrote : Posted in a previous version of this proposal
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote : Posted in a previous version of this proposal

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

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote : Posted in a previous version of this proposal

Unable to determine commit message from repository - please click "Set commit message" and enter the commit message manually.

Revision history for this message
Paul Goins (vultaire) wrote : Posted in a previous version of this proposal

I have a concern about a particular part I investigated for a different fix I did recently. I think this may introduce a regression.

review: Needs Fixing
Revision history for this message
Laurent Sesquès (sajoupa) wrote : Posted in a previous version of this proposal

replied inline.

Revision history for this message
Laurent Sesquès (sajoupa) wrote : Posted in a previous version of this proposal

> I have a concern about a particular part I investigated for a different fix I
> did recently. I think this may introduce a regression.
now fixed.

Revision history for this message
Haw Loeung (hloeung) wrote : Posted in a previous version of this proposal

LGTM

review: Approve (+1)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote : Posted in a previous version of this proposal

Failed to merge change (unable to merge source repository due to conflicts), setting status to needs review.

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
Haw Loeung (hloeung) wrote :

LGTM

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

Change successfully merged at revision 1533cfbe067b9c225c5bbbb5b7716bda009bd872

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 47819cd..68edce3 100644
3--- a/src/reactive/telegraf.py
4+++ b/src/reactive/telegraf.py
5@@ -358,8 +358,7 @@ def get_prometheus_port():
6 return False
7 if config.get("prometheus_output_port") == "default":
8 return 9103
9- else:
10- return int(config.get("prometheus_output_port"))
11+ return int(config.get("prometheus_output_port"))
12
13
14 def get_prometheus_ip_range():
15@@ -453,6 +452,7 @@ def update_sysstat_config_with_sdac_xall(path="/etc/sysstat/sysstat"):
16
17
18 def configure_telegraf(): # noqa: C901
19+ hookenv.log("Generating telegraf.conf", level=hookenv.DEBUG)
20 update_sysstat_config_with_sdac_xall()
21 config = hookenv.config()
22 context = config.copy()
23@@ -601,6 +601,7 @@ def configure_telegraf(): # noqa: C901
24 context=context,
25 )
26
27+ # Make sure that only the right service is enabled, then defer to start_or_restart()
28 for service in [DEB_SERVICE, SNAP_SERVICE]:
29 if service == get_service():
30 host.service_resume(service)

Subscribers

People subscribed via source and target branches

to all changes: