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

Pupppet sysv fails due to -log.format option #268

Closed
defenestration opened this issue Oct 11, 2018 · 2 comments · Fixed by #270
Closed

Pupppet sysv fails due to -log.format option #268

defenestration opened this issue Oct 11, 2018 · 2 comments · Fixed by #270
Labels
bug Something isn't working

Comments

@defenestration
Copy link

It seems an old option -log.format for prometheus server was removed and prevents the server from starting up with newer prometheus versions (we're using 2.4.3) when using older Sysv init scripts on at least CentOS6.

This seems to be the affected line and removing -log.format and parameters seem to work.
https://github.com/voxpupuli/puppet-prometheus/blob/master/templates/prometheus.sysv.erb#L54

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.10
  • Ruby: ruby 1.8.7
  • Distribution: CentOS release 6.10 (Final)
  • Module version: 6.3.0

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

Use puppet::server class on CentOs6 or sysv class with latest prometheus server version.

What are you seeing

Prometheus fails to start.

What behaviour did you expect instead

Prometheus starts and runs.

Output log

[root@statsd.dev /var/log]# service prometheus start
Starting prometheus: 
[root@statsd.dev /var/log]# Error parsing commandline arguments: unknown short flag '-l'
prometheus: error: unknown short flag '-l'

Any additional information you'd like to impart

Looks like this is the issue here.
https://github.com/voxpupuli/puppet-prometheus/blob/master/templates/prometheus.sysv.erb#L54

Didn't have this issue on systemd startup scripts on Centos7.

@bastelfreak
Copy link
Member

Hi @defenestration, could you provide a PR for this? it basically requires a switch to check for the prometheus version and afterwards use the long- or the short option.

@bastelfreak bastelfreak added the bug Something isn't working label Oct 14, 2018
@defenestration
Copy link
Author

I added additional commits to resolve the Travis build errors, i seem unable to comment on the PR for some reason though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants