-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
K8SPXC-1410 add PXC 8.4.X support #1878
Changes from all commits
eb35fca
3e1c080
3724613
160ad63
86068ce
5b82e85
48999f7
df55f48
c6e48ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -41,7 +41,7 @@ | |||||||||
elif [ "${!fileVar:-}" ]; then | ||||||||||
val="$(<"${!fileVar}")" | ||||||||||
elif [ "${3:-}" ] && [ -f "/etc/mysql/mysql-users-secret/$3" ]; then | ||||||||||
val="$(</etc/mysql/mysql-users-secret/$3)" | ||||||||||
Check notice on line 44 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L44 <ShellCheck.SC2086>
Raw output
|
||||||||||
fi | ||||||||||
export "$var"="$val" | ||||||||||
unset "$fileVar" | ||||||||||
|
@@ -60,7 +60,7 @@ | |||||||||
case "$f" in | ||||||||||
*.sh) | ||||||||||
echo "$0: running $f" | ||||||||||
. "$f" | ||||||||||
Check warning on line 63 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L63 <ShellCheck.SC1090>
Raw output
|
||||||||||
;; | ||||||||||
*.sql) | ||||||||||
echo "$0: running $f" | ||||||||||
|
@@ -165,7 +165,7 @@ | |||||||||
sed -i "/\[mysqld\]/a early-plugin-load=keyring_vault.so" $CFG | ||||||||||
sed -i "/\[mysqld\]/a keyring_vault_config=$vault_secret" $CFG | ||||||||||
|
||||||||||
if [ "$MYSQL_VERSION" == '8.0' ]; then | ||||||||||
if [[ "$MYSQL_VERSION" =~ ^(8\.0|8\.4)$ ]]; then | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [shfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||
sed -i "/\[mysqld\]/a default_table_encryption=ON" $CFG | ||||||||||
sed -i "/\[mysqld\]/a table_encryption_privilege_check=ON" $CFG | ||||||||||
sed -i "/\[mysqld\]/a innodb_undo_log_encrypt=ON" $CFG | ||||||||||
|
@@ -189,12 +189,11 @@ | |||||||||
grep -q "^progress=" $CFG && sed -i "s|^progress=.*|progress=1|" $CFG | ||||||||||
grep -q "^\[sst\]" "$CFG" || printf '[sst]\n' >>"$CFG" | ||||||||||
grep -q "^cpat=" "$CFG" || sed '/^\[sst\]/a cpat=.*\\.pem$\\|.*init\\.ok$\\|.*galera\\.cache$\\|.*wsrep_recovery_verbose\\.log$\\|.*readiness-check\\.sh$\\|.*liveness-check\\.sh$\\|.*get-pxc-state$\\|.*sst_in_progress$\\|.*sleep-forever$\\|.*pmm-prerun\\.sh$\\|.*sst-xb-tmpdir$\\|.*\\.sst$\\|.*gvwstate\\.dat$\\|.*grastate\\.dat$\\|.*\\.err$\\|.*\\.log$\\|.*RPM_UPGRADE_MARKER$\\|.*RPM_UPGRADE_HISTORY$\\|.*pxc-entrypoint\\.sh$\\|.*unsafe-bootstrap\\.sh$\\|.*pxc-configure-pxc\\.sh\\|.*peer-list$\\|.*auth_plugin$\\|.*version_info$\\|.*mysql-state-monitor$\\|.*mysql-state-monitor\\.log$\\|.*notify\\.sock$\\|.*mysql\\.state$' "$CFG" 1<>"$CFG" | ||||||||||
if [[ $MYSQL_VERSION == '8.0' ]]; then | ||||||||||
if [[ $MYSQL_PATCH_VERSION -ge 26 ]]; then | ||||||||||
grep -q "^skip_replica_start=ON" "$CFG" || sed -i "/\[mysqld\]/a skip_replica_start=ON" $CFG | ||||||||||
else | ||||||||||
grep -q "^skip_slave_start=ON" "$CFG" || sed -i "/\[mysqld\]/a skip_slave_start=ON" $CFG | ||||||||||
fi | ||||||||||
|
||||||||||
if [[ $MYSQL_VERSION == '8.0' && $MYSQL_PATCH_VERSION -ge 26 ]] || [[ $MYSQL_VERSION == '8.4' ]]; then | ||||||||||
grep -q "^skip_replica_start=ON" "$CFG" || sed -i "/\[mysqld\]/a skip_replica_start=ON" $CFG | ||||||||||
else | ||||||||||
grep -q "^skip_slave_start=ON" "$CFG" || sed -i "/\[mysqld\]/a skip_slave_start=ON" $CFG | ||||||||||
fi | ||||||||||
|
||||||||||
auth_plugin=${DEFAULT_AUTHENTICATION_PLUGIN} | ||||||||||
|
@@ -220,7 +219,7 @@ | |||||||||
echo "${auth_plugin}" >/var/lib/mysql/auth_plugin | ||||||||||
|
||||||||||
sed -i "/default_authentication_plugin/d" $CFG | ||||||||||
if [[ $MYSQL_VERSION == '8.0' && $MYSQL_PATCH_VERSION -ge 27 ]]; then | ||||||||||
if [[ $MYSQL_VERSION == '8.0' && $MYSQL_PATCH_VERSION -ge 27 ]] || [[ $MYSQL_VERSION == "8.4" ]]; then | ||||||||||
sed -i "/\[mysqld\]/a authentication_policy=${auth_plugin},," $CFG | ||||||||||
else | ||||||||||
sed -i "/\[mysqld\]/a default_authentication_plugin=${auth_plugin}" $CFG | ||||||||||
|
@@ -249,7 +248,7 @@ | |||||||||
i=$(curl "$DISCOVERY_SERVICE/v2/keys/pxc-cluster/queue/$CLUSTER_NAME" | jq -r '.node.nodes[].value') | ||||||||||
|
||||||||||
# this remove my ip from the list | ||||||||||
i1="${i[@]//$NODE_IP/}" | ||||||||||
Check warning on line 251 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L251 <ShellCheck.SC2124>
Raw output
|
||||||||||
|
||||||||||
# Register the current IP in the discovery service | ||||||||||
# key set to expire in 30 sec. There is a cronjob that should update them regularly | ||||||||||
|
@@ -259,8 +258,8 @@ | |||||||||
|
||||||||||
i=$(curl "$DISCOVERY_SERVICE/v2/keys/pxc-cluster/$CLUSTER_NAME/?quorum=true" | jq -r '.node.nodes[]?.key' | awk -F'/' '{print $(NF)}') | ||||||||||
# this remove my ip from the list | ||||||||||
i2="${i[@]//$NODE_IP/}" | ||||||||||
Check warning on line 261 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L261 <ShellCheck.SC2124>
Raw output
|
||||||||||
CLUSTER_JOIN=$(join , $i1 $i2) | ||||||||||
Check notice on line 262 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L262 <ShellCheck.SC2086>
Raw output
Check notice on line 262 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L262 <ShellCheck.SC2086>
Raw output
|
||||||||||
|
||||||||||
sed -r "s|^[#]?wsrep_node_address=.*$|wsrep_node_address=${NODE_IP}|" "${CFG}" 1<>"${CFG}" | ||||||||||
sed -r "s|^[#]?wsrep_cluster_name=.*$|wsrep_cluster_name=${CLUSTER_NAME}|" "${CFG}" 1<>"${CFG}" | ||||||||||
|
@@ -293,14 +292,13 @@ | |||||||||
echo "Cluster name is invalid, please check DNS" | ||||||||||
exit 1 | ||||||||||
fi | ||||||||||
|
||||||||||
if [[ -n ${NOTIFY_SOCKET} && ${MYSQL_VERSION} == '8.0' ]]; then | ||||||||||
if [[ -n ${NOTIFY_SOCKET} && ${MYSQL_VERSION} =~ ^(8\.0|8\.4)$ ]]; then | ||||||||||
nohup /var/lib/mysql/mysql-state-monitor >/var/lib/mysql/mysql-state-monitor.log 2>&1 < /dev/null & | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [shfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||
fi | ||||||||||
|
||||||||||
# if we have CLUSTER_JOIN - then we do not need to perform datadir initialize | ||||||||||
# the data will be copied from another node | ||||||||||
if [ -z "$CLUSTER_JOIN" ] && [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then | ||||||||||
Check warning on line 301 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L301 <ShellCheck.SC2166>
Raw output
|
||||||||||
# still need to check config, container may have started with --user | ||||||||||
_check_config "$@" | ||||||||||
|
||||||||||
|
@@ -313,7 +311,7 @@ | |||||||||
if [ ! -d "$DATADIR/mysql" ]; then | ||||||||||
file_env 'MYSQL_ROOT_PASSWORD' '' 'root' | ||||||||||
{ set +x; } 2>/dev/null | ||||||||||
if [ -z "$MYSQL_ROOT_PASSWORD" -a -z "$MYSQL_ALLOW_EMPTY_PASSWORD" -a -z "$MYSQL_RANDOM_ROOT_PASSWORD" ]; then | ||||||||||
Check warning on line 314 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L314 <ShellCheck.SC2166>
Raw output
Check warning on line 314 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L314 <ShellCheck.SC2166>
Raw output
|
||||||||||
echo >&2 'error: database is uninitialized and password option is not specified ' | ||||||||||
echo >&2 ' You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD' | ||||||||||
exit 1 | ||||||||||
|
@@ -327,7 +325,11 @@ | |||||||||
echo 'Initializing database' | ||||||||||
# we initialize database into $TMPDIR because "--initialize-insecure" option does not work if directory is not empty | ||||||||||
# in some cases storage driver creates unremovable artifacts (see K8SPXC-286), so $DATADIR cleanup is not possible | ||||||||||
"$@" --initialize-insecure --skip-ssl --datadir="$TMPDIR" | ||||||||||
if [[ $MYSQL_VERSION == "8.4" ]]; then | ||||||||||
"$@" --initialize-insecure --datadir="$TMPDIR" | ||||||||||
else | ||||||||||
"$@" --initialize-insecure --skip-ssl --datadir="$TMPDIR" | ||||||||||
fi | ||||||||||
mv "$TMPDIR"/* "$DATADIR/" | ||||||||||
rm -rfv "$TMPDIR" | ||||||||||
echo 'Database initialized' | ||||||||||
|
@@ -365,7 +367,7 @@ | |||||||||
fi | ||||||||||
|
||||||||||
{ set +x; } 2>/dev/null | ||||||||||
if [ ! -z "$MYSQL_RANDOM_ROOT_PASSWORD" ]; then | ||||||||||
MYSQL_ROOT_PASSWORD="$(pwmake 128)" | ||||||||||
echo "GENERATED ROOT PASSWORD: $MYSQL_ROOT_PASSWORD" | ||||||||||
fi | ||||||||||
|
@@ -373,7 +375,7 @@ | |||||||||
rootCreate= | ||||||||||
# default root to listen for connections from anywhere | ||||||||||
file_env 'MYSQL_ROOT_HOST' '%' | ||||||||||
if [ ! -z "$MYSQL_ROOT_HOST" -a "$MYSQL_ROOT_HOST" != 'localhost' ]; then | ||||||||||
Check notice on line 378 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L378 <ShellCheck.SC2236>
Raw output
Check warning on line 378 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L378 <ShellCheck.SC2166>
Raw output
|
||||||||||
# no, we don't care if read finds a terminating character in this heredoc | ||||||||||
# https://unix.stackexchange.com/questions/265149/why-is-set-o-errexit-breaking-this-read-heredoc-expression/265151#265151 | ||||||||||
read -r -d '' rootCreate <<-EOSQL || true | ||||||||||
|
@@ -385,15 +387,15 @@ | |||||||||
file_env 'MONITOR_HOST' 'localhost' | ||||||||||
file_env 'MONITOR_PASSWORD' 'monitor' 'monitor' | ||||||||||
file_env 'REPLICATION_PASSWORD' 'replication' 'replication' | ||||||||||
if [ "$MYSQL_VERSION" == '8.0' ]; then | ||||||||||
if [[ "$MYSQL_VERSION" =~ ^(8\.0|8\.4)$ ]]; then | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [shfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||
read -r -d '' monitorConnectGrant <<-EOSQL || true | ||||||||||
GRANT SERVICE_CONNECTION_ADMIN ON *.* TO 'monitor'@'${MONITOR_HOST}'; | ||||||||||
EOSQL | ||||||||||
fi | ||||||||||
|
||||||||||
# SYSTEM_USER since 8.0.16 | ||||||||||
# https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_system-user | ||||||||||
if [[ $MYSQL_VERSION == "8.0" ]] && ((MYSQL_PATCH_VERSION >= 16)); then | ||||||||||
if [[ $MYSQL_VERSION == "8.0" ]] && ((MYSQL_PATCH_VERSION >= 16)) || [[ $MYSQL_VERSION == "8.4" ]]; then | ||||||||||
read -r -d '' systemUserGrant <<-EOSQL || true | ||||||||||
GRANT SYSTEM_USER ON *.* TO 'monitor'@'${MONITOR_HOST}'; | ||||||||||
EOSQL | ||||||||||
|
@@ -430,7 +432,7 @@ | |||||||||
EOSQL | ||||||||||
|
||||||||||
{ set +x; } 2>/dev/null | ||||||||||
if [ ! -z "$MYSQL_ROOT_PASSWORD" ]; then | ||||||||||
mysql+=(-p"${MYSQL_ROOT_PASSWORD}") | ||||||||||
fi | ||||||||||
set -x | ||||||||||
|
@@ -444,7 +446,7 @@ | |||||||||
file_env 'MYSQL_USER' | ||||||||||
file_env 'MYSQL_PASSWORD' | ||||||||||
{ set +x; } 2>/dev/null | ||||||||||
if [ "$MYSQL_USER" -a "$MYSQL_PASSWORD" ]; then | ||||||||||
Check warning on line 449 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L449 <ShellCheck.SC2166>
Raw output
|
||||||||||
echo "CREATE USER '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD' ;" | "${mysql[@]}" | ||||||||||
|
||||||||||
if [ "$MYSQL_DATABASE" ]; then | ||||||||||
|
@@ -462,7 +464,7 @@ | |||||||||
done | ||||||||||
|
||||||||||
{ set +x; } 2>/dev/null | ||||||||||
if [ ! -z "$MYSQL_ONETIME_PASSWORD" ]; then | ||||||||||
"${mysql[@]}" <<-EOSQL | ||||||||||
ALTER USER 'root'@'%' PASSWORD EXPIRE; | ||||||||||
EOSQL | ||||||||||
|
@@ -479,13 +481,13 @@ | |||||||||
fi | ||||||||||
|
||||||||||
# exit when MYSQL_INIT_ONLY environment variable is set to avoid starting mysqld | ||||||||||
if [ ! -z "$MYSQL_INIT_ONLY" ]; then | ||||||||||
echo 'Initialization complete, now exiting!' | ||||||||||
exit 0 | ||||||||||
fi | ||||||||||
fi | ||||||||||
|
||||||||||
if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then | ||||||||||
Check warning on line 490 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L490 <ShellCheck.SC2166>
Raw output
|
||||||||||
# still need to check config, container may have started with --user | ||||||||||
_check_config "$@" | ||||||||||
|
||||||||||
|
@@ -500,28 +502,28 @@ | |||||||||
pxc_version='' | ||||||||||
if [ -f "$DATADIR/version_info" ]; then | ||||||||||
pxc_version_file="$DATADIR/version_info" | ||||||||||
pxc_version=$(cat "$pxc_version_file" | awk '{print $3}') | ||||||||||
Check notice on line 505 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L505 <ShellCheck.SC2002>
Raw output
|
||||||||||
elif [ -f "$DATADIR/xtrabackup_info" ]; then | ||||||||||
pxc_version_file="$DATADIR/xtrabackup_info" | ||||||||||
pxc_version=$(grep 'server_version' "$pxc_version_file" | awk '{print $3}' | tr -d '\n') | ||||||||||
fi | ||||||||||
|
||||||||||
if [[ -f $pxc_version_file && -n $pxc_version && $MYSQL_VERSION == '5.7' ]] && [[ $(cat /tmp/version_info) != $pxc_version ]]; then | ||||||||||
Check warning on line 511 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L511 <ShellCheck.SC2053>
Raw output
|
||||||||||
SOCKET="$(_get_config 'socket' "$@")" | ||||||||||
"$@" --skip-networking --socket="${SOCKET}" --wsrep-provider='none' & | ||||||||||
pid="$!" | ||||||||||
|
||||||||||
mysql=(mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" --password="") | ||||||||||
{ set +x; } 2>/dev/null | ||||||||||
if [ ! -z "$MYSQL_ROOT_PASSWORD" ]; then | ||||||||||
mysql+=(-p"${MYSQL_ROOT_PASSWORD}") | ||||||||||
fi | ||||||||||
set -x | ||||||||||
|
||||||||||
if [[ ${MYSQL_VERSION} == '8.0' ]]; then | ||||||||||
if [[ "$MYSQL_VERSION" =~ ^(8\.0|8\.4)$ ]]; then | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [shfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||
mysqlState="startup" | ||||||||||
while [[ "${mysqlState}" != "ready" ]]; do | ||||||||||
mysqlState=$(tr -d '\0' < ${MYSQL_STATE_FILE}) | ||||||||||
Check notice on line 526 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L526 <ShellCheck.SC2086>
Raw output
|
||||||||||
Comment on lines
525
to
526
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [shfmt] reported by reviewdog 🐶
Suggested change
|
||||||||||
echo >&2 "MySQL upgrade process in progress..." | ||||||||||
sleep 1 | ||||||||||
done | ||||||||||
|
@@ -551,16 +553,16 @@ | |||||||||
POD_NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace) | ||||||||||
|
||||||||||
wsrep_start_position_opt="" | ||||||||||
if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then | ||||||||||
Check warning on line 556 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L556 <ShellCheck.SC2166>
Raw output
|
||||||||||
DATADIR="$(_get_config 'datadir' "$@")" | ||||||||||
grastate_loc="${DATADIR}/grastate.dat" | ||||||||||
wsrep_verbose_logfile="$DATADIR/wsrep_recovery_verbose.log" | ||||||||||
if [ -f "$wsrep_verbose_logfile" ]; then | ||||||||||
cat "$wsrep_verbose_logfile" | tee -a "$DATADIR/wsrep_recovery_verbose_history.log" | ||||||||||
Check notice on line 561 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L561 <ShellCheck.SC2002>
Raw output
|
||||||||||
rm -f "$wsrep_verbose_logfile" | ||||||||||
fi | ||||||||||
|
||||||||||
if [ -s "$grastate_loc" -a -d "$DATADIR/mysql" ]; then | ||||||||||
Check warning on line 565 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L565 <ShellCheck.SC2166>
Raw output
|
||||||||||
uuid=$(grep 'uuid:' "$grastate_loc" | cut -d: -f2 | tr -d ' ' || :) | ||||||||||
seqno=$(grep 'seqno:' "$grastate_loc" | cut -d: -f2 | tr -d ' ' || :) | ||||||||||
safe_to_bootstrap=$(grep 'safe_to_bootstrap:' "$grastate_loc" | cut -d: -f2 | tr -d ' ' || :) | ||||||||||
|
@@ -575,11 +577,11 @@ | |||||||||
fi | ||||||||||
fi | ||||||||||
|
||||||||||
if [ -z "$wsrep_start_position_opt" -a -d "$DATADIR/mysql" ]; then | ||||||||||
Check warning on line 580 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L580 <ShellCheck.SC2166>
Raw output
|
||||||||||
"$@" --wsrep_recover --log-error-verbosity=3 --log_error="$wsrep_verbose_logfile" | ||||||||||
|
||||||||||
echo >&2 "WSREP: Print recovery logs: " | ||||||||||
cat "$wsrep_verbose_logfile" | tee -a "$DATADIR/wsrep_recovery_verbose_history.log" | ||||||||||
Check notice on line 584 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L584 <ShellCheck.SC2002>
Raw output
|
||||||||||
if grep ' Recovered position:' "$wsrep_verbose_logfile"; then | ||||||||||
start_pos="$( | ||||||||||
grep ' Recovered position:' "$wsrep_verbose_logfile" | | ||||||||||
|
@@ -616,7 +618,7 @@ | |||||||||
sed -i 's/safe_to_bootstrap: 0/safe_to_bootstrap: 1/g' "$grastate_loc" | ||||||||||
fi | ||||||||||
echo "Recovery was finished." | ||||||||||
exec "$@" $wsrep_start_position_opt | ||||||||||
Check notice on line 621 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L621 <ShellCheck.SC2086>
Raw output
|
||||||||||
} | ||||||||||
function is_manual_recovery() { | ||||||||||
set +o xtrace | ||||||||||
|
@@ -669,7 +671,7 @@ | |||||||||
fi | ||||||||||
fi | ||||||||||
|
||||||||||
test -e /opt/percona/hookscript/hook.sh && source /opt/percona/hookscript/hook.sh | ||||||||||
Check notice on line 674 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L674 <ShellCheck.SC1091>
Raw output
|
||||||||||
|
||||||||||
init_opt="" | ||||||||||
if [[ -f /etc/mysql/init-file/init.sql ]]; then | ||||||||||
|
@@ -677,4 +679,4 @@ | |||||||||
echo "Using init-file: /etc/mysql/init-file/init.sql" | ||||||||||
fi | ||||||||||
|
||||||||||
exec "$@" ${wsrep_start_position_opt} ${init_opt} | ||||||||||
Check notice on line 682 in build/pxc-entrypoint.sh GitHub Actions / shellcheck[shellcheck] build/pxc-entrypoint.sh#L682 <ShellCheck.SC2086>
Raw output
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,7 +155,7 @@ spec: | |
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1G | ||
memory: 2G | ||
requests: | ||
cpu: 600m | ||
memory: 1G | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,7 +155,7 @@ spec: | |
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1G | ||
memory: 2G | ||
requests: | ||
cpu: 600m | ||
memory: 1G | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,7 +128,7 @@ spec: | |
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1G | ||
memory: 2G | ||
requests: | ||
cpu: 600m | ||
memory: 1G | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,7 +128,7 @@ spec: | |
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1G | ||
memory: 2G | ||
requests: | ||
cpu: 600m | ||
memory: 1G | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,7 +128,7 @@ spec: | |
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1G | ||
memory: 2G | ||
requests: | ||
cpu: 600m | ||
memory: 1G | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,7 +128,7 @@ spec: | |
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1G | ||
memory: 2G | ||
requests: | ||
cpu: 600m | ||
memory: 1G | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,7 +128,7 @@ spec: | |
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1G | ||
memory: 2G | ||
requests: | ||
cpu: 600m | ||
memory: 1G | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,7 +128,7 @@ spec: | |
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1G | ||
memory: 2G | ||
requests: | ||
cpu: 600m | ||
memory: 1G | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ spec: | |
image: -pxc | ||
resources: | ||
limits: | ||
memory: 1Gi | ||
memory: 4Gi | ||
requests: | ||
memory: 1Gi | ||
volumeSpec: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: pxc.percona.com/v1 | ||
kind: PerconaXtraDBClusterRestore | ||
metadata: | ||
name: restore1 | ||
spec: | ||
pxcCluster: some-name | ||
backupSource: | ||
destination: s3://percona-jenkins-artifactory/big-data-test/some-name-2024-11-23-19:32:52-full | ||
s3: | ||
credentialsSecret: aws-s3-secret | ||
region: us-east-1 | ||
endpointUrl: https://s3.amazonaws.com |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
67108864 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
GRANT SELECT, RELOAD, PROCESS, SUPER, REPLICATION CLIENT ON *.* TO `monitor`@`%` | ||
GRANT SERVICE_CONNECTION_ADMIN,SYSTEM_USER ON *.* TO `monitor`@`%` | ||
GRANT SELECT ON `performance_schema`.* TO `monitor`@`%` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `root`@`%` WITH GRANT OPTION | ||
GRANT ALLOW_NONEXISTENT_DEFINER,APPLICATION_PASSWORD_ADMIN,AUDIT_ABORT_EXEMPT,AUDIT_ADMIN,AUTHENTICATION_POLICY_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,FIREWALL_EXEMPT,FLUSH_OPTIMIZER_COSTS,FLUSH_PRIVILEGES,FLUSH_STATUS,FLUSH_TABLES,FLUSH_USER_RESOURCES,GROUP_REPLICATION_ADMIN,GROUP_REPLICATION_STREAM,INNODB_REDO_LOG_ARCHIVE,INNODB_REDO_LOG_ENABLE,OPTIMIZE_LOCAL_TABLE,PASSWORDLESS_USER_ADMIN,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SENSITIVE_VARIABLES_OBSERVER,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_ANY_DEFINER,SHOW_ROUTINE,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,TELEMETRY_LOG_ADMIN,TRANSACTION_GTID_TAG,XA_RECOVER_ADMIN ON *.* TO `root`@`%` WITH GRANT OPTION |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,7 +175,7 @@ spec: | |
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1G | ||
memory: 2G | ||
requests: | ||
cpu: 100m | ||
memory: 100M | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