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

Correct Red Hat service providers #9212

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

mhashizume
Copy link
Contributor

SystemD has been the default init system for Red Hat Enterprise Linux and its derivatives since RHEL 7 was released in 2014. In 928cf67, we attempted to reflect this in Puppet's service providers.

However, this change did not have the desired effect as the RedHat service provider was still specified as the default for systems with the os.family fact of "redhat." Tests relating to services started failing after 928cf67.

I do not believe that this change will have any undesired effects on Red Hat derivatives like Alma or Rocky because those distributions also use SystemD as their init system and use the same versioning scheme as upstream.

@mhashizume mhashizume added the bug Something isn't working label Jan 19, 2024
@mhashizume mhashizume force-pushed the maint/main/systemd-fixup branch 3 times, most recently from 6b91436 to 93f6b56 Compare January 19, 2024 01:01
@mhashizume
Copy link
Contributor Author

jenkins please test this on almalinux8-64a,amazon7-64a,amazon2023-64a,amazon2023-AARCH64a,redhat7-64a,redhat8-64a,redhat8-POWERa,redhat9-64a,redhat9-AARCH64a,redhatfips7-64a,redhatfips8-64a,rocky8-64a

@mhashizume mhashizume marked this pull request as ready for review January 19, 2024 16:46
@mhashizume mhashizume requested a review from a team as a code owner January 19, 2024 16:46
@@ -10,7 +10,7 @@

commands :chkconfig => "/sbin/chkconfig", :service => "/sbin/service"

defaultfor 'os.family' => :redhat
defaultfor 'os.name' => :amazon, 'os.release.major' => ["2017"]
Copy link
Contributor

@joshcooper joshcooper Jan 19, 2024

Choose a reason for hiding this comment

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

I found that Amazon Linux 1 may report the major version as 2018, so maybe add 2018 to the array and the notdefaultfor in the systemd provider.

I think this overall change may be breaking on RedHat (or derivative) for some esoteric combinations of:

  1. systems (excluding SUSE 10/11, AL1 and RHEL4-6) which don't use systemd. Though that list is basically empty.
  2. systems where systemd is not available due to the confine :true line above, see 93ca5f0. Going back in history it looks like it was previously updated to support puppet running in a chroot environment a7b9d0e, and before that, the line was added for Debian in c36f1e9

So maybe the entire backwards compat issue doesn't matter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review Josh. I updated the Amazon Linux statements (their versioning scheme can be confusing . . . ).

Given what you've found, I agree that platforms potentially affected by this change seem very limited, probably esoteric, and definitely not officially supported anyway.

SystemD has been the default init system for Red Hat Enterprise Linux
and its derivatives since RHEL 7 was released in 2014. In 928cf67, we
attempted to reflect this in Puppet's service providers.

However, this change did not have the desired effect as the RedHat
service provider was still specified as the default for systems with the
os.family fact of "redhat." Tests relating to services started failing
after 928cf67.

I do not believe that this change will have any undesired effects on Red
Hat derivatives like Alma or Rocky because those distributions also
use SystemD as their init system and use the same versioning scheme as
upstream.
@mhashizume mhashizume force-pushed the maint/main/systemd-fixup branch from 93f6b56 to 04b01e2 Compare January 19, 2024 22:28
@mhashizume mhashizume merged commit 09904df into puppetlabs:main Jan 19, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants