Merge ~jneo8/charm-telegraf:bug/1988476 into charm-telegraf:master

Proposed by JamesLin
Status: Merged
Approved by: Eric Chen
Approved revision: ee32614fe9afb871c2b25dfa24352904385d873d
Merged at revision: 5c95818d13cddd6b3578a224da952c069238d0a4
Proposed branch: ~jneo8/charm-telegraf:bug/1988476
Merge into: charm-telegraf:master
Diff against target: 137 lines (+12/-9)
12 files modified
.pre-commit-config.yaml (+1/-0)
src/reactive/telegraf.py (+0/-1)
src/requirements.txt (+0/-1)
src/templates/apache-server-status.tmpl (+1/-0)
src/templates/influxdb-api.conf.tmpl (+2/-1)
src/templates/sudoers/telegraf_intel_rdt.tmpl (+1/-0)
src/templates/sudoers/telegraf_ipmi.tmpl (+1/-0)
src/templates/sudoers/telegraf_iptables.tmpl (+1/-0)
src/templates/sudoers/telegraf_ovs.tmpl (+1/-0)
src/templates/sudoers/telegraf_smart.tmpl (+1/-0)
src/templates/telegraf.conf.tmpl (+3/-3)
src/wheelhouse.txt (+0/-3)
Reviewer Review Type Date Requested Status
Celia Wang Approve
Gabriel Cocenza Needs Fixing
Eric Chen Approve
Robert Gildein Pending
Review via email: mp+429347@code.launchpad.net

Commit message

fix(src/template): Fix newline on /etc/sudoers.d/telegraf_ovs by revert tempalte on 08adf64 & telegraf.py on 26af3f2

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
Eric Chen (eric-chen) wrote :

LGTM

review: Approve
Revision history for this message
Gabriel Cocenza (gabrielcocenza) wrote :

LGTM, but I would like to see one more change in this patch.
Could you also remove the first two lines of the wheelhouse.txt that is pinning MarkupSafe? The layer basic is already dealing with different MarkupSafe and Jinja2 versions.

Thanks!

review: Needs Fixing
Revision history for this message
JamesLin (jneo8) wrote :

> LGTM, but I would like to see one more change in this patch.
> Could you also remove the first two lines of the wheelhouse.txt that is
> pinning MarkupSafe? The layer basic is already dealing with different
> MarkupSafe and Jinja2 versions.
>
> Thanks!

Ack, updated.

Revision history for this message
Celia Wang (ziyiwang) wrote :

lgtm

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

