puppetlabs / puppetlabs/puppetlabs-apache
mpm_event module management is not consistent
Nobody has claimed this yet.
- Dominant language
- Puppet
- Stars
- 356
- Forks
- 1.1k
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
Describe the Bug
If mpm_event is enabled with apache::mod::event, using apache::mpm::disable_mpm_event will not disable it. Internally, at least on Debian 12, it looks like the event and mpm_event modules are identical, aside from the mpm_event module specifically warning about conflicts with other MPM modules. As a result, I believe it is a bug that the module's method to enable the module is not compatible with the way to disable the module.
Note: I will add a pull request with a patch to fix this behavior; I wanted an issue to link it against.
Expected Behavior
The expected behavior is that the Puppet module can both enable or disable mpm_event, based on variables such as host facts.
Steps to Reproduce
Steps to reproduce the behavior:
- Apply a manifest to a system that includes
mpm_event:
include apache::mod::event
- Later, apply a different manifest to the same system that disables the same module:
include apache::mpm::disable_mpm_event
- Module will still be enabled, as the class to enable uses the name without the
mpm_prefix, while the class to disable the module does use thempm_prefix.
Environment
- Version 12.1
- Platform Debian 12
Additional Context
The inconsistency is caused by the module being enabled with ${mpm} as `event``:
https://github.com/puppetlabs/puppetlabs-apache/blob/58dada69b92cc5b5b9155068db4f82fbb2ae9cac/manifests/mpm.pp#L49
https://github.com/puppetlabs/puppetlabs-apache/blob/58dada69b92cc5b5b9155068db4f82fbb2ae9cac/manifests/mpm.pp#L57
While the module is disabled with:
https://github.com/puppetlabs/puppetlabs-apache/blob/58dada69b92cc5b5b9155068db4f82fbb2ae9cac/manifests/mpm/disable_mpm_event.pp#L3
This is inconsistent with prefork and worker, which are enabled and disabled without the mpm_ prefix.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with manifests/mpm.pp at the referenced lines and manifests/mpm/disable_mpm_event.pp. Compare the module names used by the enable and disable classes, then reproduce the transition with the two manifests from the issue on Debian 12. Done means mpm_event can be enabled and later disabled consistently, without changing the existing prefork and worker behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100