From 28d715e09ab1cb04beb65ba55a1be1e3ef956f39 Mon Sep 17 00:00:00 2001 From: xuriwuyun Date: Fri, 18 Oct 2024 15:26:44 +0800 Subject: [PATCH] chore: cp mysql auditlog plugin instead of mv --- addons/mysql/templates/clusterversion.yaml | 6 ++---- addons/mysql/templates/cmpd-mysql57.yaml | 3 +-- addons/mysql/templates/cmpd-mysql80.yaml | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/addons/mysql/templates/clusterversion.yaml b/addons/mysql/templates/clusterversion.yaml index 100e8ebc7..e47cf8ec0 100644 --- a/addons/mysql/templates/clusterversion.yaml +++ b/addons/mysql/templates/clusterversion.yaml @@ -58,8 +58,7 @@ spec: - bash - -c - | - mv {{ .Values.dataMountPath }}/plugin/audit_log.so /usr/lib64/mysql/plugin/ - rm -rf {{ .Values.dataMountPath }}/plugin + cp {{ .Values.dataMountPath }}/plugin/audit_log.so /usr/lib64/mysql/plugin/ chown -R mysql:root {{ .Values.dataMountPath }} skip_slave_start="OFF" if [ -f {{ .Values.dataMountPath }}/data/.restore_new_cluster ]; then @@ -128,8 +127,7 @@ spec: - bash - -c - | - mv {{ .Values.dataMountPath }}/plugin/audit_log.so /usr/lib64/mysql/plugin/ - rm -rf {{ .Values.dataMountPath }}/plugin + cp {{ .Values.dataMountPath }}/plugin/audit_log.so /usr/lib64/mysql/plugin/ chown -R mysql:root {{ .Values.dataMountPath }} skip_replica_start="OFF" if [ -f {{ .Values.dataMountPath }}/data/.restore_new_cluster ]; then diff --git a/addons/mysql/templates/cmpd-mysql57.yaml b/addons/mysql/templates/cmpd-mysql57.yaml index 8edcf05cf..12667ad02 100644 --- a/addons/mysql/templates/cmpd-mysql57.yaml +++ b/addons/mysql/templates/cmpd-mysql57.yaml @@ -54,8 +54,7 @@ spec: - bash - -c - | - mv {{ .Values.dataMountPath }}/plugin/audit_log.so /usr/lib64/mysql/plugin/ - rm -rf {{ .Values.dataMountPath }}/plugin + cp {{ .Values.dataMountPath }}/plugin/audit_log.so /usr/lib64/mysql/plugin/ chown -R mysql:root {{ .Values.dataMountPath }} skip_slave_start="OFF" if [ -f {{ .Values.dataMountPath }}/data/.restore_new_cluster ]; then diff --git a/addons/mysql/templates/cmpd-mysql80.yaml b/addons/mysql/templates/cmpd-mysql80.yaml index 53ad49df5..9d8ff171b 100644 --- a/addons/mysql/templates/cmpd-mysql80.yaml +++ b/addons/mysql/templates/cmpd-mysql80.yaml @@ -54,8 +54,7 @@ spec: - bash - -c - | - mv {{ .Values.dataMountPath }}/plugin/audit_log.so /usr/lib64/mysql/plugin/ - rm -rf {{ .Values.dataMountPath }}/plugin + cp {{ .Values.dataMountPath }}/plugin/audit_log.so /usr/lib64/mysql/plugin/ chown -R mysql:root {{ .Values.dataMountPath }} skip_slave_start="OFF" if [ -f {{ .Values.dataMountPath }}/data/.restore_new_cluster ]; then