-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Added ability to remove nssm parameters #263
Added ability to remove nssm parameters #263
Conversation
Current coverage is
|
Would you mind rebasing? |
You can now remove previously set nssm parameters by setting the hash values to '' for Strings, & 0 for Integers. Also improved how the Consul service is stopped on Windows. If you don't stop it before you remove it, you end up in a SERVICE_PAUSED state.
If nssm reported SERVICE_PAUSED for the consul service, the nssm resource was unable to remove it. Altered the service status check so it's flexible to handle multiple exit statuses.
It appears the nssm resource also isn't idempotent. I also added another attribute and made it the default value for the install_path property for consul_service. My reasoning is that one should be able to change this crucial property without having to redeclare the whole resource. #262 will be fixed for linux once johnbellone/libartifact-cookbook#2 is merged
`new_resource.notifies(:reload, new_resource, :delayed)` causes the `consul_service` resource to reload every time Chef ran. This is an issue with the new sysvinit service provider when the service is in a stopped state when Chef runs. It would start and recieve a reload HUP too quickly & subsequently crash the service.
@legal90 kindly pointed out that the default value for ['consul']['config']['data_dir'] & ['consul']['service']['data_dir'] was changed to append 'data' as the last folder. Consul actually creates this directory for you when you start the service. And if you didn't change both, it could cause the Consul agent to fail.
Done. |
The tests pass locally on my machine. It looks like a one-off issue. |
Added ability to remove nssm parameters
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
''
for Strings, &0
for Integers. Also improved how the Consul service is stopped on Windows. If you don't stop it before you remove it, you end up in a SERVICE_PAUSED state.new_resource.notifies(:reload, new_resource, :delayed)
causes theconsul_service
resource to reload every time Chef ran. This is an issue with the new sysvinit service provider when the service is in a stopped state when Chef runs. It would start and recieve a reload HUP too quickly & subsequently crash the service.consul_service
resource. My reasoning is that one should be able to change this crucial property without having to redeclare the whole resource.