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

allow specifying services that should start before the exporter daemon #477

Closed
wants to merge 4 commits into from

Conversation

bryangwilliam
Copy link

Pull Request (PR) description

Allow specifying other services that should be started prior to the exporter daemon starting up in systemd. This is to handle situations where you want the service being monitored to be started before the exporter.

This Pull Request (PR) fixes the following issues

N/A (new feature)

@vox-pupuli-tasks
Copy link

Dear @bryangwilliam, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli Github Bot. I noticed that your pull request has CI failures. Can you please have a look at the failing CI jobs?
If you need any help, you can reach out to us on our IRC channel voxpupuli on Freenode or our Slack channel voxpupuli at slack.puppet.com.
You can find my sourcecode at voxpupuli/vox-pupuli-tasks

@@ -2,7 +2,7 @@
[Unit]
Description=Prometheus <%= @name %>
Wants=basic.target
After=basic.target network.target
After=basic.target network.target<% @unit_after.each do |after_item| %> <%= after_item %><% end %>
Copy link
Member

Choose a reason for hiding this comment

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

are you by any chance interested to migrate this template from erb to epp?

Copy link
Author

Choose a reason for hiding this comment

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

I have made this suggested change. This is my first time working with epp, so I'm not sure if there are better approaches than what I have here.

manifests/daemon.pp Outdated Show resolved Hide resolved
@@ -45,6 +45,8 @@
# Service startup scripts style (e.g. rc, upstart or systemd).
# Can also be set to `none` when you don't want the class to create a startup script/unit_file for you.
# Typically this can be used when a package is already providing the file.
# @param unit_after
# List of units that should be started prior to this daemon. Only supported for the systemd init_style.
Copy link
Member

Choose a reason for hiding this comment

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

every exporter class inherits from prometheus::daemon. You need to add this parameter to those classes as well (including documentation)

Copy link
Author

Choose a reason for hiding this comment

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

I really only use the define for creating my own exporters, so I had intended on letting it ride as an under-the-radar addition that the individual exporters can implement as needed (it may not even make sense for all of them). I do see the desire to expose the feature up higher though, so I'll try to get that change added here in the next little while.

@bastelfreak bastelfreak added the needs-work not ready to merge just yet label Aug 5, 2020
@vox-pupuli-tasks
Copy link

Dear @bryangwilliam, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?

You can find my sourcecode at voxpupuli/vox-pupuli-tasks

@TheMeier
Copy link
Contributor

TheMeier commented Jun 3, 2024

I think this can be better achieved by using drop-ins
https://github.com/voxpupuli/puppet-systemd/blob/master/REFERENCE.md#systemd--dropin_file

@TheMeier TheMeier closed this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants