-
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
Change the rabbitmq config file path via cookbook will not take effect #157
Comments
Michael Klishin, could you please drop a message for this issue? Thanks. |
@gekun0216 what do you expect me to do? I'm not a collaborator on this repo. If you have a solution in mind, your chances are greatly increased by submitting a pull request. |
@michaelklishin, thanks for reminding, I will try to submit a pull request. |
Was this PR ever submitted? |
I have summitted this PR, #184 |
Nope 😢 I'll do it now. |
Ahhh, the magic keywords should be something like This fixed #157 ... |
We have a requirement to change the rabbitmq config file to a non-default path, but seems there is a potential problem in the current cookbook which prevents us from doing this.
We know there is an attribute in the cookbook:
"rabbitmq.config" which could be used to specify a non-default path of the rabbitmq config file from our perspective. Refer to the following code:
https://github.com/kennonkwok/rabbitmq/blob/master/attributes/default.rb#L19
But the config file path generated by the template resource in recipes/default.rb and the one specified in the templates/default/rabbitmq-env.conf.erb are not consistent, which results in that the config file won't take effect when rabbitmq-server starts.
Refer to the following code:
https://github.com/kennonkwok/rabbitmq/blob/master/recipes/default.rb#L157
https://github.com/kennonkwok/rabbitmq/blob/master/templates/default/rabbitmq-env.conf.erb#L18
Let's take an example to make this clearer: We cannot override attribute of "rabbitmq.config_root", which is "/etc/rabbitmq" in RHEL 6.5 in our case, since the path of file rabbitmq-env.conf cannot be changed per Operating System distribution. We can only change the rabbitmq.config to another path, say "/etc/rabbitmq/alternative/rabbitmq".
Here comes the problem: Since the file generated by the template resource in recipes/default.rb locates at "/etc/rabbitmq/rabbitmq.confg", but the one specified in "/etc/rabbitmq/rabbitmq-env.conf" will be "/etc/rabbitmq/alternative/rabbitmq". So the rabbitmq-server cannot find the config file at "/etc/rabbitmq/alternative/rabbitmq.config" when it starts, hence all the configuration will be missed.
BTW: A quick solution could be to change the following line:
https://github.com/kennonkwok/rabbitmq/blob/master/recipes/default.rb#L157
to be:
template "#{node['rabbitmq']['config']}.config" do
Please help to evaluate this potential problem, Hope it can be fixed early once it is confirmed to be a real issue.
The text was updated successfully, but these errors were encountered: