-
Notifications
You must be signed in to change notification settings - Fork 423
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
append .config
to rabbitmq-env.conf.erb CONFIG_FILE
line
#505
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not following. Modern RabbitMQ versions support config files with both a .config
extension and without it but older versions explicitly require the extension to be missing (this is a runtime requirement/convention that RabbitMQ 3.7 works around).
I'm not sure why this change would make any difference other than making it impossible to use this cookbook with 3.6.x
nodes.
The issue i'm having is that when i set: so if However when i do this with rabbitmq |
@JamesAwesome I see. I'd like to see a different solution. We should only append the |
In other words, it makes sense to me to use whatever value the user has configured if there's already an extension. |
I dig it. I can put in an update to this PR or open a separate issue for you. Let me know how you would like to proceed 👍 |
Let's amend this PR. Thank you! |
@JamesAwesome I will proceed to release a new |
Sure no problem. I just pushed my updates to this PR, should I close and reopen then? |
I tried this with our example Chef cookbook repo and it failed with a message that said that Will investigate later today. |
Here's the failure:
|
I got it to work locally, not 100% sure I'm following best modern Chef practices but there are OpsCode-maintained cookbooks that do the same, so it should be OK. Will run test suites and push later today. |
haha, i had the same thoughts, kind of been away from chef for a bit! i figured i would try and just keep in the style that the cookbook already had. Thanks for all the help! |
@JamesAwesome please give it a shot. |
Workin' thanks again! |
This change is to update line #18 in
templates/default/rabbitmq-env.conf.erb
to append the.config
suffix to the value ofnode['rabbitmq']['config']
As per https://github.com/rabbitmq/chef-cookbook/blob/v5.x/recipes/default.rb#L237 the generated config file will always be at
#{node['rabbitmq']['config']}.config
and not at simplynode['rabbitmq']['config']
Without this change
rabbitmq-env.conf
will never properly handle a non-default setting for the value ofnode['rabbitmq']['config']