Fix the second mariadb node could not join cluster issue.
This bug was introduced by below commit
d3164c63dc
The update after PATCH SET 10 will cause the second mariadb could not
join cluster. In this case, could not set bind_address=:: for ipv4. It
only works for ipv6.
As for conf.database.config_override, we can override it through
system helm-override-update command, but could not use python
plugin to dynamically override it as it will introduce a "-|" line
in first line of config file.
A user override for conf.database.config_override might break the IPv6
system overrides, it need including ipv6 config for ipv6 case as well.
Test pass on duplex setup. Openstack application applied successfully.
Closes-Bug: 1886003
Change-Id: I23c2fb6a7c8b5a38af1e046894d5fae247df2d6f
Signed-off-by: Zhipeng Liu <zhipengs.liu@intel.com>
This commit is contained in:
parent
171e714aba
commit
2496a170fe
@ -1,26 +1,56 @@
|
||||
From 76438c37cc1c5b04ef4326b0810dbff281a8ed48 Mon Sep 17 00:00:00 2001
|
||||
From 64815b6eef92a949e607c7382ac3c93f568497c1 Mon Sep 17 00:00:00 2001
|
||||
From: "Liu, ZhipengS" <zhipengs.liu@intel.com>
|
||||
Date: Sun, 14 Jun 2020 12:43:44 +0000
|
||||
Date: Thu, 28 May 2020 08:03:42 +0000
|
||||
Subject: [PATCH] Add mariadb database config override to support ipv6
|
||||
|
||||
Signed-off-by: Liu, ZhipengS <zhipengs.liu@intel.com>
|
||||
---
|
||||
mariadb/values.yaml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
mariadb/templates/configmap-etc.yaml | 8 ++++++++
|
||||
mariadb/templates/statefulset.yaml | 2 +-
|
||||
mariadb/values.yaml | 1 +
|
||||
3 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mariadb/templates/configmap-etc.yaml b/mariadb/templates/configmap-etc.yaml
|
||||
index feb1714..866028d 100644
|
||||
--- a/mariadb/templates/configmap-etc.yaml
|
||||
+++ b/mariadb/templates/configmap-etc.yaml
|
||||
@@ -26,6 +26,14 @@ data:
|
||||
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" ( index $envAll.Values.conf.database "00_base" ) "key" "00-base.cnf" ) | indent 2 }}
|
||||
{{- if $envAll.Values.conf.database.config_override }}
|
||||
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" ( index $envAll.Values.conf.database "config_override" ) "key" "20-override.cnf" ) | indent 2 }}
|
||||
+{{- else }}
|
||||
+# A user override for conf.database.config_override might break the IPv6 system overrides, need including below ipv6
|
||||
+# config for ipv6 case in user override as well.
|
||||
+{{- if $envAll.Values.manifests.config_ipv6 }}
|
||||
+ 20-override.cnf: |
|
||||
+ [mysqld]
|
||||
+ bind_address=::
|
||||
+{{- end }}
|
||||
{{- end }}
|
||||
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" ( index $envAll.Values.conf.database "99_force" ) "key" "99-force.cnf" ) | indent 2 }}
|
||||
{{- end }}
|
||||
diff --git a/mariadb/templates/statefulset.yaml b/mariadb/templates/statefulset.yaml
|
||||
index 83e135f..3ef7383 100644
|
||||
--- a/mariadb/templates/statefulset.yaml
|
||||
+++ b/mariadb/templates/statefulset.yaml
|
||||
@@ -216,7 +216,7 @@ spec:
|
||||
mountPath: /etc/mysql/conf.d/00-base.cnf
|
||||
subPath: 00-base.cnf
|
||||
readOnly: true
|
||||
- {{- if .Values.conf.database.config_override }}
|
||||
+ {{- if or (.Values.conf.database.config_override) (.Values.manifests.config_ipv6) }}
|
||||
- name: mariadb-etc
|
||||
mountPath: /etc/mysql/conf.d/20-override.cnf
|
||||
subPath: 20-override.cnf
|
||||
diff --git a/mariadb/values.yaml b/mariadb/values.yaml
|
||||
index 444bba3..335195c 100644
|
||||
index 444bba3..880b31e 100644
|
||||
--- a/mariadb/values.yaml
|
||||
+++ b/mariadb/values.yaml
|
||||
@@ -327,7 +327,7 @@ conf:
|
||||
log_queries_not_using_indexes=on
|
||||
|
||||
# Networking
|
||||
- bind_address=0.0.0.0
|
||||
+ bind_address=::
|
||||
port={{ tuple "oslo_db" "direct" "mysql" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
|
||||
# When a client connects, the server will perform hostname resolution,
|
||||
--
|
||||
@@ -550,3 +550,4 @@ manifests:
|
||||
service_error: true
|
||||
service: true
|
||||
statefulset: true
|
||||
+ config_ipv6: false
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
@ -28,7 +28,10 @@ class MariadbHelm(openstack.OpenstackBaseHelm):
|
||||
'ingress': self._num_controllers()
|
||||
}
|
||||
},
|
||||
'endpoints': self._get_endpoints_overrides()
|
||||
'endpoints': self._get_endpoints_overrides(),
|
||||
'manifests': {
|
||||
'config_ipv6': self._is_ipv6_cluster_service()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user