Merge ~hloeung/content-cache-charm:cleanup into content-cache-charm:master

Proposed by Haw Loeung
Status: Merged
Approved by: Haw Loeung
Approved revision: cf2cd1b6a559d0c10f891adf56075445f82fc4ea
Merged at revision: 2684be2baa5db7409c4cd93bf57769d405f5c560
Proposed branch: ~hloeung/content-cache-charm:cleanup
Merge into: content-cache-charm:master
Prerequisite: ~hloeung/content-cache-charm:haproxy-config
Diff against target: 45 lines (+8/-8)
2 files modified
config.yaml (+6/-6)
lib/haproxy.py (+2/-2)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Canonical IS Reviewers Pending
Review via email: mp+380257@code.launchpad.net

Commit message

Sort, sort, sort

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
Tom Haddon (mthaddon) wrote :

LGTM, thx

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

Change successfully merged at revision 2684be2baa5db7409c4cd93bf57769d405f5c560

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/config.yaml b/config.yaml
2index d100214..5210a97 100644
3--- a/config.yaml
4+++ b/config.yaml
5@@ -25,6 +25,12 @@ options:
6 default: "/var/lib/nginx/proxy"
7 description: >
8 Path or directory to store cached objects.
9+ enable_prometheus_metrics:
10+ default: true
11+ type: boolean
12+ description: >
13+ Export metrics for the number of requests and the number of cache hits.
14+ Prometheus metrics are exposed at /metrics on port 9145.
15 log_retention:
16 type: int
17 default: 30
18@@ -81,9 +87,3 @@ options:
19 description: >
20 Sets the number of Nginx worker processes. Setting to '0' (auto)
21 will set based on available CPU cores.
22- enable_prometheus_metrics:
23- default: true
24- type: boolean
25- description: >
26- Export metrics for the number of requests and the number of cache hits.
27- Prometheus metrics are exposed at /metrics on port 9145.
28diff --git a/lib/haproxy.py b/lib/haproxy.py
29index cd92dbe..46e1431 100644
30--- a/lib/haproxy.py
31+++ b/lib/haproxy.py
32@@ -255,11 +255,11 @@ backend backend-{name}
33 template = env.get_template('templates/haproxy_cfg.tmpl')
34 return template.render(
35 {
36- 'listen': self.render_stanza_listen(config),
37 'backend': self.render_stanza_backend(config),
38- 'num_threads': num_threads,
39+ 'listen': self.render_stanza_listen(config),
40 'max_connections': self.max_connections,
41 'monitoring_password': monitoring_password or self.monitoring_password,
42+ 'num_threads': num_threads,
43 'tls_cipher_suites': tls_cipher_suites,
44 }
45 )

Subscribers

People subscribed via source and target branches