Skip to content

Commit e595b23

Browse files
author
Bitnami Bot
committed
3.6.21-debian-9-r55 release
1 parent 28f21d5 commit e595b23

4 files changed

Lines changed: 24 additions & 29 deletions

File tree

3.6/debian-9/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN chmod g+rwX /opt/bitnami
1919
COPY rootfs /
2020
RUN /opt/bitnami/scripts/mongodb/postunpack.sh
2121
ENV BITNAMI_APP_NAME="mongodb" \
22-
BITNAMI_IMAGE_VERSION="3.6.21-debian-9-r54" \
22+
BITNAMI_IMAGE_VERSION="3.6.21-debian-9-r55" \
2323
PATH="/opt/bitnami/common/bin:/opt/bitnami/mongodb/bin:$PATH"
2424

2525
EXPOSE 27017
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#
3+
# Library to use for scripts expected to be used as Kubernetes lifecycle hooks
4+
5+
# shellcheck disable=SC1091
6+
7+
# Load generic libraries
8+
. /opt/bitnami/scripts/liblog.sh
9+
. /opt/bitnami/scripts/libos.sh
10+
11+
# Override functions that log to stdout/stderr of the current process, so they print to process 1
12+
for function_to_override in stderr_print debug_execute; do
13+
# Output is sent to output of process 1 and thus end up in the container log
14+
# The hook output in general isn't saved
15+
eval "$(declare -f "$function_to_override") >/proc/1/fd/1 2>/proc/1/fd/2"
16+
done

3.6/debian-9/rootfs/opt/bitnami/scripts/libmongodb.sh

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -645,27 +645,6 @@ mongodb_configure_primary() {
645645
fi
646646
}
647647

648-
649-
650-
########################
651-
# Is node confirmed
652-
# Globals:
653-
# None
654-
# Arguments:
655-
# $1 - node
656-
# Returns:
657-
# Boolean
658-
#########################
659-
mongodb_is_node_confirmed() {
660-
local -r node="${1:?node is required}"
661-
662-
result=$(mongodb_execute "$MONGODB_INITIAL_PRIMARY_ROOT_USER" "$MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD" "admin" "$MONGODB_INITIAL_PRIMARY_HOST" "$MONGODB_INITIAL_PRIMARY_PORT_NUMBER" <<EOF
663-
rs.status().members
664-
EOF
665-
)
666-
grep -q "$node" <<< "$result"
667-
}
668-
669648
########################
670649
# Wait for Confirmation
671650
# Globals:
@@ -678,12 +657,12 @@ EOF
678657
mongodb_wait_confirmation() {
679658
local -r node="${1:?node is required}"
680659

681-
debug "Waiting until $node is added to the replica set..."
682-
if ! retry_while "mongodb_is_node_confirmed $node" "$MONGODB_MAX_TIMEOUT"; then
683-
error "Unable to confirm that $node has been added to the replica set!"
660+
debug "Waiting until ${node} is added to the replica set..."
661+
if ! retry_while "mongodb_node_currently_in_cluster ${node}" "$MONGODB_MAX_TIMEOUT"; then
662+
error "Unable to confirm that ${node} has been added to the replica set!"
684663
exit 1
685664
else
686-
info "Node $node is confirmed!"
665+
info "Node ${node} is confirmed!"
687666
fi
688667
}
689668

@@ -897,10 +876,10 @@ mongodb_node_currently_in_cluster() {
897876
local result
898877

899878
result=$(mongodb_execute "$MONGODB_INITIAL_PRIMARY_ROOT_USER" "$MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD" "admin" "$MONGODB_INITIAL_PRIMARY_HOST" "$MONGODB_INITIAL_PRIMARY_PORT_NUMBER" <<EOF
900-
rs.status()
879+
rs.status().members
901880
EOF
902881
)
903-
grep -q "name.*$node" <<< "$result"
882+
grep -q -E "\"${node}(:[0-9]+)?\"" <<< "$result"
904883
}
905884

906885
########################

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
4949
* [`4.4`, `4.4-debian-10`, `4.4.3`, `4.4.3-debian-10-r16`, `latest` (4.4/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/4.4.3-debian-10-r16/4.4/debian-10/Dockerfile)
5050
* [`4.2`, `4.2-debian-10`, `4.2.11`, `4.2.11-debian-10-r48` (4.2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/4.2.11-debian-10-r48/4.2/debian-10/Dockerfile)
5151
* [`4.0`, `4.0-debian-9`, `4.0.22`, `4.0.22-debian-9-r16` (4.0/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/4.0.22-debian-9-r16/4.0/debian-9/Dockerfile)
52-
* [`3.6`, `3.6-debian-9`, `3.6.21`, `3.6.21-debian-9-r54` (3.6/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/3.6.21-debian-9-r54/3.6/debian-9/Dockerfile)
52+
* [`3.6`, `3.6-debian-9`, `3.6.21`, `3.6.21-debian-9-r55` (3.6/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/3.6.21-debian-9-r55/3.6/debian-9/Dockerfile)
5353

5454
Subscribe to project updates by watching the [bitnami/mongodb GitHub repo](https://github.com/bitnami/bitnami-docker-mongodb).
5555

0 commit comments

Comments
 (0)