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

(MODULES-9948) Allow switching of thread modules #1961

Merged
merged 1 commit into from
Nov 7, 2019
Merged

(MODULES-9948) Allow switching of thread modules #1961

merged 1 commit into from
Nov 7, 2019

Conversation

tuxmea
Copy link
Contributor

@tuxmea tuxmea commented Oct 19, 2019

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.

@tuxmea tuxmea requested a review from a team as a code owner October 19, 2019 10:15
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 tuxmea changed the title Allow switching of thread modules (MODULES-9948) Allow switching of thread modules Oct 20, 2019
@david22swan
Copy link
Member

@tuxmea Could you add some additional documentation to cover this change please?

@tuxmea
Copy link
Contributor Author

tuxmea commented Oct 29, 2019

@david22swan I have updated the PR description. Or do you refer to Readme.md file?
This change does not have an impact on how to use the module. It only adds an internal solution for Debian based systems.

@david22swan
Copy link
Member

@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.

@tuxmea
Copy link
Contributor Author

tuxmea commented Nov 7, 2019

@david22swan any idea, when pipeline is working again?

@david22swan david22swan merged commit afa840a into puppetlabs:master Nov 7, 2019
@david22swan
Copy link
Member

@tuxmea Thanks for the pr, the pipeline wasn't totally green but enough so your changes looked like they wouldn't effect it negatively.
Look forward to seeing more from you in the future. :)

@tuxmea tuxmea deleted the debian_disable_thread_on_change branch November 7, 2019 13:32
cegeka-jenkins pushed a commit to cegeka/puppet-apache that referenced this pull request Jul 15, 2020
…on_change

(MODULES-9948) Allow switching of thread modules
cegeka-jenkins pushed a commit to cegeka/puppet-apache that referenced this pull request Jul 15, 2020
Extends puppetlabs#1961 to also work correctly on Debian 10 and Ubuntu 20
daveseff pushed a commit to daveseff/puppetlabs-apache that referenced this pull request Jul 19, 2022
Extends puppetlabs#1961 to also work correctly on Debian 10 and Ubuntu 20
bastelfreak added a commit to bastelfreak/puppetlabs-apache that referenced this pull request Dec 6, 2022
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.
bastelfreak added a commit to bastelfreak/puppetlabs-apache that referenced this pull request Dec 6, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants