Skip to content

Format errors and warnings with regard to config files in a manner si… #1695

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
Sep 8, 2018

Conversation

lukebakken
Copy link
Collaborator

…milar to lager

Use exit code 64 when configuration is invalid

  • This shows the pid warning as well as the invalid extension error:
echo "PID_FILE=$HOME/rabbitmq.pid" > "$HOME/rabbitmq-env.conf"
make RABBITMQ_CONF_ENV_FILE="$HOME/rabbitmq-env.conf" \ 
    "RABBITMQ_CONFIG_FILE=$HOME/my.foo" run-broker
  • Create a badly-formatted ini file and run this:
make RABBITMQ_CONFIG_FILE="$HOME/bad.conf" run-broker
  • Create a badly-formatted config file and run this:
make RABBITMQ_CONFIG_FILE="$HOME/bad.config" run-broker
  • Create both my.config and my.conf in the same dir, and run this:
make RABBITMQ_CONFIG_FILE="$HOME/my" run-broker

Copy link
Collaborator

@michaelklishin michaelklishin left a comment

Choose a reason for hiding this comment

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

I cannot get nodes to start by CT helpers on this branch. The issue is not present in master. Shared logs privately.

{
_rmq_env_tmp="$1"
shift
printf '%s %s %s\n' "$(_rmq_env_now)" "$_rmq_env_tmp" "$1" 1>&2
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: printf is POSIX sh compatible

Copy link
Collaborator

@michaelklishin michaelklishin left a comment

Choose a reason for hiding this comment

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

gmake ct-rabbitmqctl_integration now fails because it captures and asserts on output and now there are additional entries about PID file path.

…milar to lager

Use exit code 64 when configuration is invalid

Correctly deal with RABBITMQ_PID_FILE

Fix bug in setting up RABBITMQ_PID_FILE as well as printing multi-line warnings and errors

Calculate indent
@lukebakken lukebakken force-pushed the lrb-error-text-formatting branch from a677be6 to 11915db Compare September 7, 2018 00:05
@michaelklishin michaelklishin merged commit a52de96 into master Sep 8, 2018
@michaelklishin michaelklishin deleted the lrb-error-text-formatting branch September 8, 2018 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants