-
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
Open file limit not set correctly #127
Conversation
Can you rebase this off master and see if it's still relevant? Thanks! |
@@ -167,6 +167,14 @@ class Chef::Resource # rubocop:disable all | |||
notifies :restart, "service[#{node['rabbitmq']['service_name']}]", :immediately | |||
end | |||
|
|||
template '/etc/default/rabbitmq-server' do |
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.
Should we use template "/etc/default/#{node['rabbitmq']['service_name']}"
instead?
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.
👍
@jessedavis |
Yup! I'll try to carve out some time soon to get those folded in; thanks for all the review notes! |
Conflicts: spec/default_spec.rb
This should be ready for re-review. |
👍 @jjasghar @jessedavis Do we still need a spec for this? |
Yeah i'd like a added test in the |
@jjasghar @stevecstian I added a spec (my first time using ChefSpec), so please feel free to reject if I did it wrong. I did have to upgrade ChefSpec above 4.0 to get the tests to start. Since this is my first time contributing to and using Chef, is it normal best practice to perform |
source 'default.rabbitmq-server.erb' | ||
owner 'root' | ||
group 'root' | ||
mode 00644 |
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.
This should be a 4 digit string: '0644'
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.
The 5 digit should be fine. I believe this just forces the octet rule
@tas50 It should be fine to specify 5 digit integer for the value of mode attribute as we're using that format in some places of default recipe. |
This reverts commit 5e60f62.
@@ -8,7 +8,7 @@ end | |||
|
|||
group :unit do | |||
gem 'berkshelf' | |||
gem 'chefspec' | |||
gem 'chefspec', '~> 4.0' |
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.
@jjasghar Is this required?
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.
Paging @jjasghar
Will Gemfile.lock help on this?
/CC @michaelklishin
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.
Meh, you should be running the newest version of chefspec right?
Conflicts: Gemfile spec/default_spec.rb
@jjasghar I think this PR should be ready for a merge (sorry about the long delay). |
@jessedavis we've made some comments on the PR, can you either respond or update the PR with those changes? Thanks! |
@jjasghar I believe I've made all the changes that you and @stevecstian recommended in the comments. Let me know if I'm mistaken or if I didn't make the changes correctly. |
👍 |
1 similar comment
👍 |
If node['rabbitmq']['open_file_limit'] is set to anything other than the default, the resulting ulimit line is normally written in /etc/rabbitmq/rabbitmq-env.conf. That file is usually sourced, and doing so usually prints out an error along the lines of "operation not permitted" when using rabbitmqctl, etc.
The correct place for the ulimit is in /etc/default/rabbitmq-server. I tested this manually by applying the updated recipe to the default-centos-65 and default-ubuntu-1204 images.
I followed the same format for the minitest tests, but could not figure out how to execute them. I'd appreciate a quick rundown on how that's supposed to work, as I'm pretty new to Chef and test-kitchen and am just learning them now.