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

add config validate #84

Closed
maxadamo opened this issue Apr 22, 2023 · 1 comment · Fixed by #85
Closed

add config validate #84

maxadamo opened this issue Apr 22, 2023 · 1 comment · Fixed by #85

Comments

@maxadamo
Copy link
Sponsor Contributor

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: n/a
  • Ruby: n/a
  • Distribution: n/a
  • Module version:

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

a wrong configuration leads to a service outage.

What are you seeing

certain errors can be detected using nomad config validate against the configuration file.
That doesn't work for everything. If the directory defined in host_volume does not exist, Nomad fails to restart and if puppet runs on all the agent, you'll face an outage.

What behaviour did you expect instead

Let puppet fail if the configuration has issues

Output log

n/a

Any additional information you'd like to impart

I have something in the works and I'll prepare a PR soon.

It's a ruby script which runs nomad config validate and check if the host_volumes have a corresponding file/directory.
Further checks can be easily added to this file.

maxadamo added a commit to maxadamo/puppet-nomad that referenced this issue Apr 23, 2023
@maxadamo
Copy link
Sponsor Contributor Author

an issue has been open for Nomad: hashicorp/nomad#16968
Meantime the user can choose between the ruby script and nomad validation.

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