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

Add a configurable "ignored service" list to checkservices #78

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

Antiz96
Copy link
Contributor

@Antiz96 Antiz96 commented Jul 15, 2024

This commit aims to introduce an ignored service list that contains services that are known to cause parsing errors and/or issues when being restarted. Elements can be added to the list with the -i "service_name".service option (e.g. checkservices -i sddm.service -i NetworkManager.service)

Show usage and exit if the -i argument does not finish with .service (to ensure a precise parsing and avoid unexpected filtering)

Fixes #44

@lahwaacz
Copy link
Contributor

At this point it might be worth making the ignore list configurable. E.g. I would add sddm.service which would take down the whole active user session, unless the service has an override with KillMode=process.

@Antiz96
Copy link
Contributor Author

Antiz96 commented Jul 15, 2024

At this point it might be worth making the ignore list configurable. E.g. I would add sddm.service which would take down the whole active user session, unless the service has an override with KillMode=process.

That's kind of a different issue than the one this PR was initially opened for but I agree in would be great to make it configurable.
IMO we should even add the few ones we know are problematic to restart by default (e.g. systemd-login, dbus-broker.service, etc...) and then provide an option to add more ignored services to the list. I'll work on that in a few.

@Antiz96 Antiz96 changed the title Add an ignored service list to checkservices to avoid known/useless parsing errors Add a configurable "ignored service" list to checkservices Jul 15, 2024
@Antiz96 Antiz96 requested a review from lahwaacz July 15, 2024 18:38
@Antiz96
Copy link
Contributor Author

Antiz96 commented Jul 15, 2024

@lahwaacz The list now contains services that are known to create issues by default and element can be added to the list like so: checkservices -i sddm.service NetworkManager.service

This commit aims to introduce an ignored service list that contains services that are known to cause parsing errors and/or issues when being restarted. Elements can be added to the list with the `-i "service_name".service` option (e.g. `checkservices -i sddm.service -i NetworkManager.service`)

Show usage and exit if the `-i` argument does not finish with `.service` (to ensure a precise parsing and avoid unexpected filtering)

Fixes #44
@Antiz96
Copy link
Contributor Author

Antiz96 commented Jul 16, 2024

@lahwaacz The -i option is now getops compliant. How does that look?

Copy link
Contributor

@lahwaacz lahwaacz left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Antiz96 Antiz96 merged commit 55e6f07 into master Jul 20, 2024
1 check passed
@Antiz96 Antiz96 deleted the ignore_services branch July 20, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

checkservices: Unable to parse pid file for getty@tty1.service
2 participants