Merge ~hloeung/content-cache-charm:request-unique-id into content-cache-charm:master

Proposed by Haw Loeung
Status: Merged
Approved by: Haw Loeung
Approved revision: 6d4da42f8e7c97fd0c08e2fc9391860e55aa6e72
Merged at revision: c31db9cb441c2d3cacf6446555a86d3c60142a35
Proposed branch: ~hloeung/content-cache-charm:request-unique-id
Merge into: content-cache-charm:master
Diff against target: 167 lines (+26/-1)
13 files modified
files/nginx-logging-format.conf (+2/-1)
templates/haproxy_cfg.tmpl (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output2.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output3.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt (+2/-0)
tests/unit/files/haproxy_config_rendered_test_output.txt (+2/-0)
tests/unit/files/haproxy_config_rendered_test_output2.txt (+2/-0)
Reviewer Review Type Date Requested Status
Barry Price Approve
Canonical IS Reviewers Pending
Review via email: mp+396628@code.launchpad.net

Commit message

Add and log unique request ID - LP:1895255

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
Barry Price (barryprice) wrote :

LGTM

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

Change successfully merged at revision c31db9cb441c2d3cacf6446555a86d3c60142a35

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/files/nginx-logging-format.conf b/files/nginx-logging-format.conf
2index 8591b3e..a646743 100644
3--- a/files/nginx-logging-format.conf
4+++ b/files/nginx-logging-format.conf
5@@ -1,4 +1,5 @@
6 log_format content_cache '$http_x_forwarded_for - $remote_user [$time_local] '
7 '"$request" $status $bytes_sent '
8 '"$http_referer" "$http_user_agent" $request_time '
9- '$upstream_cache_status $upstream_response_time';
10+ '$upstream_cache_status $upstream_response_time '
11+ '$http_x_cache_request_id';
12diff --git a/templates/haproxy_cfg.tmpl b/templates/haproxy_cfg.tmpl
13index a3cde98..c462862 100644
14--- a/templates/haproxy_cfg.tmpl
15+++ b/templates/haproxy_cfg.tmpl
16@@ -60,6 +60,8 @@ defaults
17 errorfile 503 /etc/haproxy/errors/503.http
18 errorfile 504 /etc/haproxy/errors/504.http
19 load-server-state-from-file global
20+ unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
21+ unique-id-header X-Cache-Request-ID
22
23 {%- if dns_servers %}
24
25diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
26index 12f481f..586dc1d 100644
27--- a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
28+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
29@@ -55,6 +55,8 @@ defaults
30 errorfile 503 /etc/haproxy/errors/503.http
31 errorfile 504 /etc/haproxy/errors/504.http
32 load-server-state-from-file global
33+ unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
34+ unique-id-header X-Cache-Request-ID
35
36 resolvers dns
37 nameserver dns1 127.0.0.53:53
38diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt
39index 2d3339e..4597b93 100644
40--- a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt
41+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt
42@@ -55,6 +55,8 @@ defaults
43 errorfile 503 /etc/haproxy/errors/503.http
44 errorfile 504 /etc/haproxy/errors/504.http
45 load-server-state-from-file global
46+ unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
47+ unique-id-header X-Cache-Request-ID
48
49 resolvers dns
50 nameserver dns1 127.0.0.53:53
51diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt
52index fa61835..719da1e 100644
53--- a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt
54+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt
55@@ -55,6 +55,8 @@ defaults
56 errorfile 503 /etc/haproxy/errors/503.http
57 errorfile 504 /etc/haproxy/errors/504.http
58 load-server-state-from-file global
59+ unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
60+ unique-id-header X-Cache-Request-ID
61
62 resolvers dns
63 nameserver dns1 127.0.0.53:53
64diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt
65index 0c986d5..022246c 100644
66--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt
67+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt
68@@ -55,6 +55,8 @@ defaults
69 errorfile 503 /etc/haproxy/errors/503.http
70 errorfile 504 /etc/haproxy/errors/504.http
71 load-server-state-from-file global
72+ unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
73+ unique-id-header X-Cache-Request-ID
74
75 resolvers dns
76 nameserver dns1 127.0.0.53:53
77diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt
78index 2750da6..449cad7 100644
79--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt
80+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt
81@@ -55,6 +55,8 @@ defaults
82 errorfile 503 /etc/haproxy/errors/503.http
83 errorfile 504 /etc/haproxy/errors/504.http
84 load-server-state-from-file global
85+ unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
86+ unique-id-header X-Cache-Request-ID
87
88 resolvers dns
89 nameserver dns1 127.0.0.53:53
90diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt
91index 7256404..628b473 100644
92--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt
93+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt
94@@ -55,6 +55,8 @@ defaults
95 errorfile 503 /etc/haproxy/errors/503.http
96 errorfile 504 /etc/haproxy/errors/504.http
97 load-server-state-from-file global
98+ unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
99+ unique-id-header X-Cache-Request-ID
100
101 resolvers dns
102 nameserver dns1 127.0.0.53:53
103diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt
104index 63f66ca..1cb3452 100644
105--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt
106+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt
107@@ -56,6 +56,8 @@ defaults
108 errorfile 503 /etc/haproxy/errors/503.http
109 errorfile 504 /etc/haproxy/errors/504.http
110 load-server-state-from-file global
111+ unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
112+ unique-id-header X-Cache-Request-ID
113
114 resolvers dns
115 nameserver dns1 127.0.0.53:53
116diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt
117index 8902d3b..fd80c70 100644
118--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt
119+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt
120@@ -55,6 +55,8 @@ defaults
121 errorfile 503 /etc/haproxy/errors/503.http
122 errorfile 504 /etc/haproxy/errors/504.http
123 load-server-state-from-file global
124+ unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
125+ unique-id-header X-Cache-Request-ID
126
127 resolvers dns
128 nameserver dns1 127.0.0.53:53
129diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt
130index a043747..8da9f97 100644
131--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt
132+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt
133@@ -55,6 +55,8 @@ defaults
134 errorfile 503 /etc/haproxy/errors/503.http
135 errorfile 504 /etc/haproxy/errors/504.http
136 load-server-state-from-file global
137+ unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
138+ unique-id-header X-Cache-Request-ID
139
140 resolvers dns
141 nameserver dns1 127.0.0.53:53
142diff --git a/tests/unit/files/haproxy_config_rendered_test_output.txt b/tests/unit/files/haproxy_config_rendered_test_output.txt
143index 02feece..aa48b76 100644
144--- a/tests/unit/files/haproxy_config_rendered_test_output.txt
145+++ b/tests/unit/files/haproxy_config_rendered_test_output.txt
146@@ -56,6 +56,8 @@ defaults
147 errorfile 503 /etc/haproxy/errors/503.http
148 errorfile 504 /etc/haproxy/errors/504.http
149 load-server-state-from-file global
150+ unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
151+ unique-id-header X-Cache-Request-ID
152
153 resolvers dns
154 nameserver dns1 127.0.0.53:53
155diff --git a/tests/unit/files/haproxy_config_rendered_test_output2.txt b/tests/unit/files/haproxy_config_rendered_test_output2.txt
156index 6c480c4..c8c4130 100644
157--- a/tests/unit/files/haproxy_config_rendered_test_output2.txt
158+++ b/tests/unit/files/haproxy_config_rendered_test_output2.txt
159@@ -56,6 +56,8 @@ defaults
160 errorfile 503 /etc/haproxy/errors/503.http
161 errorfile 504 /etc/haproxy/errors/504.http
162 load-server-state-from-file global
163+ unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
164+ unique-id-header X-Cache-Request-ID
165
166 resolvers dns
167 nameserver dns1 127.0.0.53:53

Subscribers

People subscribed via source and target branches