RE: Re: cookbook conflict: httpd/php/mysql


#1

Thank you! Done. I opened the issue on the httpd cookbook because the php one seems to be only peripherally involved with the problem.

Kevin Keane

The NetTech

http://www.4nettech.com

Our values: Privacy, Liberty, Justice

See https://www.4nettech.com/corp/the-nettech-values.html

-----Original message-----
From: Sean OMeara someara@chef.io
Sent: Thursday 18th December 2014 12:49
To: chef@lists.opscode.com
Subject: [chef] Re: cookbook conflict: httpd/php/mysql

HI Kevin!

Thanks for pointing this out. Can you open an issue on the PHP
cookbook’s Github page?
-s

On Thu, Dec 18, 2014 at 2:02 PM, Kevin Keane Subscription
subscription@kkeane.com wrote:

I came across a problem with a combination of three supermarket cookbooks,
and am wondering if this is a bug or I am doing something wrong. I am using
the httpd cookbook (0.1.5) and the php cookbook (1.5.0). The php cookbook
also includes mysql (6.0.3). I actually don’t need that mysql cookbook
directly. All this is on CentOS 6.5, although I suspect the problem will
affect all OS.

When I just install httpd without php, Apache starts up flawlessly. When I
add the php cookbook (and thus indirectly the mysql cookbook),
/etc/httpd/conf/http.conf uses an invalid PidFile location; it uses a
location that would be valid for mysql, but not for httpd. Since I’m not
installing mysql, that directory doesn’t exist.

My suspicion is that both the mysql and httpd cookbooks use the same name
"pid_file" at some point, and thus clash. Either that, or I’m making a
mistake that I’m just not seeing.

Here is the generated httpd.conf

ServerName nctc-accounting-berkshelf.vagrant
ServerRoot /etc/httpd
PidFile /var/run/mysql-default/mysqld.pid
User apache
Group apache
Timeout 400
ErrorLog /var/log/httpd/error_log
LogLevel warn
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
DefaultType None
HostnameLookups off

Listen 0.0.0.0:80
Listen 0.0.0.0:443

Include conf.d/.conf
Include conf.d/
.load

Kevin Keane

The NetTech

http://www.4nettech.com

Our values: Privacy, Liberty, Justice

See https://www.4nettech.com/corp/the-nettech-values.html


#2

I figured out what was going on here… it turns out the mysql
cookbook was polluting the Chef::Resource class with
MysqlCookbook::Helper methods.

Fixed up in mysql-6.0.6

https://github.com/opscode-cookbooks/mysql/commit/93d6467670a98fefc4471a2f082cd236c085eefa

PS: I’ve started work on httpd-1.0.0, which will fix up a lot of the
ugly-ness in the current release.

-s

-s

On Fri, Dec 19, 2014 at 12:47 AM, Kevin Keane Subscription
subscription@kkeane.com wrote:

Thank you! Done. I opened the issue on the httpd cookbook because the php
one seems to be only peripherally involved with the problem.

Kevin Keane

The NetTech

http://www.4nettech.com

Our values: Privacy, Liberty, Justice

See https://www.4nettech.com/corp/the-nettech-values.html

-----Original message-----
From: Sean OMeara someara@chef.io
Sent: Thursday 18th December 2014 12:49
To: chef@lists.opscode.com
Subject: [chef] Re: cookbook conflict: httpd/php/mysql

HI Kevin!

Thanks for pointing this out. Can you open an issue on the PHP
cookbook’s Github page?
-s

On Thu, Dec 18, 2014 at 2:02 PM, Kevin Keane Subscription
subscription@kkeane.com wrote:

I came across a problem with a combination of three supermarket cookbooks,
and am wondering if this is a bug or I am doing something wrong. I am
using
the httpd cookbook (0.1.5) and the php cookbook (1.5.0). The php cookbook
also includes mysql (6.0.3). I actually don’t need that mysql cookbook
directly. All this is on CentOS 6.5, although I suspect the problem will
affect all OS.

When I just install httpd without php, Apache starts up flawlessly. When I
add the php cookbook (and thus indirectly the mysql cookbook),
/etc/httpd/conf/http.conf uses an invalid PidFile location; it uses a
location that would be valid for mysql, but not for httpd. Since I’m not
installing mysql, that directory doesn’t exist.

My suspicion is that both the mysql and httpd cookbooks use the same name
"pid_file" at some point, and thus clash. Either that, or I’m making a
mistake that I’m just not seeing.

Here is the generated httpd.conf

ServerName nctc-accounting-berkshelf.vagrant
ServerRoot /etc/httpd
PidFile /var/run/mysql-default/mysqld.pid
User apache
Group apache
Timeout 400
ErrorLog /var/log/httpd/error_log
LogLevel warn
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
DefaultType None
HostnameLookups off

Listen 0.0.0.0:80
Listen 0.0.0.0:443

Include conf.d/.conf
Include conf.d/
.load

Kevin Keane

The NetTech

http://www.4nettech.com

Our values: Privacy, Liberty, Justice

See https://www.4nettech.com/corp/the-nettech-values.html