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

Convert the daemons to native systemd units #8024

Merged
merged 8 commits into from
Jan 8, 2024
Merged

Conversation

sagepe
Copy link
Member

@sagepe sagepe commented Nov 23, 2023

This replaces the old init scripts for the daemons with systemd unit files.

Relevant issue(s)

#2523

What does this do?

Replaces the Alert Tracks, Send Notifications and Poll Incoming daemon sysvinit scripts with systemd units

Why was this needed?

To modernise the daemons

@gbp gbp force-pushed the 2523-alert-tracks-systemd branch from 1537787 to fd9444d Compare December 4, 2023 13:52
@sagepe sagepe changed the title Convert the Alert Tracks daemon to a systemd unit Convert the daemons to native systemd units Dec 8, 2023
@sagepe sagepe force-pushed the 2523-alert-tracks-systemd branch from 62769a6 to 4faec08 Compare December 11, 2023 10:29
@sagepe sagepe marked this pull request as ready for review December 11, 2023 10:30
@sagepe sagepe requested a review from gbp December 11, 2023 10:30
@sagepe sagepe force-pushed the 2523-alert-tracks-systemd branch 2 times, most recently from cc51ee9 to 20b414b Compare December 15, 2023 08:41
@gbp gbp self-assigned this Dec 18, 2023
Copy link
Member

@gbp gbp left a comment

Choose a reason for hiding this comment

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

Needed to enable ERB trim mode else the rake task didn't work. Have also update the xapian compact script to call rails restart.

Commits should be reordered and messages updated. I'll do this on merging.

Copy link
Member

@gbp gbp left a comment

Choose a reason for hiding this comment

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

Turns out when and install use rbenv these weren't working. This was down to how the paths were defined. I have moved this logic into the rake task instead of the service templates and fixed - IE single PATH env no SET_PATH env needed.

gbp and others added 8 commits January 5, 2024 16:52
Allows `-%>` ending ERB sequence.
This isn't nesscasary and causes systemd services to write logs to a new
file instead of the old one used by init.d scripts.
Saves conditionals in the daemons services.
This replaces the old init script for the alert tracks daemon with a
systemd unit file.
This replaces the old init script for the send notifications daemon with
a systemd unit file.
This replaces the old init script for the mail poller daemon with a
systemd unit file.
Rather than calling out to a script in `/etc/init.d`, call `rails
restart` to directly touch `restart.txt` (which is essentially what the
old init script does anyway).

This removes a dependency on having to have this init script in place
when using this script.
@gbp gbp force-pushed the 2523-alert-tracks-systemd branch from f98d152 to 6d51507 Compare January 5, 2024 17:03
@gbp
Copy link
Member

gbp commented Jan 5, 2024

This should be good to merge next week.

@gbp gbp merged commit ba802cf into develop Jan 8, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants