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

Enable overriding mod-level parameters for apache::mod::passenger #687

Merged
merged 3 commits into from
Mar 30, 2014
Merged

Enable overriding mod-level parameters for apache::mod::passenger #687

merged 3 commits into from
Mar 30, 2014

Conversation

jonoterc
Copy link
Contributor

Apache::mod::passenger didn't accept/pass (optional) mod parameters
through to apache::mod, so only auto-generated module parameters were
used. Without this option, apache::mod::passenger could not be used in
conjunction with passenger modules beyond those generated by the OS
package system (in particular, modules compiled via
passenger-install-apache2-module, which uses differing paths). This
commit enables passing in all parameters used with "apache::mod",
documented in the passenger README file.

Modified default RedHat passenger parameters for cleaned-up
installation (prior parameters worked with Apache, but broke
passenger-* utilities, incl. passenger-status & passenger-root).

Updated spec/class tests to verify mod-level parameters; also,
updated RedHat tests to accomodate updated default parameters.

Added spec/acceptance tests for passenger, verifying default
installations for RedHat and Debian systems. RedHat installation test
installs (required) EPEL and http://passenger.stealthymonkeys.com
package repositories.

apache::mod::passenger didn't accept/pass (optional) mod parameters
through to apache::mod, so only auto-generated module parameters were
used.  Without this option apache::mod::passenger could not be used in
conjunction with passenger modules beyond those generated by OS package
system (in particular, modules compiled via
passenger-install-apache2-module, which use differing paths).  This
commit enables passing in all parameters used with "apache::mod",
documented in the passenger README

includes basic spec/acceptance tests; verifying a default installation
as well as passing in module loading parameters.

new tests revealed undocumented Redhat dependencies on a passenger-
specific repository as well as the EPEL repository; as a first step
these dependencies are being manually resolved during setup for the
acceptance testing suite.
Apache::mod::passenger didn't accept/pass (optional) mod parameters
through to apache::mod, so only auto-generated module parameters were
used. Without this option, apache::mod::passenger could not be used in
conjunction with passenger modules beyond those generated by the OS
package system (in particular, modules compiled via
passenger-install-apache2-module, which uses differing paths). This
commit enables passing in all parameters used with "apache::mod",
documented in the passenger README file.

Modified default RedHat passenger parameters for cleaned-up
installation (prior parameters worked with Apache, but broke
passenger-* utilities, incl. passenger-status & passenger-root).

Updated spec/class tests to verify mod-level parameters; also,
updated RedHat tests to accomodate updated default parameters.

Added spec/acceptance tests for passenger, verifying default
installations for RedHat and Debian systems. RedHat installation test
installs (required) EPEL and http://passenger.stealthymonkeys.com
package repositories.
…abs-apache into mod-passenger-2

Conflicts:
	manifests/mod/passenger.pp
	manifests/params.pp
@jonoterc
Copy link
Contributor Author

This is a cleaned-up version of my PR #607, removing proxy-pass commits inadvertently incorporated.

