From 3a07c74a5cfc6be43b92829431863f46edcbbcaf Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Wed, 5 Apr 2023 20:03:46 +0200 Subject: [PATCH] [bitnami/solr] Release 8.11.2-debian-11-r99 (#29342) Signed-off-by: Bitnami Containers --- bitnami/solr/8/debian-11/Dockerfile | 8 ++-- .../opt/bitnami/.bitnami_components.json | 4 +- .../rootfs/opt/bitnami/scripts/libsolr.sh | 37 +++++++++++++++++-- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/bitnami/solr/8/debian-11/Dockerfile b/bitnami/solr/8/debian-11/Dockerfile index 91edf97345f6..4f781ae2a568 100644 --- a/bitnami/solr/8/debian-11/Dockerfile +++ b/bitnami/solr/8/debian-11/Dockerfile @@ -4,10 +4,10 @@ ARG JAVA_EXTRA_SECURITY_DIR="/bitnami/java/extra-security" ARG TARGETARCH LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bullseye" \ - org.opencontainers.image.created="2023-04-04T15:47:29Z" \ + org.opencontainers.image.created="2023-04-05T17:35:19Z" \ org.opencontainers.image.description="Application packaged by VMware, Inc" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="8.11.2-debian-11-r98" \ + org.opencontainers.image.ref.name="8.11.2-debian-11-r99" \ org.opencontainers.image.title="solr" \ org.opencontainers.image.vendor="VMware, Inc." \ org.opencontainers.image.version="8.11.2" @@ -23,8 +23,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN install_packages acl ca-certificates curl lsof netcat procps zlib1g RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \ COMPONENTS=( \ - "java-11.0.18-10-4-linux-${OS_ARCH}-debian-11" \ - "solr-8.11.2-12-linux-${OS_ARCH}-debian-11" \ + "java-17.0.6-10-4-linux-${OS_ARCH}-debian-11" \ + "solr-8.11.2-13-linux-${OS_ARCH}-debian-11" \ "gosu-1.16.0-5-linux-${OS_ARCH}-debian-11" \ ) && \ for COMPONENT in "${COMPONENTS[@]}"; do \ diff --git a/bitnami/solr/8/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/solr/8/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json index 4db63352c8f3..f37d50b013fb 100644 --- a/bitnami/solr/8/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/solr/8/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json @@ -9,12 +9,12 @@ "arch": "amd64", "distro": "debian-11", "type": "NAMI", - "version": "11.0.18-10-4" + "version": "17.0.6-10-4" }, "solr": { "arch": "amd64", "distro": "debian-11", "type": "NAMI", - "version": "8.11.2-12" + "version": "8.11.2-13" } } \ No newline at end of file diff --git a/bitnami/solr/8/debian-11/rootfs/opt/bitnami/scripts/libsolr.sh b/bitnami/solr/8/debian-11/rootfs/opt/bitnami/scripts/libsolr.sh index 90a598d0937f..473b5b2b0a47 100644 --- a/bitnami/solr/8/debian-11/rootfs/opt/bitnami/scripts/libsolr.sh +++ b/bitnami/solr/8/debian-11/rootfs/opt/bitnami/scripts/libsolr.sh @@ -285,6 +285,31 @@ solr_wait_for_api() { fi } +######################### +# Check if SOLR Cloud auth is already enabled +# Globals: +# SOLR_* +# Arguments: +# None +# Returns: +# Boolean +######################### +solr_auth_already_enabled() { + local temp_file_name="/tmp/zk-security.json" + local -r exec="${SOLR_BIN_DIR}/solr" + local command_args=("zk" "cp" "zk:/solr/security.json" "$temp_file_name" "-z" "$SOLR_ZK_HOSTS") + debug "Checking if auth already enabled in ZK" + + "$exec" "${command_args[@]}" + + local result=1 + if grep -q solr.BasicAuthPlugin "$temp_file_name"; then + result=0 + fi + rm "$temp_file_name" + return $result +} + ######################### # Create SOLR cloud user # Globals: @@ -303,11 +328,15 @@ solr_create_cloud_user() { info "Creating user: ${username}" - if ! debug_execute "$exec" "${command_args[@]}"; then - error "There was an error when creating the user" - exit 1 + if ! solr_auth_already_enabled; then + if ! debug_execute "$exec" "${command_args[@]}"; then + error "There was an error when creating the user" + exit 1 + else + info "User created" + fi else - info "User created" + info "Skipping. Security is already enabled." fi }