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

Unify Debian MPM management with "mpm_" prefix #2556

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

chacunda
Copy link

@chacunda chacunda commented Jul 18, 2024

Summary

This change unifies the management of MPM modules using the "mpm_" prefix on the Debian platform. Previously, there were inconsistencies in whether MPM modules were enabled or disabled with the title $mpm or mpm_${mpm}. The changes to mpm.pp and the related individual mod manifests make it so that on the Debian platform, MPM modules are always referred to with the "mpm_" prefix. This is consistent with how the modules are installed and addressed by the Apache package maintainers for the Debian platform.

With this change implemented, an administrator is able to enable or disable MPM modules without introducing conflicts to the Apache service. Prior to this change, if the "prefork" or "worker" modules were enabled under the package maintainer provided name "mpm_worker" or "mpm_prefork", the disable_mpm_*.pp would fail to disable the modules. Similarly, if the "mpm_event" module was enabled by this Puppet module, the associated disable_mpm_event.pp would fail to disable it, as it was looking for the module under the name "mpm_event," but the module was enabled as "event".

The changes to accomplish this are:

  • Adding a switch to event.pp, itk.pp, prefork.pp and worker.pp that changes the conf file name to mpm_*.conf on Debian hosts.
  • Changes mpm.pp to create load files that match the name and content as provided by the Debian Apache package maintainers.
  • Modifies mpm.pp to refer to load and conf files on Debian by a relative symlink and with the "mpm_" prefix, to match behavior of the modules installed via APT and changes made by a2enmod.
  • Adds mod names with and without "mpm_" prefixes to disable_mpm_*.pp to make sure that the module is disabled, regardless of name. Additionally, adds the mpm_itk to disable_mpm_prefork.pp as mpm_itk must be disabled for disabling mpm_prefork to succeed.
  • All relevant spec tests are updated to pass with the modifications made, specifically, matching the new filenames and new content for the load files.

Additional Context

The initial problem leading to this fix is that if you use the module to enable mpm_event and then later try to enable a different MPM module, applying the catalog will fail. This change fixes that issue, and makes sure behavior and naming is consistent and matches what the Debian Apache package maintainers provide for module load definitions.

Related Issues (if any)

This resolves #2555.

Checklist

  • 🟢 Spec tests. All spec tests pass.
  • 🟢 Acceptance tests. Debian 11 and 12 pass, errors about package availability encountered on SLES 15 from the litmusimage repo.
  • Manually verified. (For example puppet apply) Tested and verified on Debian 12 hosts in my Puppet environment.

@CLAassistant
Copy link

CLAassistant commented Jul 18, 2024

CLA assistant check
All committers have signed the CLA.

@chacunda chacunda marked this pull request as ready for review July 19, 2024 19:54
@chacunda chacunda requested review from bastelfreak, ekohl, smortex and a team as code owners July 19, 2024 19:54
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.

mpm_event module management is not consistent
2 participants