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

exec statement "reload nomad service" contains wrong command #75

Closed
maxadamo opened this issue Feb 27, 2023 · 1 comment · Fixed by #76
Closed

exec statement "reload nomad service" contains wrong command #75

maxadamo opened this issue Feb 27, 2023 · 1 comment · Fixed by #76

Comments

@maxadamo
Copy link
Contributor

maxadamo commented Feb 27, 2023

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: n/a
  • Ruby: n/a
  • Distribution: n/a
  • Module version: 2.2.0 (it's the same in the master branch)
  • Nomad version: 1.4.x , 1.5.0

How to reproduce (e.g Puppet code you use)

the command defined here: https://github.com/voxpupuli/puppet-nomad/blob/master/manifests/reload_service.pp#L21
doesn't look quite right with the versions of Nomad that I am using.
I tried with Nomad 1.4.x and 1.5.0 and it doesn't work

What are you seeing

throws an error: the command is wrong.

Any additional information you'd like to impart

I'm still trying to figure out the proper command (if one still exists)

@maxadamo
Copy link
Contributor Author

maxadamo commented Feb 28, 2023

  1. the systemd service provided with this module has an option to reload the service: https://github.com/voxpupuli/puppet-nomad/blob/master/templates/nomad.systemd.erb#L8
  2. this module supports systemd only
  3. the systemd file provided with the Hashicorp package has always had an option to reload the service (I checked Nomad version 0.10.6 RPM and DEB)
  4. perhaps nomad reload command was removed, in favour of sending a HUP signal to the daemon: https://developer.hashicorp.com/nomad/docs/configuration#configuration-reload

I don't see a point to use any alternative command, and I would do the following:

remove this one:

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

add this one:

exec { 'reload nomad service':
  path        => ['/bin', '/usr/bin'],
  command     => 'systemctl reload nomad.service',
  refreshonly => true,
}

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

Successfully merging a pull request may close this issue.

1 participant