sous-chefs/php

Pear channel setup should be optional

Closed this issue · 6 comments

Cookbook version

6.0.0

Chef-client version

14.0.202

Platform Details

Oracle Linux 7.5

Scenario:

I want to optionally disable the php_pear_channel resource calls in the default recipe. These go out to the internet, which is not a behavior we always want. Currently, the recipe does not fail but spends a long time on each chef-client run waiting to time out when e.g. pear.php.net is inaccessible.

Steps to Reproduce:

Run chef-client using the default recipe without an external network connection on the node and follow the log.

Expected Result:

Several minutes added to chef-client runtime, hanging on the log lines for pear channels.

Actual Result:

There is no error, just slowness.

My bootstrap seems to fail.
Cookbook version: 6.0.0 as well as 5.1.0
Platform: CentOS 7
Chef: 14.1.12

work around:
Instead of
include_recipe "php::default"
Run:
include_recipe "php::#{node['php']['install_method']}"
include_recipe 'php::ini'

Yes, that bypasses the pear channel setup. Or did you mean you had that issue even with the proposed change and node['php']['pear_setup'] set to false?

I haven't tried setting node['php']['pear_setup'] to false, the default recipe does not include an if. I didnt check what the code inside the following does, but that's what's missing from php::default with my proposition:
php_pear_channel 'pear.php.net' do
binary node['php']['pear']
action :update
end

php_pear_channel 'pecl.php.net' do
binary node['php']['pear']
action :update
end

Closing as "Ghost" user

lock commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.