Change successfully merged at revision 5c95818d13cddd6b3578a224da952c069238d0a4

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
2index 18d9070..7339d20 100644
3--- a/.pre-commit-config.yaml
4+++ b/.pre-commit-config.yaml
5@@ -20,3 +20,4 @@ repos:
6 entry: make lint
7 language: system
8 types: [ python ]
9+exclude: ^src/templates/
10diff --git a/src/reactive/telegraf.py b/src/reactive/telegraf.py
11index 61aabcf..bab0236 100644
12--- a/src/reactive/telegraf.py
13+++ b/src/reactive/telegraf.py
14@@ -1713,7 +1713,6 @@ def configure_prometheus_client_with_relation(prometheus):
15 clear_flag("endpoint.prometheus-client.changed") # not automatic
16
17
18-@when("telegraf.configured")
19 @when_not("plugins.prometheus-client.configured")
20 def configure_prometheus_client():
21 hookenv.log("Configuring prometheus_client output plugin", level=hookenv.DEBUG)
22diff --git a/src/requirements.txt b/src/requirements.txt
23index d164a29..ac800dc 100644
24--- a/src/requirements.txt
25+++ b/src/requirements.txt
26@@ -1,3 +1,2 @@
27 -r wheelhouse.txt
28 charms.reactive>=1.3.0
29-requests
30diff --git a/src/templates/apache-server-status.tmpl b/src/templates/apache-server-status.tmpl
31index 38e027c..18f8871 100644
32--- a/src/templates/apache-server-status.tmpl
33+++ b/src/templates/apache-server-status.tmpl
34@@ -13,3 +13,4 @@
35 Allow from localhost
36 </Location>
37 </VirtualHost>
38+
39diff --git a/src/templates/influxdb-api.conf.tmpl b/src/templates/influxdb-api.conf.tmpl
40index 0466afe..9d76988 100644
41--- a/src/templates/influxdb-api.conf.tmpl
42+++ b/src/templates/influxdb-api.conf.tmpl
43@@ -4,7 +4,7 @@
44 # Multiple urls can be specified but it is assumed that they are part of the same
45 # cluster, this means that only ONE of the urls will be written to each interval.
46 # urls = ["udp://localhost:8089"] # UDP endpoint example
47- urls = {{ urls }}
48+ urls = {{ urls }}
49 # The target database for metrics (telegraf will create it if not exists)
50 database = "telegraf" # required
51 # Precision of writes, valid values are n, u, ms, s, m, and h
52@@ -20,3 +20,4 @@
53 user_agent = "telegraf"
54 # Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes)
55 # udp_payload = 512
56+
57diff --git a/src/templates/sudoers/telegraf_intel_rdt.tmpl b/src/templates/sudoers/telegraf_intel_rdt.tmpl
58index fb8edfd..0324a77 100644
59--- a/src/templates/sudoers/telegraf_intel_rdt.tmpl
60+++ b/src/templates/sudoers/telegraf_intel_rdt.tmpl
61@@ -1,3 +1,4 @@
62 Cmnd_Alias PQOS = /usr/sbin/pqos -r --iface-os --mon-file-type=csv --mon-interval=*
63 {{ telegraf_user }} ALL=(root) NOPASSWD: PQOS
64 Defaults!PQOS !logfile, !syslog, !pam_session
65+
66diff --git a/src/templates/sudoers/telegraf_ipmi.tmpl b/src/templates/sudoers/telegraf_ipmi.tmpl
67index 14e2076..463a608 100644
68--- a/src/templates/sudoers/telegraf_ipmi.tmpl
69+++ b/src/templates/sudoers/telegraf_ipmi.tmpl
70@@ -1,3 +1,4 @@
71 Cmnd_Alias IPMITOOL = /usr/bin/ipmitool sdr elist
72 {{ telegraf_user }} ALL=(root) NOPASSWD: IPMITOOL
73 Defaults!IPMITOOL !logfile, !syslog, !pam_session
74+
75diff --git a/src/templates/sudoers/telegraf_iptables.tmpl b/src/templates/sudoers/telegraf_iptables.tmpl
76index 8e5f67d..49354db 100644
77--- a/src/templates/sudoers/telegraf_iptables.tmpl
78+++ b/src/templates/sudoers/telegraf_iptables.tmpl
79@@ -1,3 +1,4 @@
80 Cmnd_Alias IPTABLESSHOW = /sbin/iptables -w 5 -nvL *
81 {{ telegraf_user }} ALL=(root) NOPASSWD: IPTABLESSHOW
82 Defaults!IPTABLESSHOW !logfile, !syslog, !pam_session
83+
84diff --git a/src/templates/sudoers/telegraf_ovs.tmpl b/src/templates/sudoers/telegraf_ovs.tmpl
85index f53f1b7..27087b4 100644
86--- a/src/templates/sudoers/telegraf_ovs.tmpl
87+++ b/src/templates/sudoers/telegraf_ovs.tmpl
88@@ -8,3 +8,4 @@ Cmnd_Alias OVSAPPCTL = /usr/bin/ovs-appctl
89 Defaults!OVSOFCTL !logfile, !syslog, !pam_session
90 Defaults!OVSVSCTL !logfile, !syslog, !pam_session
91 Defaults!OVSAPPCTL !logfile, !syslog, !pam_session
92+
93diff --git a/src/templates/sudoers/telegraf_smart.tmpl b/src/templates/sudoers/telegraf_smart.tmpl
94index 1f8d88c..1ceaf74 100644
95--- a/src/templates/sudoers/telegraf_smart.tmpl
96+++ b/src/templates/sudoers/telegraf_smart.tmpl
97@@ -5,3 +5,4 @@ Defaults!SMARTCTL !logfile, !syslog, !pam_session
98 Cmnd_Alias NVME = /usr/sbin/nvme
99 {{ telegraf_user }} ALL=(root) NOPASSWD: NVME
100 Defaults!NVME !logfile, !syslog, !pam_session
101+
102diff --git a/src/templates/telegraf.conf.tmpl b/src/templates/telegraf.conf.tmpl
103index fe64b76..966b4a9 100644
104--- a/src/templates/telegraf.conf.tmpl
105+++ b/src/templates/telegraf.conf.tmpl
106@@ -46,7 +46,7 @@
107
108 # Telegraf will cache metric_buffer_limit metrics for each output, and will
109 # flush this buffer on a successful write.
110- metric_buffer_limit = {{ metric_buffer_limit }}
111+ metric_buffer_limit = {{ metric_buffer_limit }}
112
113 # Collection jitter is used to jitter the collection by a random amount.
114 # Each plugin will sleep for a random time within jitter before collecting.
115@@ -63,9 +63,9 @@
116 flush_jitter = "{{ flush_jitter }}"
117
118 # Run telegraf in debug mode
119- debug = {% if debug %}true{% else %}false{% endif %}
120+ debug = {% if debug %}true{% else %}false{% endif %}
121 # Run telegraf in quiet mode
122- quiet = {% if quiet %}true{% else %}false{% endif %}
123+ quiet = {% if quiet %}true{% else %}false{% endif %}
124 # Override default hostname, if empty use os.Hostname()
125 hostname = "{{ hostname }}"
126
127diff --git a/src/wheelhouse.txt b/src/wheelhouse.txt
128index da32628..2943205 100644
129--- a/src/wheelhouse.txt
130+++ b/src/wheelhouse.txt
131@@ -1,6 +1,3 @@
132-# https://github.com/juju-solutions/layer-basic/pull/197
133-MarkupSafe<2.0.0
134-
135 # Support for python3.4 (Trusty)
136 defusedxml<0.6.0
137 redis<3.4.0

Subscribers

People subscribed via source and target branches

to all changes: