Merge ~cjohnston/charm-telegraf:lp2016430 into charm-telegraf:master

Proposed by Chris Johnston
Status: Merged
Approved by: Ramesh Sattaru
Approved revision: 9a327929c307042da209a82559238954ea9b3720
Merged at revision: 8daf9839c74bedf7bec0bcfb1eeeda80c094436a
Proposed branch: ~cjohnston/charm-telegraf:lp2016430
Merge into: charm-telegraf:master
Diff against target: 27 lines (+4/-1)
2 files modified
src/reactive/telegraf.py (+2/-1)
src/tests/functional/tests/bundles/base-snap.yaml (+2/-0)
Reviewer Review Type Date Requested Status
Ramesh Sattaru (community) Approve
Eric Chen Approve
🤖 prod-jenkaas-bootstack (community) continuous-integration Approve
Review via email: mp+441146@code.launchpad.net

Commit message

Don't require telegraf package on snap install.

LP: #2016430

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
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Eric Chen (eric-chen) wrote :

LGTM

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

Change successfully merged at revision 8daf9839c74bedf7bec0bcfb1eeeda80c094436a

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 8f88df8..6189fa3 100644
3--- a/src/reactive/telegraf.py
4+++ b/src/reactive/telegraf.py
5@@ -972,7 +972,8 @@ def install_telegraf():
6 pass
7 apt.queue_install(["telegraf"])
8 elif install_method == "snap":
9- apt.purge("telegraf")
10+ if fetch.get_installed_version("telegraf"):
11+ apt.purge("telegraf")
12 config = hookenv.config()
13 snap_channel = config.get("snap_channel")
14 snap.install("telegraf", channel=snap_channel, classic=True)
15diff --git a/src/tests/functional/tests/bundles/base-snap.yaml b/src/tests/functional/tests/bundles/base-snap.yaml
16index 139ab02..6213696 100644
17--- a/src/tests/functional/tests/bundles/base-snap.yaml
18+++ b/src/tests/functional/tests/bundles/base-snap.yaml
19@@ -3,6 +3,8 @@ applications:
20 num_units: 0
21 options:
22 install_method: 'snap'
23+ install_sources: ''
24+ install_keys: ''
25 ubuntu:
26 charm: ch:ubuntu
27 num_units: 1

Subscribers

People subscribed via source and target branches

to all changes: