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
diff --git a/files/nginx-logging-format.conf b/files/nginx-logging-format.conf
index 8591b3e..a646743 100644
--- a/files/nginx-logging-format.conf
+++ b/files/nginx-logging-format.conf
@@ -1,4 +1,5 @@
1log_format content_cache '$http_x_forwarded_for - $remote_user [$time_local] '1log_format content_cache '$http_x_forwarded_for - $remote_user [$time_local] '
2 '"$request" $status $bytes_sent '2 '"$request" $status $bytes_sent '
3 '"$http_referer" "$http_user_agent" $request_time '3 '"$http_referer" "$http_user_agent" $request_time '
4 '$upstream_cache_status $upstream_response_time';4 '$upstream_cache_status $upstream_response_time '
5 '$http_x_cache_request_id';
diff --git a/templates/haproxy_cfg.tmpl b/templates/haproxy_cfg.tmpl
index a3cde98..c462862 100644
--- a/templates/haproxy_cfg.tmpl
+++ b/templates/haproxy_cfg.tmpl
@@ -60,6 +60,8 @@ defaults
60 errorfile 503 /etc/haproxy/errors/503.http60 errorfile 503 /etc/haproxy/errors/503.http
61 errorfile 504 /etc/haproxy/errors/504.http61 errorfile 504 /etc/haproxy/errors/504.http
62 load-server-state-from-file global62 load-server-state-from-file global
63 unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
64 unique-id-header X-Cache-Request-ID
6365
64{%- if dns_servers %}66{%- if dns_servers %}
6567
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
index 12f481f..586dc1d 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
@@ -55,6 +55,8 @@ defaults
55 errorfile 503 /etc/haproxy/errors/503.http55 errorfile 503 /etc/haproxy/errors/503.http
56 errorfile 504 /etc/haproxy/errors/504.http56 errorfile 504 /etc/haproxy/errors/504.http
57 load-server-state-from-file global57 load-server-state-from-file global
58 unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
59 unique-id-header X-Cache-Request-ID
5860
59resolvers dns61resolvers dns
60 nameserver dns1 127.0.0.53:5362 nameserver dns1 127.0.0.53:53
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt
index 2d3339e..4597b93 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt
@@ -55,6 +55,8 @@ defaults
55 errorfile 503 /etc/haproxy/errors/503.http55 errorfile 503 /etc/haproxy/errors/503.http
56 errorfile 504 /etc/haproxy/errors/504.http56 errorfile 504 /etc/haproxy/errors/504.http
57 load-server-state-from-file global57 load-server-state-from-file global
58 unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
59 unique-id-header X-Cache-Request-ID
5860
59resolvers dns61resolvers dns
60 nameserver dns1 127.0.0.53:5362 nameserver dns1 127.0.0.53:53
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt
index fa61835..719da1e 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt
@@ -55,6 +55,8 @@ defaults
55 errorfile 503 /etc/haproxy/errors/503.http55 errorfile 503 /etc/haproxy/errors/503.http
56 errorfile 504 /etc/haproxy/errors/504.http56 errorfile 504 /etc/haproxy/errors/504.http
57 load-server-state-from-file global57 load-server-state-from-file global
58 unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
59 unique-id-header X-Cache-Request-ID
5860
59resolvers dns61resolvers dns
60 nameserver dns1 127.0.0.53:5362 nameserver dns1 127.0.0.53:53
diff --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
index 0c986d5..022246c 100644
--- 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
@@ -55,6 +55,8 @@ defaults
55 errorfile 503 /etc/haproxy/errors/503.http55 errorfile 503 /etc/haproxy/errors/503.http
56 errorfile 504 /etc/haproxy/errors/504.http56 errorfile 504 /etc/haproxy/errors/504.http
57 load-server-state-from-file global57 load-server-state-from-file global
58 unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
59 unique-id-header X-Cache-Request-ID
5860
59resolvers dns61resolvers dns
60 nameserver dns1 127.0.0.53:5362 nameserver dns1 127.0.0.53:53
diff --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
index 2750da6..449cad7 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt
@@ -55,6 +55,8 @@ defaults
55 errorfile 503 /etc/haproxy/errors/503.http55 errorfile 503 /etc/haproxy/errors/503.http
56 errorfile 504 /etc/haproxy/errors/504.http56 errorfile 504 /etc/haproxy/errors/504.http
57 load-server-state-from-file global57 load-server-state-from-file global
58 unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
59 unique-id-header X-Cache-Request-ID
5860
59resolvers dns61resolvers dns
60 nameserver dns1 127.0.0.53:5362 nameserver dns1 127.0.0.53:53
diff --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
index 7256404..628b473 100644
--- 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
@@ -55,6 +55,8 @@ defaults
55 errorfile 503 /etc/haproxy/errors/503.http55 errorfile 503 /etc/haproxy/errors/503.http
56 errorfile 504 /etc/haproxy/errors/504.http56 errorfile 504 /etc/haproxy/errors/504.http
57 load-server-state-from-file global57 load-server-state-from-file global
58 unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
59 unique-id-header X-Cache-Request-ID
5860
59resolvers dns61resolvers dns
60 nameserver dns1 127.0.0.53:5362 nameserver dns1 127.0.0.53:53
diff --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
index 63f66ca..1cb3452 100644
--- 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
@@ -56,6 +56,8 @@ defaults
56 errorfile 503 /etc/haproxy/errors/503.http56 errorfile 503 /etc/haproxy/errors/503.http
57 errorfile 504 /etc/haproxy/errors/504.http57 errorfile 504 /etc/haproxy/errors/504.http
58 load-server-state-from-file global58 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
5961
60resolvers dns62resolvers dns
61 nameserver dns1 127.0.0.53:5363 nameserver dns1 127.0.0.53:53
diff --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
index 8902d3b..fd80c70 100644
--- 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
@@ -55,6 +55,8 @@ defaults
55 errorfile 503 /etc/haproxy/errors/503.http55 errorfile 503 /etc/haproxy/errors/503.http
56 errorfile 504 /etc/haproxy/errors/504.http56 errorfile 504 /etc/haproxy/errors/504.http
57 load-server-state-from-file global57 load-server-state-from-file global
58 unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
59 unique-id-header X-Cache-Request-ID
5860
59resolvers dns61resolvers dns
60 nameserver dns1 127.0.0.53:5362 nameserver dns1 127.0.0.53:53
diff --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
index a043747..8da9f97 100644
--- 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
@@ -55,6 +55,8 @@ defaults
55 errorfile 503 /etc/haproxy/errors/503.http55 errorfile 503 /etc/haproxy/errors/503.http
56 errorfile 504 /etc/haproxy/errors/504.http56 errorfile 504 /etc/haproxy/errors/504.http
57 load-server-state-from-file global57 load-server-state-from-file global
58 unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
59 unique-id-header X-Cache-Request-ID
5860
59resolvers dns61resolvers dns
60 nameserver dns1 127.0.0.53:5362 nameserver dns1 127.0.0.53:53
diff --git a/tests/unit/files/haproxy_config_rendered_test_output.txt b/tests/unit/files/haproxy_config_rendered_test_output.txt
index 02feece..aa48b76 100644
--- a/tests/unit/files/haproxy_config_rendered_test_output.txt
+++ b/tests/unit/files/haproxy_config_rendered_test_output.txt
@@ -56,6 +56,8 @@ defaults
56 errorfile 503 /etc/haproxy/errors/503.http56 errorfile 503 /etc/haproxy/errors/503.http
57 errorfile 504 /etc/haproxy/errors/504.http57 errorfile 504 /etc/haproxy/errors/504.http
58 load-server-state-from-file global58 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
5961
60resolvers dns62resolvers dns
61 nameserver dns1 127.0.0.53:5363 nameserver dns1 127.0.0.53:53
diff --git a/tests/unit/files/haproxy_config_rendered_test_output2.txt b/tests/unit/files/haproxy_config_rendered_test_output2.txt
index 6c480c4..c8c4130 100644
--- a/tests/unit/files/haproxy_config_rendered_test_output2.txt
+++ b/tests/unit/files/haproxy_config_rendered_test_output2.txt
@@ -56,6 +56,8 @@ defaults
56 errorfile 503 /etc/haproxy/errors/503.http56 errorfile 503 /etc/haproxy/errors/503.http
57 errorfile 504 /etc/haproxy/errors/504.http57 errorfile 504 /etc/haproxy/errors/504.http
58 load-server-state-from-file global58 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
5961
60resolvers dns62resolvers dns
61 nameserver dns1 127.0.0.53:5363 nameserver dns1 127.0.0.53:53

Subscribers

People subscribed via source and target branches