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

Ensure switching of thread module works on Debian 10 / Ubuntu 20.04 #2034

Merged
merged 1 commit into from
Jun 9, 2020
Merged

Ensure switching of thread module works on Debian 10 / Ubuntu 20.04 #2034

merged 1 commit into from
Jun 9, 2020

Conversation

tuxmea
Copy link
Contributor

@tuxmea tuxmea commented May 25, 2020

Extends #1961 to also work correctly on Debian 10 and Ubuntu 20

@tuxmea tuxmea requested a review from a team as a code owner May 25, 2020 13:21
@puppet-community-rangefinder
Copy link

apache::mpm is a type

that may have no external impact to Forge modules.

This module is declared in 174 of 575 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.

tuxmea referenced this pull request May 25, 2020
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.
@codecov-commenter
Copy link

codecov-commenter commented May 25, 2020

Codecov Report

Merging #2034 into master will increase coverage by 0.61%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2034      +/-   ##
==========================================
+ Coverage   57.87%   58.49%   +0.61%     
==========================================
  Files          13       12       -1     
  Lines         235      212      -23     
==========================================
- Hits          136      124      -12     
+ Misses         99       88      -11     
Impacted Files Coverage Δ
lib/puppet/functions/apache/apache_pw_hash.rb 0.00% <0.00%> (ø)
lib/puppet/functions/apache/bool2httpd.rb 0.00% <ø> (ø)
lib/puppet/functions/apache/pw_hash.rb 0.00% <0.00%> (ø)
lib/puppet/functions/apache_pw_hash.rb 0.00% <0.00%> (ø)
lib/puppet/functions/bool2httpd.rb 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 983b1fd...342b15a. Read the comment docs.

@tuxmea tuxmea changed the title Allow switching of thread module WIP: Allow switching of thread module May 25, 2020
@tuxmea tuxmea marked this pull request as draft May 25, 2020 18:36
@tuxmea
Copy link
Contributor Author

tuxmea commented May 25, 2020

Disabling class uses another filename: event.load instead of the file name on the system which is prefixed: mpm_event.load.
Needs checking for both possible file names and disabling them.
We can use a2dismod once only. Maybe we should disable using file and absent.

Extends #1961 to also work correctly on Debian 10 and Ubuntu 20
@tuxmea tuxmea marked this pull request as ready for review May 29, 2020 11:44
@tuxmea tuxmea changed the title WIP: Allow switching of thread module Allow switching of thread module May 29, 2020
@adrianiurca
Copy link
Contributor

Hi @tuxmea,
Thank you for your contribution.

@adrianiurca adrianiurca merged commit eba8bcc into puppetlabs:master Jun 9, 2020
@michaeltlombardi michaeltlombardi changed the title Allow switching of thread module Ensure switching of thread module works on Debian 10 / Ubuntu 20.04 Jul 1, 2020
cegeka-jenkins pushed a commit to cegeka/puppet-apache that referenced this pull request Jul 15, 2020
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.

4 participants