-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix issue in notifying tentacle service restart on tentacle register #57
Conversation
@@ -168,7 +169,11 @@ | |||
notifies :restart, "windows_service[#{service_name}]", :delayed | |||
end | |||
|
|||
new_resource.updated_by_last_action(actions_updated?([register_instance])) | |||
service = windows_service service_name 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.
I believe we can ignore this part because if the action above happens then the restart will happen and therefore the resource will be updated.
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.
Not sure I follow, are you saying change this:
new_resource.updated_by_last_action(actions_updated?([register_instance, service]))
to this?
new_resource.updated_by_last_action(actions_updated?([register_instance]))
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.
Yup that is correct. That service resource does not need to be included as it is dependent on the tentacle. If it was also performing an action by default I would include it but in this case it is only being notified by the existing resource.
No need to revert. Just want to make sure its fixed before publishing this to supermarket. |
Removed the service from new_resource.updated_by_last_action Manually verified it works I do notice that it sends 2 notifications to restart, I don't think there is any way of avoiding that without a large refactor. While not ideal, It shouldn't harm anything.
|
👍 |
Published |
Fixes the regression that 4f788e2 introduced in #55
Also fixes #55 so tentacles no longer require manual restarts before health checks pass.
Green checkmark means health check passed.
The git history is now a little messy. If you prefer, you could revert #55 and we can combine it with #57. Otherwise it should be good as is.