Fix ipv6 address issue causing mariadb ingress not ready

In nginx.tmpl, it not enclose ipv6 addresses in square brackets
resulting in them being unable to be parsed, which cause mariadb
ingress pod could not be ready.

Tested it on both ipv4 and ipv6 simplex setup, it fixes mariadb
ingress not ready issue.

Upstream patch submitted as below
https://review.opendev.org/#/c/710413/

Partial-Bug: 1859641

Change-Id: Ic7726eea671bbedf4f37fbe31965bc8fffd2e8cd
Signed-off-by: Zhipeng Liu <zhipengs.liu@intel.com>
This commit is contained in:
Zhipeng Liu 2020-02-27 01:28:58 +08:00 committed by zhipeng liu
parent 80c05681f3
commit 4aeacc3e17
2 changed files with 34 additions and 0 deletions

View File

@ -23,6 +23,7 @@ Patch05: 0005-Add-TLS-support-for-Gnocchi-public-endpoint.patch
Patch06: 0006-Fix-pod-restarts-on-all-workers-when-worker-added-re.patch
Patch07: 0007-Add-io_thread_pool-for-rabbitmq.patch
Patch08: 0008-Enable-override-of-rabbitmq-probe-parameters.patch
Patch09: 0009-Fix-ipv6-address-issue-causing-mariadb-ingress-not-ready.patch
BuildRequires: helm
@ -39,6 +40,7 @@ Openstack Helm Infra charts
%patch06 -p1
%patch07 -p1
%patch08 -p1
%patch09 -p1
%build
# initialize helm and build the toolkit

View File

@ -0,0 +1,32 @@
From 6fccedb6743ea240d52fbe52f3129e7dc5ee29db Mon Sep 17 00:00:00 2001
From: Zhipeng Liu <zhipengs.liu@intel.com>
Date: Thu, 27 Feb 2020 01:01:57 +0800
Subject: [PATCH] Fix ipv6 address issue causing mariadb ingress not ready
Signed-off-by: Zhipeng Liu <zhipengs.liu@intel.com>
---
mariadb/files/nginx.tmpl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mariadb/files/nginx.tmpl b/mariadb/files/nginx.tmpl
index 5ec3d0d..356fad5 100644
--- a/mariadb/files/nginx.tmpl
+++ b/mariadb/files/nginx.tmpl
@@ -473,11 +473,11 @@ stream {
{{ range $j, $endpoint := $tcpServer.Endpoints }}
{{ if eq $j 0 }}
# NOTE(portdirect): see https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-health-check/#passive-tcp-health-checks to tune passive healthchecks
- server {{ $endpoint.Address }}:{{ $endpoint.Port }};
+ server {{ formatIP $endpoint.Address }}:{{ $endpoint.Port }};
{{ else if eq $j 1 }}
- server {{ $endpoint.Address }}:{{ $endpoint.Port }} backup;
+ server {{ formatIP $endpoint.Address }}:{{ $endpoint.Port }} backup;
{{ else }}
- server {{ $endpoint.Address }}:{{ $endpoint.Port }} down;
+ server {{ formatIP $endpoint.Address }}:{{ $endpoint.Port }} down;
{{ end }}
{{ end }}
}
--
2.7.4