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

New Debian runs fail due to package user/group name changes #185

Open
danclough opened this issue Apr 27, 2024 · 1 comment
Open

New Debian runs fail due to package user/group name changes #185

danclough opened this issue Apr 27, 2024 · 1 comment

Comments

@danclough
Copy link
Contributor

Describe the bug
In recent versions of the telegraf .deb package, it appears that the InfluxDB team has begun to follow Debian Policy §9.2.1 which states that package-owned user and group names should begin with an underscore (_) so there are no name collisions with locally-created users.

This causes the Telegraf playbook to fail because it expects a user/group named "telegraf" to exist after package installation, but does not find it, so the permissions can't be set on the config files.

Installation method/version

  • Ansible Galaxy / 0.14.1

Ansible Version

AWX/Ansible 2.15

Targetted hosts
Concerns the following OS(es):

  • Debian
  • Ubuntu

Expected behavior
The playbook may need to be modified to check if the newly-created user and group are prefixed with an underscore, and to use that value accordingly when setting ownership of the config.

Additional context
If you manually rename the user/group to remove the underscore, and also change the systemd unit file to reflect the new user/group name, everything with this playbook works as expected. But this is obviously a manual intervention workaround, which is not ideal. I don't know when I'll have time to look deeper into a solution but wanted to share the finding here in case others run into this issue as well.

@danclough
Copy link
Contributor Author

It looks like the new telegraf .deb packages specify the username in the .postinst file as a variable "TELEGRAF_USER", so you can check for the value using this:

grep '^TELEGRAF_USER=' /var/lib/dpkg/info/telegraf.postinst | sed -r 's:TELEGRAF_USER="(.*)":\1:'

And my guess is if you don't see that, it'd be safe to default to telegraf.

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

No branches or pull requests

1 participant