-
Notifications
You must be signed in to change notification settings - Fork 83
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
notifying influxes service after config change #140
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,10 @@ | |
|
||
influxdb_config node['influxdb']['config_file_path'] do | ||
config node['influxdb']['config'] | ||
notifies :restart, 'service[influxdb]', :delayed | ||
end | ||
|
||
service 'influxdb' do | ||
action [:enable, :start] | ||
supports :restart => true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This got a syntax error.
I think this would work:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think Ruby will interpret that as a block. But you can use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks @alex-tan, you are right. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know why rubocop is complaining it. Because in chef documentation they followed the same syntax in examples https://docs.chef.io/resource_service.html. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nilroy because Rubocop enforces a certain style of Ruby. |
||
action :enable | ||
end |
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 line is making kitchen tests fail.
Was there a reason why you removed it?
FYI, on initial setup of the cookbook, we require influxdb to be running so we can do some initialization of the database. ref: https://github.com/bdangit/chef-influxdb/blob/master/test/fixtures/cookbooks/influxdb-test/recipes/default.rb#L5-L8
This is at least assuming the user needs to setup the db right after the service has been installed.
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 think when we change the influxdb config or create it for first time it should start the service. So I removed that.