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

Disable mod_php on EL9 #2277

Merged
merged 1 commit into from
Aug 8, 2022
Merged

Conversation

ekohl
Copy link
Collaborator

@ekohl ekohl commented Aug 4, 2022

EL 9 doesn't ship mod_php, so this is uninstallable. By making it a required parameter (which effectively was already the case) and setting the version to undef the catalog fails to compile by default. This still allows users to set it if they build a mod_php somehow.

EL 9 users should use php-fpm instead.

A draft right now to see which tests fail.

Fixes: edbdb65

@ekohl ekohl linked an issue Aug 4, 2022 that may be closed by this pull request
@puppet-community-rangefinder
Copy link

apache::mod::php is a class

Breaking changes to this file WILL impact these 49 modules (exact match):
Breaking changes to this file MAY impact these 36 modules (near match):

apache::params is a class

Breaking changes to this file WILL impact these 7 modules (exact match):
Breaking changes to this file MAY impact these 4 modules (near match):

This module is declared in 174 of 579 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@ekohl ekohl force-pushed the disable-mod-php-on-el9 branch 2 times, most recently from d358efa to 0cc48f5 Compare August 5, 2022 11:00
@ekohl ekohl marked this pull request as ready for review August 5, 2022 11:01
@ekohl ekohl requested a review from a team as a code owner August 5, 2022 11:01
spec/acceptance/mod_php_spec.rb Outdated Show resolved Hide resolved
@@ -34,7 +35,7 @@
String $template = 'apache/mod/php.conf.erb',
Optional[String] $source = undef,
Optional[String] $root_group = $apache::params::root_group,
Optional[String] $php_version = $apache::params::php_version,
String[1] $php_version = $apache::params::php_version,
Copy link
Member

Choose a reason for hiding this comment

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

Rather than this would it not be better to put a check in to detect when its running on RHEL 9 and fail with a message stating that php-fpm should be used instead?

i.e.:

  if $facts['os']['name'] == 'Redhat' and $facts['os']['release']['major'] == '9' {
    fail("RHEL 9 does not support 'mod_php' and so 'php-fpm' must be used instead.")
  }

Copy link
Member

Choose a reason for hiding this comment

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

Make the reasoning and cause explicit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How about this solution: keeping it Optional, but treat undef as unsupported?

Copy link
Member

Choose a reason for hiding this comment

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

Sound's good to me

@ekohl ekohl force-pushed the disable-mod-php-on-el9 branch from 0cc48f5 to 330bcd5 Compare August 5, 2022 12:20
Copy link
Member

@david22swan david22swan left a comment

Choose a reason for hiding this comment

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

LGTM

Soon as the tests pass will merge in and restart release

Copy link
Member

@david22swan david22swan left a comment

Choose a reason for hiding this comment

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

Ah, look's like you need to update ./spec/classes/mod/php_spec.rb:98 to expect a failure when run on Redhat 9.
Which is weird since it shouldn't ben running against it anymore?

@ekohl ekohl force-pushed the disable-mod-php-on-el9 branch from 330bcd5 to 1177959 Compare August 8, 2022 09:09
@ekohl
Copy link
Collaborator Author

ekohl commented Aug 8, 2022

Which is weird since it shouldn't ben running against it anymore?

Unit tests run on all supported OSes (according to metadata.json)

bastelfreak
bastelfreak previously approved these changes Aug 8, 2022
@david22swan
Copy link
Member

Ah right, the unsupported comment works on the acceptance test

EL 9 doesn't ship mod_php, so this is uninstallable. By making it a
required parameter (which effectively was already the case) and setting
the version to undef the catalog fails to compile by default. This still
allows users to set it if they build a mod_php somehow.

EL 9 users should use php-fpm instead.

Fixes: edbdb65
@ekohl ekohl force-pushed the disable-mod-php-on-el9 branch from 3fcaec7 to 51bc232 Compare August 8, 2022 13:57
Copy link
Member

@david22swan david22swan left a comment

Choose a reason for hiding this comment

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

LGTM

@david22swan david22swan merged commit 2575f39 into puppetlabs:main Aug 8, 2022
@david22swan
Copy link
Member

:)
Thanks again for the work.
Time for the Release to go out!

@ekohl ekohl deleted the disable-mod-php-on-el9 branch August 8, 2022 17:11
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.

Issue with mod php on Redhat 9
4 participants