diff --git a/bitnami/mongodb/7.0/debian-11/Dockerfile b/bitnami/mongodb/7.0/debian-11/Dockerfile index 8a53f1345f57..37c32ff1d4c2 100644 --- a/bitnami/mongodb/7.0/debian-11/Dockerfile +++ b/bitnami/mongodb/7.0/debian-11/Dockerfile @@ -7,13 +7,13 @@ ARG TARGETARCH LABEL com.vmware.cp.artifact.flavor="sha256:1e1b4657a77f0d47e9220f0c37b9bf7802581b93214fff7d1bd2364c8bf22e8e" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bullseye" \ - org.opencontainers.image.created="2023-12-27T14:34:20Z" \ + org.opencontainers.image.created="2024-01-06T03:47:29Z" \ org.opencontainers.image.description="Application packaged by VMware, Inc" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="7.0.4-debian-11-r4" \ + org.opencontainers.image.ref.name="7.0.5-debian-11-r0" \ org.opencontainers.image.title="mongodb" \ org.opencontainers.image.vendor="VMware, Inc." \ - org.opencontainers.image.version="7.0.4" + org.opencontainers.image.version="7.0.5" ENV HOME="/" \ OS_ARCH="${TARGETARCH:-amd64}" \ @@ -30,7 +30,7 @@ RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \ "yq-4.40.5-0-linux-${OS_ARCH}-debian-11" \ "wait-for-port-1.0.7-4-linux-${OS_ARCH}-debian-11" \ "render-template-1.0.6-4-linux-${OS_ARCH}-debian-11" \ - "mongodb-7.0.4-1-linux-${OS_ARCH}-debian-11" \ + "mongodb-7.0.5-0-linux-${OS_ARCH}-debian-11" \ ) ; \ for COMPONENT in "${COMPONENTS[@]}"; do \ if [ ! -f "${COMPONENT}.tar.gz" ]; then \ @@ -48,7 +48,7 @@ RUN chmod g+rwX /opt/bitnami COPY rootfs / RUN /opt/bitnami/scripts/mongodb/postunpack.sh -ENV APP_VERSION="7.0.4" \ +ENV APP_VERSION="7.0.5" \ BITNAMI_APP_NAME="mongodb" \ PATH="/opt/bitnami/mongodb/bin:/opt/bitnami/common/bin:$PATH" diff --git a/bitnami/mongodb/7.0/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/mongodb/7.0/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json index 13fffa4bd16d..bef5329bb031 100644 --- a/bitnami/mongodb/7.0/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/mongodb/7.0/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json @@ -3,7 +3,7 @@ "arch": "amd64", "distro": "debian-11", "type": "NAMI", - "version": "7.0.4-1" + "version": "7.0.5-0" }, "mongodb-shell": { "arch": "amd64", diff --git a/bitnami/mongodb/7.0/debian-11/prebuildfs/usr/sbin/run-script b/bitnami/mongodb/7.0/debian-11/prebuildfs/usr/sbin/run-script index b7a5bf1e50bf..4ca0f897277e 100755 --- a/bitnami/mongodb/7.0/debian-11/prebuildfs/usr/sbin/run-script +++ b/bitnami/mongodb/7.0/debian-11/prebuildfs/usr/sbin/run-script @@ -10,7 +10,7 @@ fi script=$1 exit_code="${2:-96}" -fail_if_not_present="${3:-y}" +fail_if_not_present="${3:-n}" if test -f "$script"; then sh $script diff --git a/bitnami/mongodb/7.0/debian-11/rootfs/opt/bitnami/scripts/libmongodb.sh b/bitnami/mongodb/7.0/debian-11/rootfs/opt/bitnami/scripts/libmongodb.sh index 3c6f40101f1d..9f18d67751cb 100644 --- a/bitnami/mongodb/7.0/debian-11/rootfs/opt/bitnami/scripts/libmongodb.sh +++ b/bitnami/mongodb/7.0/debian-11/rootfs/opt/bitnami/scripts/libmongodb.sh @@ -383,7 +383,7 @@ mongodb_start_bg() { fi # wait until the server is up and answering queries - if ! retry_while "mongodb_is_mongodb_started" "$MONGODB_MAX_TIMEOUT"; then + if ! retry_while "mongodb_is_mongodb_started" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then error "MongoDB did not start" exit 1 fi @@ -423,7 +423,7 @@ mongodb_stop() { info "Stopping MongoDB..." stop_service_using_pid "$MONGODB_PID_FILE" - if ! retry_while "is_mongodb_not_running" "$MONGODB_MAX_TIMEOUT"; then + if ! retry_while "is_mongodb_not_running" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then error "MongoDB failed to stop" exit 1 fi @@ -1003,7 +1003,7 @@ mongodb_configure_primary() { info "Configuring MongoDB primary node" wait-for-port --timeout 360 "$MONGODB_PORT_NUMBER" - if ! retry_while "mongodb_is_primary_node_initiated $node $port" "$MONGODB_MAX_TIMEOUT"; then + if ! retry_while "mongodb_is_primary_node_initiated $node $port" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then error "MongoDB primary node failed to get configured" exit 1 fi @@ -1024,7 +1024,7 @@ mongodb_wait_confirmation() { local -r port="${2:?port is required}" debug "Waiting until ${node}:${port} is added to the replica set..." - if ! retry_while "mongodb_node_currently_in_cluster ${node} ${port}" "$MONGODB_MAX_TIMEOUT"; then + if ! retry_while "mongodb_node_currently_in_cluster ${node} ${port}" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then error "Unable to confirm that ${node}:${port} has been added to the replica set!" exit 1 else @@ -1098,14 +1098,14 @@ mongodb_wait_for_node() { debug "Waiting for primary node..." info "Trying to connect to MongoDB server $host..." - if ! retry_while "wait-for-port --host $host --timeout 10 $port" "$MONGODB_MAX_TIMEOUT"; then + if ! retry_while "wait-for-port --host $host --timeout 10 $port" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then error "Unable to connect to host $host" exit 1 else info "Found MongoDB server listening at $host:$port !" fi - if ! retry_while "mongodb_is_node_available $host $port $user $password" "$MONGODB_MAX_TIMEOUT"; then + if ! retry_while "mongodb_is_node_available $host $port $user $password" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then error "Node $host did not become available" exit 1 else @@ -1130,7 +1130,7 @@ mongodb_wait_for_primary_node() { mongodb_wait_for_node "$host" "$port" "$user" "$password" debug "Waiting for primary host $host to be ready..." - if ! retry_while "mongodb_is_primary_node_up $host $port $user $password" "$MONGODB_MAX_TIMEOUT"; then + if ! retry_while "mongodb_is_primary_node_up $host $port $user $password" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then error "Unable to validate $host as primary node in the replica set scenario!" exit 1 else @@ -1158,7 +1158,7 @@ mongodb_configure_secondary() { info "Node currently in the cluster" else info "Adding node to the cluster" - if ! retry_while "mongodb_is_secondary_node_pending $node $port" "$MONGODB_MAX_TIMEOUT"; then + if ! retry_while "mongodb_is_secondary_node_pending $node $port" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then error "Secondary node did not get ready" exit 1 fi @@ -1166,14 +1166,14 @@ mongodb_configure_secondary() { # 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 - if ! retry_while "mongodb_is_secondary_node_ready $node $port" "$MONGODB_MAX_TIMEOUT"; then + if ! retry_while "mongodb_is_secondary_node_ready $node $port" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then error "Secondary node did not get marked as secondary" exit 1 fi # Grant voting rights to node # https://docs.mongodb.com/manual/tutorial/modify-psa-replica-set-safely/ - if ! retry_while "mongodb_configure_secondary_node_voting $node $port" "$MONGODB_MAX_TIMEOUT"; 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" exit 1 fi @@ -1208,7 +1208,7 @@ mongodb_configure_hidden() { info "Node currently in the cluster" else info "Adding hidden node to the cluster" - if ! retry_while "mongodb_is_hidden_node_pending $node $port" "$MONGODB_MAX_TIMEOUT"; then + if ! retry_while "mongodb_is_hidden_node_pending $node $port" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then error "Hidden node did not get ready" exit 1 fi @@ -1236,7 +1236,7 @@ mongodb_configure_arbiter() { info "Node currently in the cluster" else info "Configuring MongoDB arbiter node" - if ! retry_while "mongodb_is_arbiter_node_pending $node $port" "$MONGODB_MAX_TIMEOUT"; then + if ! retry_while "mongodb_is_arbiter_node_pending $node $port" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY"; then error "Arbiter node did not get ready" exit 1 fi @@ -1277,7 +1277,7 @@ EOF mongodb_wait_until_sync_complete() { info "Waiting until initial data sync is complete..." - if ! retry_while "mongodb_is_not_in_sync" "$MONGODB_MAX_TIMEOUT" 1; then + if ! retry_while "mongodb_is_not_in_sync" "$MONGODB_INIT_RETRY_ATTEMPTS" "$MONGODB_INIT_RETRY_DELAY" 1; then error "Initial data sync did not finish after $MONGODB_MAX_TIMEOUT seconds" exit 1 else diff --git a/bitnami/mongodb/7.0/debian-11/rootfs/opt/bitnami/scripts/mongodb-env.sh b/bitnami/mongodb/7.0/debian-11/rootfs/opt/bitnami/scripts/mongodb-env.sh index de9a36d80bde..82494e9b9f47 100644 --- a/bitnami/mongodb/7.0/debian-11/rootfs/opt/bitnami/scripts/mongodb-env.sh +++ b/bitnami/mongodb/7.0/debian-11/rootfs/opt/bitnami/scripts/mongodb-env.sh @@ -25,7 +25,8 @@ export BITNAMI_DEBUG="${BITNAMI_DEBUG:-false}" # variable will be overridden with the value specified in that file mongodb_env_vars=( MONGODB_MOUNTED_CONF_DIR - MONGODB_MAX_TIMEOUT + MONGODB_INIT_RETRY_ATTEMPTS + MONGODB_INIT_RETRY_DELAY MONGODB_PORT_NUMBER MONGODB_ENABLE_MAJORITY_READ MONGODB_DEFAULT_ENABLE_MAJORITY_READ @@ -106,7 +107,8 @@ export MONGODB_DAEMON_GROUP="mongo" # MongoDB configuration export MONGODB_MOUNTED_CONF_DIR="${MONGODB_MOUNTED_CONF_DIR:-${MONGODB_VOLUME_DIR}/conf}" -export MONGODB_MAX_TIMEOUT="${MONGODB_MAX_TIMEOUT:-35}" +export MONGODB_INIT_RETRY_ATTEMPTS="${MONGODB_INIT_RETRY_ATTEMPTS:-7}" +export MONGODB_INIT_RETRY_DELAY="${MONGODB_INIT_RETRY_DELAY:-5}" export MONGODB_DEFAULT_PORT_NUMBER="27017" export MONGODB_PORT_NUMBER="${MONGODB_PORT_NUMBER:-$MONGODB_DEFAULT_PORT_NUMBER}" export MONGODB_ENABLE_MAJORITY_READ="${MONGODB_ENABLE_MAJORITY_READ:-true}" diff --git a/bitnami/mongodb/7.0/debian-11/tags-info.yaml b/bitnami/mongodb/7.0/debian-11/tags-info.yaml index 6ab8d642f4ac..a7e7307377a6 100644 --- a/bitnami/mongodb/7.0/debian-11/tags-info.yaml +++ b/bitnami/mongodb/7.0/debian-11/tags-info.yaml @@ -1,5 +1,5 @@ rolling-tags: - "7.0" - 7.0-debian-11 -- 7.0.4 +- 7.0.5 - latest