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

datadog-agent.service should not enforce user #3683

Open
vkukk opened this issue Feb 19, 2018 · 1 comment
Open

datadog-agent.service should not enforce user #3683

vkukk opened this issue Feb 19, 2018 · 1 comment

Comments

@vkukk
Copy link

vkukk commented Feb 19, 2018

Regarding to this old issue which is still not resolved in 5.22 #2033

Workaround to that issue is to change supervisor.conf to run supervisord and collector as user root. However, on CentOS/RHEL 7 with systemd, the packaged /usr/lib/systemd/system/datadog-agent.service enforces user dd-agent.


This results in non-working service (collector not running) when changing supervisor.conf to run some processes as root.

Additional environment details (Operating System, Cloud provider, etc):
CentOS/RHEL 7 (possibly all other systemd distributions as well.

Steps to reproduce the issue:

  1. Install on CentOS 7
  2. Change /etc/dd-agent/supervisor.conf services [supervisord] and [program:collector] users to root
  3. systemctl start datadog-agent.service fails

To solve this issue, remove enforcing user dd-agent in datadog-agent.service. Just removing line

is enough.

Then supervisord and collector will be started as root.
root 22062 0.2 0.3 199856 15376 ? Ss 15:16 0:00 /opt/datadog-agent/embedded/bin/python /opt/datadog-agent/bin/supervisord -c /etc/dd-agent/supervisor.conf
dd-agent 22065 1.5 0.9 176016 37292 ? S 15:16 0:00 /opt/datadog-agent/embedded/bin/python /opt/datadog-agent/agent/ddagent.py
dd-agent 22066 1.3 0.8 222040 34228 ? Sl 15:16 0:00 /opt/datadog-agent/embedded/bin/python /opt/datadog-agent/agent/dogstatsd.py --use-local-forwarder
root 22072 5.3 1.0 454580 44340 ? Sl 15:16 0:01 /opt/datadog-agent/embedded/bin/python /opt/datadog-agent/agent/agent.py foreground --use-local-forwarder

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

2 participants
@vkukk and others