Merge lp:~bloodearnest/charm-haproxy/merge-trunk-snapstore into lp:charm-haproxy

Proposed by Simon Davy
Status: Superseded
Proposed branch: lp:~bloodearnest/charm-haproxy/merge-trunk-snapstore
Merge into: lp:charm-haproxy
Diff against target: 59 lines (+20/-12)
2 files modified
files/nrpe/check_haproxy_queue_depth.sh (+2/-2)
hooks/hooks.py (+18/-10)
To merge this branch: bzr merge lp:~bloodearnest/charm-haproxy/merge-trunk-snapstore
Reviewer Review Type Date Requested Status
haproxy-team Pending
Review via email: mp+347843@code.launchpad.net

Commit message

Merge trunk for autocert support

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.

Unmerged revisions

113. By Simon Davy

merge trunk r114, with updated charm-helpers and autocert support

112. By Thomi Richards

Bump haproxy stupidity.

111. By Thomi Richards

Merge fixes to haproxy service config handling.

110. By William Grant

Increase nagios haproxy queue depth thresholds until they're configurable.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'files/nrpe/check_haproxy_queue_depth.sh'
2--- files/nrpe/check_haproxy_queue_depth.sh 2015-05-12 15:10:44 +0000
3+++ files/nrpe/check_haproxy_queue_depth.sh 2018-06-12 19:57:09 +0000
4@@ -7,8 +7,8 @@
5 # Author: Tom Haddon
6
7 # These should be config options at some stage
8-CURRQthrsh=0
9-MAXQthrsh=100
10+CURRQthrsh=10
11+MAXQthrsh=500
12
13 AUTH=$(grep -r "stats auth" /etc/haproxy | head -1 | awk '{print $4}')
14
15
16=== modified file 'hooks/hooks.py'
17--- hooks/hooks.py 2018-06-07 14:13:03 +0000
18+++ hooks/hooks.py 2018-06-12 19:57:09 +0000
19@@ -347,16 +347,24 @@
20 if any(map(o.strip().startswith, service_options)):
21 fe_options.append(o)
22 be_options.append(o)
23+
24 # Filter provided service options into frontend-only and backend-only.
25- results = izip(
26- (fe_options, be_options),
27- (True, False),
28- tee((o, any(map(o.strip().startswith,
29- frontend_only_options)))
30- for o in service_options))
31- for out, cond, result in results:
32- out.extend(option for option, match in result
33- if match is cond and option not in out)
34+ # XXX: The '<FE>' and '<BE>' feature is a local patch in this version
35+ # of the charm, and is not present in the upstream charm.
36+ for option in service_options:
37+ option = option.strip()
38+ if option.startswith('<FE>'):
39+ fe_options.append(option[4:].strip())
40+ elif option.startswith('<BE>'):
41+ be_options.append(option[4:].strip())
42+ else:
43+ if any(map(option.startswith, frontend_only_options)):
44+ if option not in fe_options:
45+ fe_options.append(option)
46+ else:
47+ if option not in be_options:
48+ be_options.append(option)
49+
50 service_config = []
51 unit_name = os.environ["JUJU_UNIT_NAME"].replace("/", "-")
52 service_config.append("frontend %s-%s" % (unit_name, service_port))
53@@ -795,7 +803,7 @@
54 service_name,
55 service_config['service_host'],
56 service_config['service_port'],
57- service_config['service_options'],
58+ service_config.get('service_options', []),
59 server_entries, errorfiles, crts, backends))
60
61

Subscribers

People subscribed via source and target branches

to all changes: