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

Ignore sysvinit scripts when systemd is used #2469

Merged
merged 4 commits into from
Oct 17, 2018

Conversation

remicalixte
Copy link
Contributor

What does this PR do?

use SYSTEMCTL_SKIP_SYSV env var

Motivation

Remove irrelevant warning on install

@remicalixte remicalixte requested a review from a team as a code owner October 16, 2018 17:11
@remicalixte remicalixte added [deprecated] team/agent-core Deprecated. Use metrics-logs / shared-components labels instead.. changelog/no-changelog labels Oct 16, 2018
@remicalixte remicalixte added this to the 6.6.0 milestone Oct 16, 2018
@remicalixte remicalixte force-pushed the remicalixte/quiet-sysvinit branch from 89d33a6 to b4367fe Compare October 16, 2018 20:54
systemctl enable $SERVICE_NAME || echo "[ WARNING ]\tCannot enable $SERVICE_NAME with systemctl"
systemctl enable $SERVICE_NAME-process || echo "[ WARNING ]\tCannot enable $SERVICE_NAME-process with systemctl"
systemctl enable $SERVICE_NAME-trace || echo "[ WARNING ]\tCannot enable $SERVICE_NAME-trace with systemctl"
SYSTEMCTL_SKIP_SYSV=true systemctl enable $SERVICE_NAME || echo "[ WARNING ]\tCannot enable $SERVICE_NAME with systemctl"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a small comment explaining why we need SYSTEMCTL_SKIP_SYSV=true

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sure

@olivielpeau
Copy link
Member

olivielpeau commented Oct 17, 2018

what's the warning? Some customers use the enable command directly, could the warning mislead them?

@remicalixte
Copy link
Contributor Author

Something like this:

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).

But they also appear when enabling are disabling core system services like dbus.service or networking.service so it shouldn't confuse customers too much

@olivielpeau
Copy link
Member

@remicalixte ok, thanks for the info. I could still see these warnings confuse some users (they look a bit worrying TBH).

Could you update the release note on the sysv-init support to mention that these warnings can be safely ignored on systemd-based systems? (and could you check our public docs as well?). Thanks!

hush-hush
hush-hush previously approved these changes Oct 17, 2018
hush-hush
hush-hush previously approved these changes Oct 17, 2018
@remicalixte
Copy link
Contributor Author

@olivielpeau the public docs on debian advice to use the service command which is available with sysvinit: https://docs.datadoghq.com/agent/basic_agent_usage/deb/?tab=agentv6.
Is there any other public docs I would have missed ?

@olivielpeau
Copy link
Member

@remicalixte you can double-check on the docs available on this repo as well, but that's all I can think of 👍

@remicalixte remicalixte force-pushed the remicalixte/quiet-sysvinit branch from 19ac23f to d588876 Compare October 17, 2018 19:21
@remicalixte
Copy link
Contributor Author

Missed some docs mentioning sysvinit on this repo

@remicalixte remicalixte merged commit 5afdcdc into master Oct 17, 2018
@remicalixte remicalixte deleted the remicalixte/quiet-sysvinit branch October 17, 2018 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog [deprecated] team/agent-core Deprecated. Use metrics-logs / shared-components labels instead..
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants