Skip to content
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

Service restart on Windows does nothing #333

Closed
anuriq opened this issue Jul 1, 2016 · 2 comments
Closed

Service restart on Windows does nothing #333

anuriq opened this issue Jul 1, 2016 · 2 comments

Comments

@anuriq
Copy link

anuriq commented Jul 1, 2016

Good day. I am using this cookbook on Windows Server 2012 R2 to install consul agents and apply service definitions. Definition notifies consul service to restart of course. Reload is not working on Windows (which is expected).

consul_definition "production-device-service" do
  type 'service'
  parameters(
      address: node['ipaddress'],
      token: <token>,
      check: {
        interval: '30s',
        timeout: '29s',
        http: "http://localhost/api/healthcheck/fast"
      }
    )
  notifies :restart, "consul_service[#{node['consul']['service_name']}]", :delayed
end

But during converge (no matter kitchen or actual nodes) nothing happens, service is not restarted and definitions are not updated. A piece from log with debug level:

[2016-06-30T08:02:30-07:00] INFO: consul_definition[production-device-service] sending restart action to consul_service[consul] (delayed)
Recipe: base::windows
  * consul_service[consul] action restart[2016-06-30T08:02:30-07:00] INFO: Processing consul_service[consul] action restart (base::windows line 69)
[2016-06-30T08:02:30-07:00] DEBUG: Providers for generic consul_service resource enabled on node include: [ConsulCookbook::Provider::ConsulServiceWindows, ConsulCookbook::Provider::ConsulService]
[2016-06-30T08:02:30-07:00] DEBUG: Provider for action restart on resource consul_service[consul] is ConsulCookbook::Provider::ConsulServiceWindows
[2016-06-30T08:02:30-07:00] DEBUG: Resources for generic powershell_script resource enabled on node include: [Chef::Resource::PowershellScript]
[2016-06-30T08:02:30-07:00] DEBUG: Resource for powershell_script is Chef::Resource::PowershellScript (up to date)

It should simply execute powershell script restart-service consul. If I do this manually after, definitions are updated.

@jirkafajfr
Copy link

Hi,

pull #330 is actually fixing restart and adding reload support.

@lock
Copy link

lock bot commented Apr 25, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants