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

Process-exporter sysv init stop process command not found #311

Closed
strings48066 opened this issue Apr 8, 2019 · 0 comments · Fixed by #314
Closed

Process-exporter sysv init stop process command not found #311

strings48066 opened this issue Apr 8, 2019 · 0 comments · Fixed by #314

Comments

@strings48066
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: Enterprise 2017.3.2
  • Ruby: ruby 2.0.0p598
  • Distribution: Rhel or Centos 6
  • Module version: 6.4.0

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

Apply the following to a node
class { 'prometheus::process_exporter':
init_style => 'sysv'
}

What are you seeing

service process-exporter stop

Shutting down prometheus process-exporter: /etc/init.d/process-exporter: line 68: process-exporter_pid=19531: command not found

What behaviour did you expect instead

Expected the process to stop without error.

Any additional information you'd like to impart

Line 68 attempts the following.
process-exporter_pid=$(cat $PID_FILE)

The issue is the '-' in the name of the variable that's created. Manually creating a variable with a dash in the name yields the same error message.

The offending entry in daemon.sysv.erb
<%= @name %>_pid=$(cat $PID_FILE)

@name expands to process-exporter which can probably be changed to something static and ambiguous.

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