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

systemd::unit_file: remove hasrestart/hasstatus params #264

Merged
merged 2 commits into from
Jan 26, 2023

Conversation

bastelfreak
Copy link
Member

This removes two parameters from systemd::unit_file. In release 3.8.0 on 2022-03-02 we introcuced the deprecation warnings. We should merge this PR somewhere in the future when we've other breaking changes. Do not merge at the moment!

@@ -81,23 +75,13 @@
Optional[Variant[Boolean, Enum['mask']]] $enable = undef,
Optional[Boolean] $active = undef,
Optional[String] $restart = undef,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shoudn't the restart parameter be removed with this as well?

Copy link
Member

Choose a reason for hiding this comment

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

This is the restart parameter on service, which I think can still be useful. For example, one could set /usr/bin/systemctl reload-or-restart $unit.

If you're talking about the one in service_limits, then I'd agree. IMHO that's a bad pattern.

Boolean $restart_service = true

Copy link
Contributor

Choose a reason for hiding this comment

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

systemd::unit_file { "my.service":
  ....
  service_parameters => {
    'restart' => "/usr/bin/systemctl reload-or-restart $unit"
  }
}

is enough. .. Or is intention to just not add every single option that could possibly go to service - also makes sense.

Copy link
Member

Choose a reason for hiding this comment

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

Oh that's an excellent point. I think overriding this is obscure enough that it's valid to not have a dedicated parameter. 👍

traylenator added a commit to traylenator/puppet-systemd that referenced this pull request Jul 1, 2022
Since these are deprecated in the future do not
add them here.

voxpupuli#264
traylenator added a commit to traylenator/puppet-systemd that referenced this pull request Jul 1, 2022
Since these are deprecated in the future do not
add them here.

voxpupuli#264
Copy link
Member

@jhoblitt jhoblitt left a comment

Choose a reason for hiding this comment

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

This seems reasonable to me. I will remove the REFERENCE.md changes from the branch to resolve the merge conflict.

@jhoblitt
Copy link
Member

Doh, I just noticed this PR is from a fork.

@jhoblitt jhoblitt merged commit 9c33b95 into voxpupuli:master Jan 26, 2023
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.

5 participants