The history is obviously not pristine (I'm still new to git); if this needs to be re-done again, links to appropriate tutorials will be much appreciated.

@jonoterc
Copy link
Contributor Author

BTW, I wasn't sure which nodesets were higher priority to verify working with spec/acceptance tests, so I tested (almost) all the included nodesets.

passing*:

  • centos-64-x64 (default)
  • centos-65-x64
  • ubuntu-server-12042-x64
  • ubuntu-server-10044-x64
  • ubuntu-server-1310-x64
  • debian-73-x64
  • debian-73-i386
  • debian-70rc1-x64
  • debian-607-x64

failing:

  • centos-59-x64 - consistently freezes during pre-test configuration (looking for fastestmirrors during yum install ntpdate)
  • centos-64-x64-pe - throws exception during pre-test configuration;
  • beaker-1.9.1/lib/beaker/options/pe_version_scraper.rb:28:in `rescue in load_pe_version': Failure to examine /opt/enterprise/dists/LATEST (ArgumentError)
  • No such file or directory - /opt/enterprise/dists/LATEST
  • fedora-18-x64 - halts during boot; no available passenger repos anyway, explicitly skipped during Redhat tests
  • sles-11sp1-x64 - as SUSE is listed in the UNSUPPORTED_PLATFORMS constant, I assume this fails

* Note: while all passenger tests are passing, there are a few spec/acceptance tests failed for each node. This seems fine as these same tests are failing in up-to-date master as well.

igalic added a commit that referenced this pull request Mar 30, 2014
Enable overriding mod-level parameters for apache::mod::passenger
@igalic igalic merged commit 205615f into puppetlabs:master Mar 30, 2014
@jonoterc
Copy link
Contributor Author

Thanks!

@ekohl
Copy link
Collaborator

ekohl commented Apr 4, 2014

FYI this breaks the Foreman use case where we rely on not overwriting passenger.conf. We ship a newer passenger and would prefer to not hardcode the version number in puppet.

@domcleal
Copy link
Contributor

domcleal commented Apr 4, 2014

Yeah, the changes I made in #563 were specifically so we didn't rely on a hardcoded PassengerRoot when the mod_passenger package provides an accurate path in its passenger.conf.

@jonoterc
Copy link
Contributor Author

jonoterc commented Apr 4, 2014

Sorry, I wasn't aware of the foreman use case when adding the spec/acceptance test for passenger; passenger-status (used in that spec) is broken when both passenger.conf and passenger_extra.conf files are present.

That said, it sounds like passenger-status broken by default is less important than the foreman use case. RedHat is already on its own branch in that spec test, so it shouldn't be hard to revert the apache:params and package details without losing spec coverage. If you provide a brief foreman example that I can reference I could work on this.

@domcleal
Copy link
Contributor

domcleal commented Apr 4, 2014

That's ok, thanks for the response.

You'll find Foreman's Passenger RPMs in this repo: http://yum.theforeman.org/releases/1.4/el6/x86_64/ (version 4.0.5). The issue comes in Passenger 4, as Passenger no longer loads if the PassengerRoot isn't accurate (you'll notice that remarkably this isn't an issue when using EPEL6's 3.0.21, even though pl-apache writes 3.0.19 into the config file). In error_log you'll see this:

[Fri Apr 04 15:41:48 2014] [error] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog because its executable (/usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/agents/PassengerWatchdog) does not exist. This probably means that your Phusion Passenger installation is broken or incomplete, or that your 'PassengerRoot' directive is set to the wrong value. Please reinstall Phusion Passenger or fix your 'PassengerRoot' directive, whichever is applicable.

I've not been able to reproduce an issue with passenger-status on plain EL6 with EPEL6's passenger 3.0.21 and the separate passenger.conf, passenger_extra.conf and passenger.load files - is it a gem or source install instead of packages? I could see then that passenger.conf doesn't get installed.

-bash-4.1# ll /etc/httpd/conf.d/passenger*
-rw-r--r--. 1 root root 771 Nov  7 15:46 /etc/httpd/conf.d/passenger.conf
-rw-r--r--. 1 root root 151 Apr  4 15:35 /etc/httpd/conf.d/passenger_extra.conf
-rw-r--r--. 1 root root  53 Apr  4 15:34 /etc/httpd/conf.d/passenger.load
-bash-4.1# passenger-status
----------- General information -----------
max      = 6
count    = 0
active   = 0
inactive = 0
Waiting on global queue: 0
----------- Application groups -----------

@jonoterc
Copy link
Contributor Author

jonoterc commented Apr 4, 2014

Thanks for clarifying the foreman issues, I'll look into patching this ASAP.

Regarding the passenger-status error, it was occurring during spec/acceptance runs on the Centos nodeset (can't recall whether 64 or 64, may have been both) with the stealthmonkeys RPM, and seemed related to having multiple LoadModule declarations for passenger.

Regarding the spec acceptance test, would it make more sense to reference foreman's passenger RPM over the steathmonkeys RPM? I'm not particularly invested in either and figure the tests should reflect the most common solution (or the most stable!).

@jonoterc jonoterc deleted the mod-passenger-2 branch April 4, 2014 16:12
@jonoterc
Copy link
Contributor Author

jonoterc commented Apr 4, 2014

I'm hitting a delay with automated testing due to yumrepo being broken in puppet 3.5.0; it looks like a fix is forthcoming, and I'll get back to this ASAP.

@jonoterc
Copy link
Contributor Author

jonoterc commented Apr 7, 2014

Worked around the yumrepo issue and submitted a PR to correct the errors from this PR; please let me know if this corrects the issue for you (ideally I'd add a spec/acceptance test verifying installation of passenger via the foreman repo, but I figured a faster response would be more important).

traylenator pushed a commit to traylenator/puppetlabs-apache that referenced this pull request Jun 7, 2022
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.

5 participants