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

Update network denendency in daemon systemd template #489

Conversation

moonape1226
Copy link

Pull Request (PR) description

The config for services in puppet-prometheus module listen on 0.0.0.0 by default. However, when config listens to private IP,
services will fail to start because "After=network.target" doesn't ensure network interface up. It's safer to use "After=network-online.target"

This Pull Request (PR) fixes the following issues

No issue has been filed for this PR.

@@ -2,7 +2,7 @@
[Unit]
Description=Prometheus <%= @name %>
Wants=basic.target
After=basic.target network.target
After=basic.target network-online.target
Copy link
Member

Choose a reason for hiding this comment

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

after some scrolling through https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ I guess we should set:

After=network-online.target
Wants=network-online.target

?

Copy link
Author

Choose a reason for hiding this comment

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

Sorry for the late reply. Yes, I think it's better.

Copy link
Author

@moonape1226 moonape1226 Nov 27, 2020

Choose a reason for hiding this comment

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

I just push an updated version. Please help to check, thanks.

@bastelfreak bastelfreak self-assigned this Sep 26, 2020
@bastelfreak bastelfreak added bug Something isn't working needs-feedback Further information is requested labels Sep 26, 2020
The config for services in puppet-prometheus module listen on
0.0.0.0 by default. However, when config listens to private IP,
services will fail to start because "After=network.target" doesn't
ensure network interface up. It's safer to use
"After=network-online.target" here
@moonape1226 moonape1226 force-pushed the Update_network_dependency_in_daemon_systemd_template branch from 86f80b8 to 25ce4ac Compare November 27, 2020 02:57
@ghoneycutt ghoneycutt merged commit 394b6aa into voxpupuli:master Feb 16, 2021
cegeka-jenkins pushed a commit to cegeka/puppet-prometheus that referenced this pull request Mar 11, 2024
…ndency_in_daemon_systemd_template

Update network denendency in daemon systemd template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-feedback Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants