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
diff --git a/src/reactive/telegraf.py b/src/reactive/telegraf.py
index 47819cd..68edce3 100644
--- a/src/reactive/telegraf.py
+++ b/src/reactive/telegraf.py
@@ -358,8 +358,7 @@ def get_prometheus_port():
358 return False358 return False
359 if config.get("prometheus_output_port") == "default":359 if config.get("prometheus_output_port") == "default":
360 return 9103360 return 9103
361 else:361 return int(config.get("prometheus_output_port"))
362 return int(config.get("prometheus_output_port"))
363362
364363
365def get_prometheus_ip_range():364def get_prometheus_ip_range():
@@ -453,6 +452,7 @@ def update_sysstat_config_with_sdac_xall(path="/etc/sysstat/sysstat"):
453452
454453
455def configure_telegraf(): # noqa: C901454def configure_telegraf(): # noqa: C901
455 hookenv.log("Generating telegraf.conf", level=hookenv.DEBUG)
456 update_sysstat_config_with_sdac_xall()456 update_sysstat_config_with_sdac_xall()
457 config = hookenv.config()457 config = hookenv.config()
458 context = config.copy()458 context = config.copy()
@@ -601,6 +601,7 @@ def configure_telegraf(): # noqa: C901
601 context=context,601 context=context,
602 )602 )
603603
604 # Make sure that only the right service is enabled, then defer to start_or_restart()
604 for service in [DEB_SERVICE, SNAP_SERVICE]:605 for service in [DEB_SERVICE, SNAP_SERVICE]:
605 if service == get_service():606 if service == get_service():
606 host.service_resume(service)607 host.service_resume(service)

Subscribers

People subscribed via source and target branches

to all changes: