From a23a33c09027918d781fccfc448ee47d3edc256b Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Fri, 29 Apr 2022 17:24:10 +0000 Subject: [PATCH] 4.2.19-debian-10-r56 release --- bitnami/mongodb/4.2/debian-10/Dockerfile | 4 +-- .../opt/bitnami/.bitnami_components.json | 4 +-- .../rootfs/opt/bitnami/scripts/libmongodb.sh | 25 +++++++++++++------ .../rootfs/opt/bitnami/scripts/mongodb-env.sh | 6 +++-- bitnami/mongodb/README.md | 2 +- 5 files changed, 26 insertions(+), 15 deletions(-) diff --git a/bitnami/mongodb/4.2/debian-10/Dockerfile b/bitnami/mongodb/4.2/debian-10/Dockerfile index 9b0bc3e64576..1975fe84ab67 100644 --- a/bitnami/mongodb/4.2/debian-10/Dockerfile +++ b/bitnami/mongodb/4.2/debian-10/Dockerfile @@ -10,7 +10,7 @@ COPY prebuildfs / # Install required system packages and dependencies RUN install_packages acl ca-certificates curl gzip libc6 libcom-err2 libcurl4 libffi6 libgcc1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libgssapi-krb5-2 libhogweed4 libidn2-0 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 libnettle6 libnghttp2-14 libp11-kit0 libpcap0.8 libpsl5 librtmp1 libsasl2-2 libssh2-1 libssl1.1 libtasn1-6 libunistring2 numactl procps tar zlib1g RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "mongodb-shell" "1.3.1-0" --checksum 13407d9f6a5ae6b0895faf702da3e919c03354349506b2bcf19da0a3545e7f8c -RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "yq" "4.24.5-0" --checksum bdae511963f6a46ad128f41f9a6f2eec8c56fbb4929619fcd54232edfec6209e +RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "yq" "4.25.1-0" --checksum 863b0a81f75feed5c08bb5c1c5b280469b10c7cee9232ecbf613544755a7433c RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "wait-for-port" "1.0.1-10" --checksum 35c818ba3f4b5aae905959bc7d3a5e81fc63786e3c662b604612c0aa7fcda8fd RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "render-template" "1.0.1-10" --checksum 97c2ae4b001c5937e888b920bee7b1a40a076680caac53ded6d10f6207d54565 RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "mongodb" "4.2.19-2" --checksum 3d763e80a87697b1c5a4231f2465e8dc1450b8f735379789ae4d1061792be811 @@ -23,7 +23,7 @@ COPY rootfs / RUN /opt/bitnami/scripts/mongodb/postunpack.sh ENV APP_VERSION="4.2.19" \ BITNAMI_APP_NAME="mongodb" \ - PATH="/opt/bitnami/common/bin:/opt/bitnami/mongodb/bin:$PATH" + PATH="/opt/bitnami/mongodb/bin:/opt/bitnami/common/bin:$PATH" EXPOSE 27017 diff --git a/bitnami/mongodb/4.2/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/mongodb/4.2/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json index e2e6c0898514..05c6b193e684 100644 --- a/bitnami/mongodb/4.2/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/mongodb/4.2/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json @@ -36,9 +36,9 @@ }, "yq": { "arch": "amd64", - "digest": "bdae511963f6a46ad128f41f9a6f2eec8c56fbb4929619fcd54232edfec6209e", + "digest": "863b0a81f75feed5c08bb5c1c5b280469b10c7cee9232ecbf613544755a7433c", "distro": "debian-10", "type": "NAMI", - "version": "4.24.5-0" + "version": "4.25.1-0" } } \ No newline at end of file diff --git a/bitnami/mongodb/4.2/debian-10/rootfs/opt/bitnami/scripts/libmongodb.sh b/bitnami/mongodb/4.2/debian-10/rootfs/opt/bitnami/scripts/libmongodb.sh index 32468500628e..1a8a098b959f 100644 --- a/bitnami/mongodb/4.2/debian-10/rootfs/opt/bitnami/scripts/libmongodb.sh +++ b/bitnami/mongodb/4.2/debian-10/rootfs/opt/bitnami/scripts/libmongodb.sh @@ -112,6 +112,12 @@ in the primary node and MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD in the rest of nod error_code=1 } + check_yes_no_value() { + if ! is_yes_no_value "${!1}" && ! is_true_false_value "${!1}"; then + print_validation_error "The allowed values for ${1} are: yes no" + fi + } + if [[ -n "$MONGODB_REPLICA_SET_MODE" ]]; then if [[ -z "$MONGODB_ADVERTISED_HOSTNAME" ]]; then warn "In order to use hostnames instead of IPs your should set MONGODB_ADVERTISED_HOSTNAME" @@ -152,6 +158,9 @@ Available options are 'primary/secondary/arbiter/hidden'" fi fi + check_yes_no_value "MONGODB_ENABLE_MAJORITY_READ" + [[ "$(mongodb_get_version)" =~ ^5\..\. ]] && ! is_boolean_yes "$MONGODB_ENABLE_MAJORITY_READ" && warn "MONGODB_ENABLE_MAJORITY_READ=${MONGODB_ENABLE_MAJORITY_READ} Will be ignored in MongoDB 5.0" + if [[ -n "$MONGODB_REPLICA_SET_KEY" ]] && ((${#MONGODB_REPLICA_SET_KEY} < 5)); then error_message="MONGODB_REPLICA_SET_KEY must be, at least, 5 characters long!" print_validation_error "$error_message" @@ -242,7 +251,7 @@ get_mongo_hostname() { if [[ -n "$MONGODB_ADVERTISED_HOSTNAME" ]]; then echo "$MONGODB_ADVERTISED_HOSTNAME" else - get_machine_ip + hostname fi } @@ -392,7 +401,7 @@ mongodb_is_mongodb_started() { local result result=$( - mongodb_execute_print_output 2>/dev/null <