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

User/Group for node-exporter not same as install directory user/group #473

Closed
thyzzv opened this issue Jul 6, 2020 · 2 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@thyzzv
Copy link

thyzzv commented Jul 6, 2020

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.16.0
  • Ruby:
  • Distribution: Ubuntu
  • Module version: v7.0.0 but after upgrading to v9.0.0 no change

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

in a manifest use include prometheus::node_exporter

What are you seeing

The user/group on /opt/node_exporter-0.18.1.linux-amd64/ is 3434:3434

drwxr-xr-x  2 3434 3434 4096 Jun  4  2019 node_exporter-0.18.1.linux-amd64

And the owners inside the install directory

ll /opt/node_exporter-0.18.1.linux-amd64/
total 16508
drwxr-xr-x 2 3434 3434     4096 Jun  4  2019 .
drwxr-xr-x 8 root root     4096 Jun 22 14:32 ..
-rw-r--r-- 1 3434 3434    11357 Jun  4  2019 LICENSE
-rw-r--r-- 1 3434 3434      463 Jun  4  2019 NOTICE
-r-xr-xr-x 1 root root 16878582 Jun  4  2019 node_exporter

and the installed user:

node-exporter:x:999:999::/home/node-exporter:/usr/sbin/nologin

What behaviour did you expect instead

That the user:group on the install folder match the created user or root (which is the owner of the executable)

Output log

Jun 19 14:36:49 monitoring-prod puppet-agent[25730]: (/Stage[main]/Prometheus::Node_exporter/Prometheus::Daemon[node_exporter]/Archive[/tmp/node_exporter-0.18.1.tar.gz]/ensure) download archive from https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz to /tmp/node_exporter-0.18.1.tar.gz and extracted in /opt with cleanup
Jun 19 14:36:49 monitoring-prod puppet-agent[25730]: (/Stage[main]/Prometheus::Node_exporter/Prometheus::Daemon[node_exporter]/File[/opt/node_exporter-0.18.1.linux-amd64/node_exporter]/owner) owner changed 3434 to 'root'
Jun 19 14:36:49 monitoring-prod puppet-agent[25730]: (/Stage[main]/Prometheus::Node_exporter/Prometheus::Daemon[node_exporter]/File[/opt/node_exporter-0.18.1.linux-amd64/node_exporter]/group) group changed 3434 to 'root'
Jun 19 14:36:49 monitoring-prod puppet-agent[25730]: (/Stage[main]/Prometheus::Node_exporter/Prometheus::Daemon[node_exporter]/File[/opt/node_exporter-0.18.1.linux-amd64/node_exporter]/mode) mode changed '0755' to '0555'
Jun 19 14:36:49 monitoring-prod puppet-agent[25730]: (/Stage[main]/Prometheus::Node_exporter/Prometheus::Daemon[node_exporter]/File[/usr/local/bin/node_exporter]/ensure) created
Jun 19 14:36:49 monitoring-prod puppet-agent[25730]: (/Stage[main]/Prometheus::Node_exporter/Prometheus::Daemon[node_exporter]/File[/usr/local/bin/node_exporter]) Scheduling refresh of Service[node_exporter]
Jun 19 14:36:49 monitoring-prod systemd[1]: Stopped Network Name Resolution.
Jun 19 14:36:49 monitoring-prod systemd[1]: Starting Network Name Resolution...
Jun 19 14:36:49 monitoring-prod puppet-agent[25730]: (/Stage[main]/Prometheus::Node_exporter/Prometheus::Daemon[node_exporter]/Group[node-exporter]/ensure) created
Jun 19 14:36:49 monitoring-prod puppet-agent[25730]: (/Stage[main]/Prometheus::Node_exporter/Prometheus::Daemon[node_exporter]/User[node-exporter]/ensure) created
Jun 19 14:36:49 monitoring-prod puppet-agent[25730]: (/Stage[main]/Prometheus::Node_exporter/Prometheus::Daemon[node_exporter]/File[/etc/default/node_exporter]/ensure) defined content as '{md5}d41d8cd98f00b204e9800998ecf8427e'
Jun 19 14:36:49 monitoring-prod puppet-agent[25730]: (/Stage[main]/Prometheus::Node_exporter/Prometheus::Daemon[node_exporter]/File[/etc/default/node_exporter]) Scheduling refresh of Service[node_exporter]

Any additional information you'd like to impart

@dhoppe dhoppe added the duplicate This issue or pull request already exists label Jul 9, 2020
@dhoppe
Copy link
Member

dhoppe commented Jul 9, 2020

Duplicate of #448

@dhoppe dhoppe marked this as a duplicate of #448 Jul 9, 2020
@TheMeier
Copy link
Contributor

TheMeier commented May 5, 2024

Closing because duplicate of #448

@TheMeier TheMeier closed this as completed May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants