From 395b614c471859d91046c58e8954f7815faa68a0 Mon Sep 17 00:00:00 2001 From: Gerhard Lazu Date: Tue, 15 Jan 2019 11:56:58 +0000 Subject: [PATCH] Fix rabbitmq-plugins list in all instances of docker-entrypoint.sh For context, see https://github.com/rabbitmq/rabbitmq-server-boshrelease/commit/2da98843a4cb10c942869b2e4549a29fb2fc3ed0#commitcomment-31470432 @tianon why are there so many instances of docker-entrypoint.sh? Without this, the default container will fail to start: docker run -it rabbitmq:3.7-rc-alpine BOOT FAILED =========== Config file generation failed 11:52:58.890 [error] You've tried to set management.listener.port, but there is no setting with that name. 11:52:58.890 [error] Did you mean one of these? 11:52:58.932 [error] inet_dist_listen_max 11:52:58.932 [error] inet_dist_listen_min 11:52:58.932 [error] listeners.ssl 11:52:58.932 [error] You've tried to set management.listener.ssl, but there is no setting with that name. 11:52:58.932 [error] Did you mean one of these? 11:52:58.972 [error] listeners.ssl 11:52:58.972 [error] inet_dist_listen_max 11:52:58.972 [error] inet_dist_listen_min 11:52:58.972 [error] Error generating configuration in phase transform_datatypes 11:52:58.972 [error] Conf file attempted to set unknown variable: management.listener.ssl 11:52:58.972 [error] Conf file attempted to set unknown variable: management.listener.port BOOT FAILED =========== Error description: rabbit:start_it/1 line 465 rabbit:boot_error/2 line 871 rabbit_lager:log_locations/0 line 88 rabbit_lager:ensure_lager_configured/0 line 189 rabbit_lager:lager_configured/0 line 197 lager:list_all_sinks/0 line 328 lager_config:get/2 line 71 ets:lookup(lager_config, {'_global',handlers}) exit:generate_config_file Log file(s) (may contain more information): {"init terminating in do_boot",generate_config_file} init terminating in do_boot (generate_config_file) Crash dump is being written to: /var/log/rabbitmq/erl_crash.dump...done --- 3.7-rc/alpine/docker-entrypoint.sh | 2 +- 3.7-rc/docker-entrypoint.sh | 2 +- 3.7/alpine/docker-entrypoint.sh | 2 +- 3.7/docker-entrypoint.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.7-rc/alpine/docker-entrypoint.sh b/3.7-rc/alpine/docker-entrypoint.sh index a2856bc..aea0160 100755 --- a/3.7-rc/alpine/docker-entrypoint.sh +++ b/3.7-rc/alpine/docker-entrypoint.sh @@ -365,7 +365,7 @@ if [ "$1" = 'rabbitmq-server' ] && [ "$shouldWriteConfig" ]; then # if management plugin is installed, generate config for it # https://www.rabbitmq.com/management.html#configuration - if [ "$(rabbitmq-plugins list -m -e rabbitmq_management)" ]; then + if [ "$(rabbitmq-plugins list -q -m -e rabbitmq_management)" ]; then if [ "$haveManagementSslConfig" ]; then rabbit_set_config 'management.listener.port' 15671 rabbit_set_config 'management.listener.ssl' 'true' diff --git a/3.7-rc/docker-entrypoint.sh b/3.7-rc/docker-entrypoint.sh index 38406a5..a1bdb3d 100755 --- a/3.7-rc/docker-entrypoint.sh +++ b/3.7-rc/docker-entrypoint.sh @@ -365,7 +365,7 @@ if [ "$1" = 'rabbitmq-server' ] && [ "$shouldWriteConfig" ]; then # if management plugin is installed, generate config for it # https://www.rabbitmq.com/management.html#configuration - if [ "$(rabbitmq-plugins list -m -e rabbitmq_management)" ]; then + if [ "$(rabbitmq-plugins list -q -m -e rabbitmq_management)" ]; then if [ "$haveManagementSslConfig" ]; then rabbit_set_config 'management.listener.port' 15671 rabbit_set_config 'management.listener.ssl' 'true' diff --git a/3.7/alpine/docker-entrypoint.sh b/3.7/alpine/docker-entrypoint.sh index a2856bc..aea0160 100755 --- a/3.7/alpine/docker-entrypoint.sh +++ b/3.7/alpine/docker-entrypoint.sh @@ -365,7 +365,7 @@ if [ "$1" = 'rabbitmq-server' ] && [ "$shouldWriteConfig" ]; then # if management plugin is installed, generate config for it # https://www.rabbitmq.com/management.html#configuration - if [ "$(rabbitmq-plugins list -m -e rabbitmq_management)" ]; then + if [ "$(rabbitmq-plugins list -q -m -e rabbitmq_management)" ]; then if [ "$haveManagementSslConfig" ]; then rabbit_set_config 'management.listener.port' 15671 rabbit_set_config 'management.listener.ssl' 'true' diff --git a/3.7/docker-entrypoint.sh b/3.7/docker-entrypoint.sh index 38406a5..a1bdb3d 100755 --- a/3.7/docker-entrypoint.sh +++ b/3.7/docker-entrypoint.sh @@ -365,7 +365,7 @@ if [ "$1" = 'rabbitmq-server' ] && [ "$shouldWriteConfig" ]; then # if management plugin is installed, generate config for it # https://www.rabbitmq.com/management.html#configuration - if [ "$(rabbitmq-plugins list -m -e rabbitmq_management)" ]; then + if [ "$(rabbitmq-plugins list -q -m -e rabbitmq_management)" ]; then if [ "$haveManagementSslConfig" ]; then rabbit_set_config 'management.listener.port' 15671 rabbit_set_config 'management.listener.ssl' 'true'