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 reload too quick #231

Closed
nvtkaszpir opened this issue Feb 22, 2016 · 0 comments
Closed

Service reload too quick #231

nvtkaszpir opened this issue Feb 22, 2016 · 0 comments

Comments

@nvtkaszpir
Copy link
Contributor

Looks like sometimes Exec['reload consul service'] executes commands while consul service is still starting up - thus getting error message 'connection refused'.

For me this was fixed by adding 'tries' to Exec in reload_service.pp

    exec { 'reload consul service':
      path        => [$consul::bin_dir,'/bin','/usr/bin'],
      command     => "consul reload -rpc-addr=${consul::rpc_addr}:${consul::rpc_port}",
      tries       => 3,
      refreshonly => true,
    }

But still needs better testing.

@nvtkaszpir nvtkaszpir changed the title Service restart too quick Service reload too quick Feb 22, 2016
cmd-ntrf added a commit to cmd-ntrf/puppet-consul that referenced this issue Sep 24, 2019
As expressed issue voxpupuli#231, consul reload will fails if it happens while consul is still booting. However, the addition of multiple tries does not solve the issue as all tries can occur in a very short lapse of time.

In this PR, we introduce a sleep between each try, leaving consul up to 20 seconds between the first and the last reload to complete its boot, which should be enough.
cmd-ntrf added a commit to cmd-ntrf/puppet-consul that referenced this issue Nov 11, 2019
As expressed issue voxpupuli#231, consul reload will fails if it happens while consul is still booting. However, the addition of multiple tries does not solve the issue as all tries can occur in a very short lapse of time.

In this PR, we introduce a sleep between each try, leaving consul up to 20 seconds between the first and the last reload to complete its boot, which should be enough.
spuder pushed a commit to spuder/puppet-consul that referenced this issue Feb 25, 2020
As expressed issue voxpupuli#231, consul reload will fails if it happens while consul is still booting. However, the addition of multiple tries does not solve the issue as all tries can occur in a very short lapse of time.

In this PR, we introduce a sleep between each try, leaving consul up to 20 seconds between the first and the last reload to complete its boot, which should be enough.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants