[bitnami/mariadb-galera] Release mariadb-galera-11.2.5-debian-12-r3 (#73115)

Signed-off-by: Bitnami Bot <bitnami-bot@vmware.com>
This commit is contained in:
Bitnami Bot
2024-10-06 04:24:13 +02:00
committed by GitHub
parent 4aed72e2c7
commit d34d9606c3
3 changed files with 25 additions and 35 deletions

View File

@@ -7,11 +7,11 @@ ARG TARGETARCH
LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \ LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \
org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
org.opencontainers.image.created="2024-09-06T01:22:15Z" \ org.opencontainers.image.created="2024-10-06T01:56:45Z" \
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/mariadb-galera/README.md" \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/mariadb-galera/README.md" \
org.opencontainers.image.licenses="Apache-2.0" \ org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.ref.name="11.2.5-debian-12-r2" \ org.opencontainers.image.ref.name="11.2.5-debian-12-r3" \
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/mariadb-galera" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/mariadb-galera" \
org.opencontainers.image.title="mariadb-galera" \ org.opencontainers.image.title="mariadb-galera" \
org.opencontainers.image.vendor="Broadcom, Inc." \ org.opencontainers.image.vendor="Broadcom, Inc." \
@@ -28,7 +28,7 @@ SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]
RUN install_packages ca-certificates curl iproute2 ldap-utils libaio1 libaudit1 libcap-ng0 libcrypt1 libgcc-s1 libicu72 libldap-common liblzma5 libncurses6 libpam-ldapd libpam0g libssl3 libstdc++6 libtinfo6 libxml2 nslcd procps psmisc rsync socat zlib1g RUN install_packages ca-certificates curl iproute2 ldap-utils libaio1 libaudit1 libcap-ng0 libcrypt1 libgcc-s1 libicu72 libldap-common liblzma5 libncurses6 libpam-ldapd libpam0g libssl3 libstdc++6 libtinfo6 libxml2 nslcd procps psmisc rsync socat zlib1g
RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \ RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \
COMPONENTS=( \ COMPONENTS=( \
"ini-file-1.4.7-4-linux-${OS_ARCH}-debian-12" \ "ini-file-1.4.7-5-linux-${OS_ARCH}-debian-12" \
"mariadb-galera-11.2.5-0-linux-${OS_ARCH}-debian-12" \ "mariadb-galera-11.2.5-0-linux-${OS_ARCH}-debian-12" \
) ; \ ) ; \
for COMPONENT in "${COMPONENTS[@]}"; do \ for COMPONENT in "${COMPONENTS[@]}"; do \

View File

@@ -3,7 +3,7 @@
"arch": "amd64", "arch": "amd64",
"distro": "debian-12", "distro": "debian-12",
"type": "NAMI", "type": "NAMI",
"version": "1.4.7-4" "version": "1.4.7-5"
}, },
"mariadb-galera": { "mariadb-galera": {
"arch": "amd64", "arch": "amd64",

View File

@@ -185,47 +185,38 @@ EOF
# None # None
######################### #########################
mysql_exec_initial_dump() { mysql_exec_initial_dump() {
info "MySQL dump master data start..." local -r dump_file="${DB_DATA_DIR}/dump_all_databases.sql"
info "LOCK MASTER DATABASES FOR WRITE OPERATIONS..." info "MariaDB dump master data start..."
mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'FLUSH TABLES WITH READ LOCK;' debug "Lock master databases for write operations"
echo "FLUSH TABLES WITH READ LOCK;" | mysql_remote_execute "$DB_MASTER_HOST" "$DB_MASTER_PORT_NUMBER" "mysql" "$DB_MASTER_ROOT_USER" "$DB_MASTER_ROOT_PASSWORD"
info "SHOW MASTER STATUS..." read -r log_file log_position <<< "$(echo "SHOW MASTER STATUS;" | mysql_remote_execute_print_output "$DB_MASTER_HOST" "$DB_MASTER_PORT_NUMBER" "mysql" "$DB_MASTER_ROOT_USER" "$DB_MASTER_ROOT_PASSWORD" | awk 'NR==1 {print $1, $2}')"
read -r MYSQL_FILE MYSQL_POSITION <<< "$(mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'SHOW MASTER STATUS;' | awk 'NR==1 {print $1, $2}')" debug "File: $log_file and Position: $log_position"
info "File: $MYSQL_FILE and Position: $MYSQL_POSITION"
info "Start dump process databases" debug "Start dump process databases"
mysqldump --verbose --all-databases -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" > "$dump_file"
debug "Finish dump databases"
FILE_LOCATION="$DB_DATA_DIR/dump_all_databases.sql" debug "Unlock master databases for write operations"
echo "UNLOCK TABLES;" | mysql_remote_execute "$DB_MASTER_HOST" "$DB_MASTER_PORT_NUMBER" "mysql" "$DB_MASTER_ROOT_USER" "$DB_MASTER_ROOT_PASSWORD"
mysqldump --verbose --all-databases -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" > "$FILE_LOCATION"
info "Finish dump databases"
info "UNLOCK MASTER DATABASES FOR WRITE OPERATIONS..."
mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'UNLOCK TABLES;'
info "Start import dump databases"
mysql_execute < "$FILE_LOCATION"
info "Finish import dump databases"
debug "Start import dump databases"
mysql_execute < "$dump_file"
mysql_execute "mysql" <<EOF mysql_execute "mysql" <<EOF
CHANGE MASTER TO MASTER_HOST='$DB_MASTER_HOST', CHANGE MASTER TO MASTER_HOST='$DB_MASTER_HOST',
MASTER_PORT=$DB_MASTER_PORT_NUMBER, MASTER_PORT=$DB_MASTER_PORT_NUMBER,
MASTER_USER='$DB_REPLICATION_USER', MASTER_USER='$DB_REPLICATION_USER',
MASTER_PASSWORD='$DB_REPLICATION_PASSWORD', MASTER_PASSWORD='$DB_REPLICATION_PASSWORD',
MASTER_DELAY=$DB_MASTER_DELAY, MASTER_DELAY=$DB_MASTER_DELAY,
MASTER_LOG_FILE='$MYSQL_FILE', MASTER_LOG_FILE='$log_file',
MASTER_LOG_POS=$MYSQL_POSITION, MASTER_LOG_POS=$log_position,
MASTER_CONNECT_RETRY=10; MASTER_CONNECT_RETRY=10;
EOF EOF
debug "Finish import dump databases"
info "Remove dump file" rm -f "$dump_file"
rm -f "$FILE_LOCATION" info "MariaDB dump master data finish..."
info "Finish dump process databases"
info "MySQL dump master data finish..."
} }
######################## ########################
@@ -248,10 +239,9 @@ mysql_configure_replication() {
if [[ "$DB_REPLICATION_SLAVE_DUMP" = "true" ]]; then if [[ "$DB_REPLICATION_SLAVE_DUMP" = "true" ]]; then
mysql_exec_initial_dump mysql_exec_initial_dump
else else
debug "Replication master ready!"
debug "Replication master ready!" debug "Setting the master configuration"
debug "Setting the master configuration" mysql_execute "mysql" <<EOF
mysql_execute "mysql" <<EOF
CHANGE MASTER TO MASTER_HOST='$DB_MASTER_HOST', CHANGE MASTER TO MASTER_HOST='$DB_MASTER_HOST',
MASTER_PORT=$DB_MASTER_PORT_NUMBER, MASTER_PORT=$DB_MASTER_PORT_NUMBER,
MASTER_USER='$DB_REPLICATION_USER', MASTER_USER='$DB_REPLICATION_USER',