Chef Cookbooks

In apache2 apache2.conf uses the wrong httpd.pid file location for CentOS 6.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Unknown Unknown
  • Resolution: Fixed
  • Component/s: apache2
  • Labels:
  • Environment:

    Using Vagrant and Chef Solo to manage and provision a CentOS 6 VM.

  • Triage Status:
    Triaged

Description

/etc/rc.d/init.d/httpd expects the PID file to be in /var/run/httpd/httpd.pid, but the apache2.conf.erb template puts it in /var/run/httpd.pid.

I've forked this to https://github.com/scholarslab/opscode-cookbooks and fixed it there. Pull request will be coming.

Activity

Hide
Sean OMeara added a comment - 27/Jul/11 1:57 PM

Hi Eric!

I've got a fix for this coming in "0.99.5" (I'm porting a bunch of stuff to EL6 right now).

I'll close this when it gets merged in. Thanks!

-s

Show
Sean OMeara added a comment - 27/Jul/11 1:57 PM Hi Eric! I've got a fix for this coming in "0.99.5" (I'm porting a bunch of stuff to EL6 right now). I'll close this when it gets merged in. Thanks! -s
Hide
Eric Rochester added a comment - 27/Jul/11 1:58 PM

Hi Sean,

Excellent! Thanks.

Show
Eric Rochester added a comment - 27/Jul/11 1:58 PM Hi Sean, Excellent! Thanks.
Hide
Seth Chisamore added a comment - 27/Jul/11 2:07 PM

We should move this into the attributes file with the other platform specific stuff:
https://github.com/opscode/cookbooks/blob/master/apache2/attributes/default.rb#L21-50

I think 'run_dir' is the name we have been trying to standardize on across cookbooks for this directory:

set['apache2']['run_dir']  = "/var/run/httpd"
set['apache2']['pid_file'] = "#{apache2['run_dir']}/httpd.pid"

then in the actual template you would just see:

PidFile <%= node['apache2']['pid_file'] %>
Show
Seth Chisamore added a comment - 27/Jul/11 2:07 PM We should move this into the attributes file with the other platform specific stuff: https://github.com/opscode/cookbooks/blob/master/apache2/attributes/default.rb#L21-50 I think 'run_dir' is the name we have been trying to standardize on across cookbooks for this directory:
set['apache2']['run_dir']  = "/var/run/httpd"
set['apache2']['pid_file'] = "#{apache2['run_dir']}/httpd.pid"
then in the actual template you would just see:
PidFile <%= node['apache2']['pid_file'] %>
Hide
Sean OMeara added a comment - 27/Jul/11 3:34 PM

Eric, submit that pull request so you can end up in the commit logs

Show
Sean OMeara added a comment - 27/Jul/11 3:34 PM Eric, submit that pull request so you can end up in the commit logs
Hide
Sean OMeara added a comment - 27/Jul/11 3:35 PM
Show
Sean OMeara added a comment - 27/Jul/11 3:35 PM Oh, and sign the CLA! http://wiki.opscode.com/display/chef/How+to+Contribute
Hide
Eric Rochester added a comment - 27/Jul/11 3:37 PM

Will do. I'll let you know when the refactored (and much nicer – thanks) fix is up, pull requested, and CLA signed.

Show
Eric Rochester added a comment - 27/Jul/11 3:37 PM Will do. I'll let you know when the refactored (and much nicer – thanks) fix is up, pull requested, and CLA signed.
Hide
Eric Rochester added a comment - 28/Jul/11 1:22 AM

Hi Sean!

I have the paperwork taken care of.

Here is the pull request: https://github.com/opscode/cookbooks/pull/178

Like the comment on it says, I've tested this against VMs for Ubuntu Lucid, CentOS 5 and CentOS 6.

Let me know if there's anything else I need to do.

Thanks again.

(I assume that something needs to get set in the ticketing system for me to mark this resolved. If I can't take care of that tonight, I'll check back in the morning.)

Show
Eric Rochester added a comment - 28/Jul/11 1:22 AM Hi Sean! I have the paperwork taken care of. Here is the pull request: https://github.com/opscode/cookbooks/pull/178 Like the comment on it says, I've tested this against VMs for Ubuntu Lucid, CentOS 5 and CentOS 6. Let me know if there's anything else I need to do. Thanks again. (I assume that something needs to get set in the ticketing system for me to mark this resolved. If I can't take care of that tonight, I'll check back in the morning.)
Show
Eric Rochester added a comment - 28/Jul/11 12:52 PM The fix is on https://github.com/erochest/opscode-cookbooks The pull request is https://github.com/opscode/cookbooks/pull/178
Hide
Joshua Timberman added a comment - 14/Sep/11 12:24 AM

Hi all!

Thanks Sean and Eric for your work here. This is merged into opscode/master and released in apache2 cookbook v1.0.0

Show
Joshua Timberman added a comment - 14/Sep/11 12:24 AM Hi all! Thanks Sean and Eric for your work here. This is merged into opscode/master and released in apache2 cookbook v1.0.0

People

Vote (0)
Watch (0)

Dates

  • Created:
    27/Jul/11 1:14 PM
    Updated:
    14/Sep/11 12:24 AM
    Resolved:
    28/Jul/11 12:52 PM