Skip to content

Change our "tty" enablement code to not set sasl_error_logger for now #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ ENV RABBITMQ_VERSION 3.4.3-1

RUN apt-get update && apt-get install -y rabbitmq-server=$RABBITMQ_VERSION --no-install-recommends && rm -rf /var/lib/apt/lists/*

# get logs to stdout (thanks to http://www.superpumpup.com/docker-rabbitmq-stdout)
RUN grep -vE '^\s+-rabbit .*error_logger.*' /usr/lib/rabbitmq/lib/rabbitmq_server-*/sbin/rabbitmq-server > /tmp/rabbitmq-server \
# get logs to stdout (thanks to http://www.superpumpup.com/docker-rabbitmq-stdout for inspiration)
# TODO figure out what we'd need to do to add "(sasl_)?" to this sed and have it work ("{"init terminating in do_boot",{rabbit,failure_during_boot,{error,{cannot_log_to_tty,sasl_report_tty_h,not_installed}}}}")
RUN sed -E 's!^(\s*-rabbit\s+error_logger)\s+\S*!\1 tty!' /usr/lib/rabbitmq/lib/rabbitmq_server-*/sbin/rabbitmq-server > /tmp/rabbitmq-server \
&& chmod +x /tmp/rabbitmq-server \
&& mv /tmp/rabbitmq-server /usr/lib/rabbitmq/lib/rabbitmq_server-*/sbin/rabbitmq-server
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better, this could be:

RUN sed -i.bak -E \
  -e 's!^(\s*-rabbit\s+error_logger)\s+\S*!\1 tty!' \
  -e 's!^(\s*-rabbit\s+sasl_error_logger)\s+\S*!\1 tty!' \
  /usr/lib/rabbitmq/lib/rabbitmq_server-*/sbin/rabbitmq-server

and you get to remove the chmod + the mv.

*Please hold for testing. *

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK the sasl bit still does not work. Sorry for the comment spam (but the -i.bak bit may still be useful.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully #18 leads to us not needing this at all. 😄

I'm not sure why we didn't use -i here initially... Seems like an oversight, so a PR would definitely be 👍! 😇

ENV RABBITMQ_SERVER_START_ARGS -eval error_logger:tty(true).

RUN echo '[{rabbit, [{loopback_users, []}]}].' > /etc/rabbitmq/rabbitmq.config

Expand Down