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

Systemctl disable datadog-agent does not disable service, still starts on reboot #4181

Open
benileo opened this issue Sep 19, 2019 · 2 comments

Comments

@benileo
Copy link

benileo commented Sep 19, 2019

$ datadog-agent version
Agent 6.14.0 - Commit: 748545e - Serialization version: 4.12.0 - Go version: go1.12.9

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic

$ sudo systemctl stop datadog-agent

$ sudo systemctl disable datadog-agent
Synchronizing state of datadog-agent.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable datadog-agent
insserv: warning: current start runlevel(s) (empty) of script `datadog-agent' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `datadog-agent' overrides LSB defaults (0 1 6).
insserv: warning: current start runlevel(s) (empty) of script `datadog-agent' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `datadog-agent' overrides LSB defaults (0 1 6).

$ sudo systemctl status datadog-agent
● datadog-agent.service - Datadog Agent
   Loaded: loaded (/lib/systemd/system/datadog-agent.service; disabled; vendor preset: enabled)
   Active: inactive (dead) since Thu 2019-09-19 10:27:17 PDT; 1min 26s ago
 Main PID: 1050 (code=exited, status=0/SUCCESS)

$ sudo reboot

$ sudo systemctl status datadog-agent
● datadog-agent.service - Datadog Agent
   Loaded: loaded (/lib/systemd/system/datadog-agent.service; disabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-09-19 10:29:55 PDT; 10s ago
 Main PID: 1080 (agent)
    Tasks: 8 (limit: 1107)
   CGroup: /system.slice/datadog-agent.service
           └─1080 /opt/datadog-agent/bin/agent/agent run -p /opt/datadog-agent/run/agent.pid

Systemd service is disabled, yet it still starts on reboot. Improper unit file?

@toddrosner
Copy link

toddrosner commented Jan 13, 2020

Seems there's some direct dependencies with the correlating agents. If you run the following command:

systemctl list-unit-files --type=service | grep datadog

You should see all of the correlating agents and their startup state. All Datadog agents will need to be disabled using systemctl to get the desired disabled state of the single datadog-agent.

It'd be great if you could simply disable datadog-agent and have it disable the rest.

@thedavidwhiteside
Copy link

If you disable datadog-agent I would expect it to disable all the datadog-agent services. On CentOS systems this seems to be the default behavior, but not on Ubuntu. This is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants