Skip to content

Commit 1dbba97

Browse files
committed
Add deprecation warnings to "docker-entrypoint.sh"
1 parent 2a3ffff commit 1dbba97

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docker-entrypoint.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ for conf in "${!configDefaults[@]}"; do
179179
done
180180

181181
# if long and short hostnames are not the same, use long hostnames
182-
if [ "$(hostname)" != "$(hostname -s)" ]; then
182+
if [ -z "${RABBITMQ_USE_LONGNAME:-}" ] && [ "$(hostname)" != "$(hostname -s)" ]; then
183+
echo >&2 "WARNING: relying on 'docker-entrypoint.sh' implied 'RABBITMQ_USE_LONGNAME=true' setting, which will be removed in a future release! (https://github.com/docker-library/rabbitmq/pull/424)"
183184
: "${RABBITMQ_USE_LONGNAME:=true}"
184185
fi
185186

@@ -195,6 +196,10 @@ if [ "${RABBITMQ_ERLANG_COOKIE:-}" ]; then
195196
echo "$RABBITMQ_ERLANG_COOKIE" > "$cookieFile"
196197
fi
197198
chmod 600 "$cookieFile"
199+
200+
# TODO show warning about use of RABBITMQ_ERLANG_COOKIE variable ??
201+
# - https://github.com/docker-library/rabbitmq/pull/424#discussion_r459983266
202+
# - https://github.com/rabbitmq/rabbitmq-prometheus/commit/83cff5a4b80d4683a6a0a32db979ca00ec1774b3
198203
fi
199204

200205
configBase="${RABBITMQ_CONFIG_FILE:-/etc/rabbitmq/rabbitmq}"
@@ -392,6 +397,13 @@ if [ "$1" = 'rabbitmq-server' ] && [ "$shouldWriteConfig" ]; then
392397
rabbit_set_config 'load_definitions' "$managementDefinitionsFile"
393398
fi
394399
fi
400+
401+
echo >&2 "WARNING: 'docker-entrypoint.sh' generated/modified the RabbitMQ configuration file, which will no longer happen in a future release! (https://github.com/docker-library/rabbitmq/pull/424)"
402+
echo >&2
403+
echo >&2 "Generated end result, for reference:"
404+
echo >&2 "------------------------------------"
405+
cat >&2 "$newConfigFile"
406+
echo >&2 "------------------------------------"
395407
fi
396408

397409
combinedSsl='/tmp/rabbitmq-ssl/combined.pem'
@@ -403,6 +415,8 @@ if [ "$haveSslConfig" ] && [[ "$1" == rabbitmq* ]] && [ ! -f "$combinedSsl" ]; t
403415
cat "$RABBITMQ_SSL_KEYFILE"
404416
} > "$combinedSsl"
405417
chmod 0400 "$combinedSsl"
418+
419+
echo >&2 "WARNING: relying on 'docker-entrypoint.sh' generating a combined SSL file, which will no longer happen in a future release! (https://github.com/docker-library/rabbitmq/pull/424)"
406420
fi
407421
if [ "$haveSslConfig" ] && [ -f "$combinedSsl" ]; then
408422
# More ENV vars for make clustering happiness
@@ -412,6 +426,8 @@ if [ "$haveSslConfig" ] && [ -f "$combinedSsl" ]; then
412426
sslErlArgs="-pa $ERL_SSL_PATH -proto_dist inet_tls -ssl_dist_opt server_certfile $combinedSsl -ssl_dist_opt server_secure_renegotiate true client_secure_renegotiate true"
413427
export RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="${RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS:-} $sslErlArgs"
414428
export RABBITMQ_CTL_ERL_ARGS="${RABBITMQ_CTL_ERL_ARGS:-} $sslErlArgs"
429+
430+
# (no WARNING here, because this will only happen if we already displayed the "combined SSL file" WARNING above, so it would be redundant)
415431
fi
416432

417433
exec "$@"

0 commit comments

Comments
 (0)