-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
(MODULES-9948) Allow switching of thread modules #1961
(MODULES-9948) Allow switching of thread modules #1961
Conversation
Usual thread modules are: prefork, event and worker. When switching from one thread module to another we must ensure that the old, no longer to use, thread module gets disabled. Puppet Apache module will always use the new mpm base thread modules and place them in files without mpm_ prefix. The a2dismod utility only checks for file names, not the real thread module.
@tuxmea Could you add some additional documentation to cover this change please? |
@david22swan I have updated the PR description. Or do you refer to Readme.md file? |
@tuxmea The updated readme is great thanks, just wanted a bit more info before I made my decision. Anyway the PR looks good to me but will have to wait a bit on a merge as the pipeline is currently failing. |
@david22swan any idea, when pipeline is working again? |
@tuxmea Thanks for the pr, the pipeline wasn't totally green but enough so your changes looked like they wouldn't effect it negatively. |
…on_change (MODULES-9948) Allow switching of thread modules
Extends puppetlabs#1961 to also work correctly on Debian 10 and Ubuntu 20
Extends puppetlabs#1961 to also work correctly on Debian 10 and Ubuntu 20
there were a few things broken: * a2dismod was called with the wrong module name. at least on apache 2.4.54 on Debian 11 it is named mpm_event, not event * the paths to the files were wrong * a2dismod already purges the .load and .conf file, the exec resources are not required (even then a file resource would probably be cleaner to purge them) * Apache needs to be reloaded, so just running this priot to apache2::service isn't enough, it needs to be a notify This initially worked but was changed from mpm_event to event in puppetlabs#1961. Then it was fixed in puppetlabs#2034 by adding the exec resources, but the actual a2dismod was still broken.
there were a few things broken: * a2dismod was called with the wrong module name. at least on apache 2.4.54 on Debian 11 it is named mpm_event, not event * the paths to the files were wrong * a2dismod already purges the .load and .conf file, the exec resources are not required (even then a file resource would probably be cleaner to purge them) * Apache needs to be reloaded, so just running this priot to apache2::service isn't enough, it needs to be a notify This initially worked but was changed from mpm_event to event in puppetlabs#1961. Then it was fixed in puppetlabs#2034 by adding the exec resources, but the actual a2dismod was still broken.
On Debian based systems (I have not tested behavior on other OS) you can have multiple thread modules installed in parallel. An admin must ensure that only one thread module is active by disabling any old thread module when adding a new one.
Changing thread module was not possible in Puppet Apache Module.
Once a thread module was active it never got disabled when switching to another one, causing the apache process to not be able to start.
This PR adds the capability to switch thread modules on existing, Puppet managed apache installations on Debian based systems.
Usual thread modules are: prefork, event or worker.
When switching from one thread module to another we must ensure that the
old, no longer to use, thread module gets disabled.
Puppet Apache module will always use the new mpm base thread modules and place
them in files without mpm_ prefix.
The a2dismod utility only checks for file names, not the real thread
module.