[bitnami/mongodb] Release 8.3.7-debian-12-r0 (#95842)

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
Bitnami Bot
2026-07-22 22:21:15 +02:00
committed by GitHub
parent 81e036e5ea
commit 052dbcbcad
4 changed files with 45 additions and 12 deletions
+5 -5
View File
@@ -7,13 +7,13 @@ ARG DOWNLOADS_URL="https://downloads.bitnami.com/files/stacksmith"
ARG TARGETARCH ARG TARGETARCH
LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
org.opencontainers.image.created="2026-07-12T01:29:47Z" \ org.opencontainers.image.created="2026-07-22T20:11:02Z" \
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/mongodb/README.md" \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/mongodb/README.md" \
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/mongodb" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/mongodb" \
org.opencontainers.image.title="mongodb" \ org.opencontainers.image.title="mongodb" \
org.opencontainers.image.vendor="Broadcom, Inc." \ org.opencontainers.image.vendor="Broadcom, Inc." \
org.opencontainers.image.version="8.3.4" org.opencontainers.image.version="8.3.7"
ENV HOME="/" \ ENV HOME="/" \
OS_ARCH="${TARGETARCH:-amd64}" \ OS_ARCH="${TARGETARCH:-amd64}" \
@@ -32,7 +32,7 @@ RUN --mount=type=secret,id=downloads_url,env=SECRET_DOWNLOADS_URL \
"wait-for-port-1.0.10-14-linux-${OS_ARCH}-debian-12" \ "wait-for-port-1.0.10-14-linux-${OS_ARCH}-debian-12" \
"render-template-1.0.9-168-linux-${OS_ARCH}-debian-12" \ "render-template-1.0.9-168-linux-${OS_ARCH}-debian-12" \
"mongodb-shell-2.9.2-0-linux-${OS_ARCH}-debian-12" \ "mongodb-shell-2.9.2-0-linux-${OS_ARCH}-debian-12" \
"mongodb-8.3.4-0-linux-${OS_ARCH}-debian-12" \ "mongodb-8.3.7-0-linux-${OS_ARCH}-debian-12" \
) ; \ ) ; \
for COMPONENT in "${COMPONENTS[@]}"; do \ for COMPONENT in "${COMPONENTS[@]}"; do \
if [ ! -f "${COMPONENT}.tar.gz" ]; then \ if [ ! -f "${COMPONENT}.tar.gz" ]; then \
@@ -51,9 +51,9 @@ RUN uninstall_packages curl
COPY rootfs / COPY rootfs /
RUN /opt/bitnami/scripts/mongodb/postunpack.sh RUN /opt/bitnami/scripts/mongodb/postunpack.sh
ENV APP_VERSION="8.3.4" \ ENV APP_VERSION="8.3.7" \
BITNAMI_APP_NAME="mongodb" \ BITNAMI_APP_NAME="mongodb" \
IMAGE_REVISION="1" \ IMAGE_REVISION="0" \
PATH="/opt/bitnami/common/bin:/opt/bitnami/mongodb/bin:$PATH" PATH="/opt/bitnami/common/bin:/opt/bitnami/mongodb/bin:$PATH"
EXPOSE 27017 EXPOSE 27017
@@ -1 +0,0 @@
6e0c3d3b64bbd4cce35416b0580f53a162f0b2a7c0dc5a6e4ab786164241b035 mongodb-8.3.4-0-linux-amd64-debian-12.tar.gz
@@ -0,0 +1 @@
e9af1cbb3dd2a32f1e2a211afafacb3838841266fcea397c538f1c9707a021d9 mongodb-8.3.7-0-linux-amd64-debian-12.tar.gz
@@ -941,6 +941,32 @@ EOF
grep -q "ok: 1" <<<"$result" grep -q "ok: 1" <<<"$result"
} }
########################
# Get if secondary node already has voting rights
# Globals:
# MONGODB_*
# Arguments:
# $1 - node
# $2 - port
# Returns:
# Boolean
#########################
mongodb_secondary_node_has_voting_rights() {
local -r node="${1:?node is required}"
local -r port="${2:?port is required}"
local result
debug "Checking voting rights of the node"
result=$(
mongodb_execute_print_output "$MONGODB_INITIAL_PRIMARY_ROOT_USER" "$MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD" "admin" "$MONGODB_INITIAL_PRIMARY_HOST" "$MONGODB_INITIAL_PRIMARY_PORT_NUMBER" <<EOF
rs.conf().members.filter(m => m.host === '$node:$port' && m.votes > 0 && m.priority > 0).length === 1
EOF
)
debug "$result"
grep -q "true" <<<"$result"
}
######################## ########################
# Get if hidden node is pending # Get if hidden node is pending
# Globals: # Globals:
@@ -1177,7 +1203,15 @@ mongodb_configure_secondary() {
exit 1 exit 1
fi fi
mongodb_wait_confirmation "$node" "$port" mongodb_wait_confirmation "$node" "$port"
fi
# Grant voting rights to the node if it does not have them yet. This must be
# done even when the node is already in the cluster: a previous attempt may
# have added it with votes/priority 0 and failed (or been restarted) before
# granting voting rights, leaving the node stuck without them.
if mongodb_secondary_node_has_voting_rights "$node" "$port"; then
info "Node already has voting rights"
else
# Ensure that secondary nodes do not count as voting members until they are fully initialized # Ensure that secondary nodes do not count as voting members until they are fully initialized
# https://docs.mongodb.com/manual/reference/method/rs.add/#behavior # https://docs.mongodb.com/manual/reference/method/rs.add/#behavior
if ! retry_while "mongodb_is_secondary_node_ready $node $port" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then if ! retry_while "mongodb_is_secondary_node_ready $node $port" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then
@@ -1188,17 +1222,16 @@ mongodb_configure_secondary() {
# Grant voting rights to node # Grant voting rights to node
# https://docs.mongodb.com/manual/tutorial/modify-psa-replica-set-safely/ # https://docs.mongodb.com/manual/tutorial/modify-psa-replica-set-safely/
if ! retry_while "mongodb_configure_secondary_node_voting $node $port" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then if ! retry_while "mongodb_configure_secondary_node_voting $node $port" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then
error "Secondary node did not get marked as secondary" error "Secondary node did not get granted voting rights"
exit 1 exit 1
fi fi
fi
# Mark node as readable. This is necessary in cases where the PVC is lost # Mark node as readable. This is necessary in cases where the PVC is lost
if is_boolean_yes "$MONGODB_SET_SECONDARY_OK"; then if is_boolean_yes "$MONGODB_SET_SECONDARY_OK"; then
mongodb_execute_print_output "$MONGODB_INITIAL_PRIMARY_ROOT_USER" "$MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD" "admin" <<EOF mongodb_execute_print_output "$MONGODB_INITIAL_PRIMARY_ROOT_USER" "$MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD" "admin" <<EOF
rs.secondaryOk() rs.secondaryOk()
EOF EOF
fi
fi fi
} }