Giter Site home page Giter Site logo

puppet-php's Introduction

Introduction

puppet-php is a module for managing PHP using puppet.

Why Use puppet-php

  • it's very fast to install, a few minutes tops.

  • it supports all PHP SAPIs out of the box.

  • it supports a lot of PHP extensions out of the box.

  • it's is very flexible and has tons of configuration options, and sane defaults.

  • it aims to stay out of your way, and if it happens to get in your way, you can change the undesired behavior very easily.

  • it removes the boilerplate code from your manifests, which mean less code to maintain, and less code to spend time unit testing.

  • it uses the MIT license.

Documentation

The documentation can be found at puppet-php.readthedocs.org/en/

Source code

The source can be found at github.com/jippi/puppet-php

License

The project is released under the permissive MIT license.

Bugs

If you happen to stumble upon a bug, please feel free to create a pull request with a fix (optionally with a test), and a description of the bug and how it was resolved.

You can also create an issue with a description to raise awareness of the bug.

Features

If you have a good idea for a feature, please join us on IRC and let's discuss it. Pull requests are always more than welcome.

Support / Questions

You can find me on IRC in the #puppet channel on irc.freenode.net for any support or questions. My alias is Jippi

puppet-php's People

Contributors

blaind avatar danygielow avatar dbeckham avatar dbellettini avatar fdammeke avatar fnerdwq avatar globin avatar igalic avatar jack12816 avatar jippi avatar joshbetz avatar leoc avatar leopoiroux avatar ltrebing avatar m3co-code avatar marten-cz avatar maxicus avatar michalsvec avatar nicolasbrechet avatar nyholm avatar peterbraden avatar schkovich avatar serialworm avatar shoekstra avatar sqmk avatar thatgraemeguy avatar tombar avatar trafex avatar ukwm-deploy avatar wojtek-alef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-php's Issues

[Extension] Wrong inifile path on xcache

==> default: Error: /Stage[main]/[...]: Could not evaluate: Save failed with return code false, see debug

The error occurs if you try to set settings for xcache extension.

Actual: $inifile = '/etc/php5/conf.d/20-xcache.ini'
Should be: $inifile = "${php::params::config_root_ini}/xcache.ini"

See: https://github.com/jippi/puppet-php/blob/master/manifests/extension/xcache/params.pp#L46

Workaround: Call the class with inifile set on your own.

class {'::php::extension::xcache':
    inifile  => "${::php::params::config_root_ini}/xcache.ini",
    settings => [
        'set xcache/xcache.size 0'
    ]
}

PHP Version can only be determined when php in actually installed

As the installation of some extensions may depend on the installed php version, like xdebug, the first puppet run might install wrong configurations. This is also true for custom configs or extensions that depend on $::php::params::config_root_ini.

As a workaround a second puppet run can be issued. In this case the manifest maintainer has to make sure that all php related resources (like apache vhost that should notify php-fpm etc.) are only be applied when $::php_versionis set.

To avoid this I would suggest to retrieve the php version via apt as a fallback like this:

    version = Facter::Util::Resolution.exec("/usr/bin/env php -r 'echo PHP_VERSION;' 2>/dev/null")
    if !version
      # try to guess version via apt
      version = Facter::Util::Resolution.exec("apt-cache show php5-common | grep Version | tail -1 | awk '{print $2}' | awk -F'-' '{print $1}'")
    end

    if version
      version.match(/(\d+\.\d+\.\d+)/).to_s
    else
      nil
    end

Thoughts?

Define php::apache::config cannot use params default parameter!

In the define php::apache::config a default parameter value is set from a variable in the php::apache::params class. This is not possible, since defines cannot inherit and an the used include in the define (see below) is executed too late to set default values.

This does not work:

define php::apache::config(
...
  $file = $php::apache::params::inifile,
...
) {
  include ::php::apache::params
...

In case php::apache::config is used without giving a file parameter and setting a config this leeds to an error of the underlying php::config class.

PHP version

$php_version = '5.4.11-1~dotdeb.0'

include hhvm
include php
include php::apt

class {
'php::cli':
ensure => $php_version;
'php::apache':
ensure => $php_version;
'php::dev':
ensure => $php_version;
'php::pear':
ensure => $php_version;
'php::extension::apc':
ensure => $php_version;
'php::extension::curl':
ensure => $php_version;
'php::extension::mcrypt':
ensure => $php_version;
'php::extension::imagick':
ensure => $php_version;
'php::extension::http':
ensure => $php_version;
'php::extension::mysql':
ensure => $php_version;
}

If I do as you suggest I get errors like

err: /Stage[main]/Php::Extension::Apc/Php::Extension[apc]/Package[php-apc]/ensure: change from purged to 5.4.11-1dotdeb.0 failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install php-apc=5.4.11-1dotdeb.0' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Version '5.4.11-1~dotdeb.0' for 'php-apc' was not found
at /tmp/vagrant-puppet-1/modules-0/php/manifests/extension.pp:84

What can I do to fix this?

fpm doesn't want to work

Fpm doesn't seem to work correctly
manifest file: http://pastebin.com/T145GNGg

Using foreman, virtualbox, ubuntu 14.04

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter ensure at /etc/puppet/environments/production/modules/devmach/manifests/php-fpm.pp:13 on node test0.pl.tomandco.co.uk
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

'Unknown entry' when using custom php_value/php_admin_value/php_admin_flag

I'm trying to set a custom php_value max_post_size for a mypool FPM pool. However, this results in an error and FPM fails to start.

::php::fpm::pool { 'mypool':
  # php_flag is working, resulting in the following configuration
  # php_flag[key] = val
  php_flag => {
    'magic_quotes_gpc' => 'off',
    'magic_quotes_runtime' => 'off',
  },
  # php_value is not working, resulting in the following configuration
  # key = val
  # while I am expecting the output like
  # php_value[key] = val
  php_value => {
    'post_max_size' => '31M',
  },
}

FPM error:

ERROR: [/etc/php5/fpm/pool.d/mypool.conf:225] unknown entry 'post_max_size'
ERROR: Unable to include /etc/php5/fpm/pool.d/mypool.conf from /etc/php5/fpm/php-fpm.conf at line 225
ERROR: failed to load configuration file '/etc/php5/fpm/php-fpm.conf'
ERROR: FPM initialization failed

The same error applies to setting a custom php_admin_value and php_admin_flag.

The fix is trivial, PR coming up.

Invalid resource type ini_setting

In trying to set the apache config:

php::apache::config { 'upload_max_filesize=20M': }

I get:

Invalid resource type ini_setting Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type ini_setting at /tmp/vagrant-puppet-2/modules-0/php/manifests/config/dwim.pp:28 on node dev

php::apache broken

There was args rename in php::config, now it takes following args:
define php::config(
$file,
$config
)

cli.pp was changed also:
php::config { 'php-cli':
file => $inifile,
config => $settings
}

apache.pp not, it breaks it:
php::config { 'php-apache':
inifile => $inifile,
settings => $settings
}

pecl.rb - regex doesn't match when version has letters

I found an issue with when php/lib/puppet/provider/package/pecl.rb when trying to install the gmagick pecl package. This package has the version of 1.1.5RC1 (which is probably bad on their part).

# pecl list
Installed packages, channel pecl.php.net:
=========================================
Package  Version  State
...
gmagick  1.1.5RC1 beta
...

The regex on line 62 won't correctly detect the version since it doesn't only contain . or numbers. This causes puppet to report as failed on subsequent runs:

Warning: Could not match gmagick  1.1.5RC1 beta

I suggest changing it to:

when /^(\S+)\s+(\S+)\s+\S+/ then

params on php::fpm are not used

the php::fpm::package class takes its param defaults directly from php::fpm::params class, and not php::fpm, so the params on php::fpm never get used. I imagine there are more like this, as well.

I'll fix this, but I need an approach. right now you have php::fpm inheriting php::fpm::params and php::fpm::package inheriting nothing. Proposal: php::fpm::package (and config and daemon and such) inherit from php::fpm, which inherits from php::fpm::params. Defaults in the various php::fpm::* classes will come from php::fpm's parameters, and maybe even deprecate the parameters directly on them in favor of top level params on php::fpm

Then I should be able to fairly readily port this module to fedora 20 :)

Class ParameterPipe is already defined in Puppet::Type::Package

When running puppetd on the client for the first time after installing the module on the master and syncing the module, we get:

err: Could not load downloaded file /var/lib/puppet/lib/puppet/provider/package/pecl.rb: Class ParameterPipe is already defined in Puppet::Type::Package

We're using a very limited subset of the functionality in here, which does all seem to work despite this error. Module is v0.8.0, master is 2.7.19, clients are 2.7.23

(Plan to) release to the forge

There have been some significant fixes in this module since 0.9.0 was released on the forge in May 2014.
Is it possible to at least plan a new release to be published on puppetforge?
It not very good practice to use the master branch in production environments in my opinion, but I kind of "need to" now.

Another Type in uploadprogress.pp

It looks like another type in uploadprogress.pp

Shouldn't
$package = $php::extension::uploadprogress::params,
be
$package = $php::extension::uploadprogress::params::package,

@@ -5,3 +5,5 @@ docs/_build/
    Gemfile.lock
    spec/fixtures/
    .*.sw*
+
+.DS_Store
diff --git a/manifests/extension/uploadprogress.pp b/manifests/extension/uploadprogress.pp
index b17e908..6f40863 100644
--- a/manifests/extension/uploadprogress.pp
+++ b/manifests/extension/uploadprogress.pp
@@ -44,7 +44,7 @@
    #
    class php::extension::uploadprogress(
    $ensure   = $php::extension::uploadprogress::params::ensure,
-  $package  = $php::extension::uploadprogress::params,
+  $package  = $php::extension::uploadprogress::params::package,
    $provider = $php::extension::uploadprogress::params::provider,
    $inifile  = $php::extension::uploadprogress::params::inifile,
    $settings = $php::extension::uploadprogress::params::settings
diff --git a/templates/.DS_Store b/templates/.DS_Store
deleted file mode 100644
index 5008ddf..0000000

php::config's interface should DWIM.

In my very own private PHP module for Puppet, which is based on my very own private fpm build of PHP 5.5 I have the following interface for php::config:

   php::config { 'upload_max_filesize=10M': }

   php::config { 'upload_max_filesize':
     value  => '10M',
   }

   php::config { 'upload_max_filesize':
     ensure => present,
     value  => '10M',
   }

   php::config { 'set upload max':
     ensure  => present,
     setting => 'upload_max_filesize',
     value   => '10M',
     section => 'PHP',
   }

I think I can fashion a pull request that's backwards compatible.

php::apt requires 'curl'

in manifests/apt.pp add_dotdeb_key requires curl, but it isn't present on all systems - I get:

[127.0.0.1:2222] out: err: /Stage[main]/Php::Apt/Exec[add_dotdeb_key]/returns: change from notrun to 0 failed: Could not find command 'curl'

for example.

php5-apc unavailable on Ubuntu 13.10

Package php5-apc is not available under Ubuntu 13.10. The closest package I found is php5-apcu described as:

The APCu is userland caching: APC (Alternative PHP Cache) stripped of
opcode caching after the deployment of Zend OpCache in PHP 5.5 as the
primary solution to opcode caching in future versions of PHP.

The manifest for php5-apc should be modified to take this into account (also future versions of Ubuntu).

Configuration does not work

Following the documentation I am not able to make changes to the ini configuration. Adding the directive php::apache::config { 'upload_max_filesize=20M': } to a profile leads to the error message "Could not evaluate: can't convert nil into String"

Additionally on the Example page of the documentation i see this:

create_resources('php::config', hiera_hash('php_config', {}))
create_resources('php::cli::config', hiera_hash('php_cli_config', {}))

However there is no example on how the hiera hashes can be defined. Playing around with this I also see various different error messages.

Thanks and regards
hasc

'Invalid Parameter Pipe' when using php:extension with pecl provider.

When attempting to use php::extension with the pecl provider an error occurs:

// From a node manifest:

php::extension { 'intl':
    ensure =>  installed,
    package => "intl",
    require => [Package['g++'], Package['libicu-dev']],
    provider => pecl
}

php::extension { 'memcache': 
    ensure => installed,
    package => 'memcache',
    require => Class['memcached'],
    provider => pecl
} 

// Error when running puppet agent:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter pipe at     /vagrant/modules/php/manifests/extension.pp:73 on node rgbox.asperity.co.uk
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

I've had a look in the file in the error message. When commenting out the pipe parameter the manifest does compile. However in order to install the 'intl' extension I need to supply the location of the headers it requires.

Unfortunately I'm not a rubbiest so am a bit stumped after digging into the source of
lib/puppet/provider/package/pecl.rb.

Hope you can help, this module has saved me loads of time so far!

Upgrade PHP version

The module so far has a very basic (testing) setup in my Vagrant/Puppet dev stack:

include php, php::params

class { 'php::dev':
    ensure => installed,
}
class { 'php::cli':
    ensure => installed,
}

Now vagrant ssh-ing into the box and I see that the version delivered for a default precise32/Ubuntu 12.04 box is

vagrant@wp:~$ php --version
PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch (cli) (built: Apr  4 2014 01:27:23)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

When I look at the List of available packages on packages.debian, then I can see 5.5.11+dfsg-3/jessie for example. But no matter which package I try or how I try to uprade the package, I get the same Error:

Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install php=php5_5.4.9 -4ubuntu2_all.deb' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package php
Wrapped exception:
Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install php=php5_5.4.9 -4ubuntu2_all.deb' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package php
Error: /Stage[main]/Main/Node[wp]/Package[php]/ensure: change from purged to php5_5.4.9 -4ubuntu2_all.deb failed: Could not update: Execution of '/usr/bin/apt-get -q -y -
o DPkg::Options::=--force-confold --force-yes install php=php5_5.4.9 -4ubuntu2_all.deb' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package php

What I tried is adding different package/version names for ensure. Then I tried to add custom sources from different mirrors - none of this had worked out. Example:

package { 'php':
    ensure => 'php5_5.4.9 -4ubuntu2_all.deb',
    source => 'http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_5.4.9-4ubuntu2_all.deb',
}

I hope I'm just missing the obvious - Thanks in advance.

Overwriting extension settings causes augeas exception

Hi, consider this small manifest:

  package {['libaugeas-ruby']: }
  Php::Extension <| |> -> Php::Config <| |>
  class {['::php']:}

  class {
    ['::php::extension::xdebug']:
      settings => { set => {
        ".anon/xdebug.remote_connect_back" => "1",
      }}
  }

This raises the following error when executed:

Error: /Stage[main]/Php::Extension::Xdebug/Php::Config[php-extension-xdebug]/Augeas[php-php-extension-xdebug-config]: Could not evaluate: can't modify frozen String

Happening on Ubuntu 13.10 i386 as well as Ubuntu 14.04 x64 with Puppet 3.4.2 and libaugeas-ruby 0.5.0-1

Must pass provider to Php::Contrib::Base_package[cli]

warning: Scope(Class[Apt::Update]): Could not look up qualified variable 'apt::update_timeout'; class apt has not been evaluated at /tmp/vagrant-puppet-1/modules-0/apt/manifests/update.pp:8
Must pass provider to Php::Contrib::Base_package[cli] at /tmp/vagrant-puppet-1/modules-0/php/manifests/contrib/base_package.pp:29 

Using this example from the readme:

$php_version = '5.4.11-1~dotdeb.0'

include php
include php::apt

class {
  'php::cli':
    ensure => $php_version;
  'php::apache':
    ensure => $php_version;
  'php::dev':
    ensure => $php_version;
  'php::pear':
    ensure => $php_version;
  'php::extension::apc':
    ensure => $php_version;
}

'Invalid Parameter Pipe' when using php:extension with pecl provider.

I am reoppening the issue for the pipe parameter as it seems to be happening again. This is from the latest 0.9 version and puppet version 3.4.3 on amd64 (LinuxMint 17). I will be happy to help you debug it but I am new to puppet and I do not know much about its internals. If I comment out the igbinary and uploadprogress extension it all works.

Here is my full php module ( i have removed some of the redundant information)

include ::php
include php::pear
include php::params
include php::composer
include php::composer::auto_update

Php::Extension <| |> -> Php::Config <| |>

Package['php5-common'] -> Package['php5-dev'] -> Package['php5-cli'] -> Php::Extension <| |>

class{
    ['php::dev', 'php::cli'] : ensure => present;
    ['php::extension::curl', and many more that are not pecl based]: ensure => present;
}

    # this is a pecl based extension
php::extension { 'igbinary':
    ensure    => present,
    package => 'igbinary',
    provider  => 'pecl'
}
    # this is a pecl based extension
php::extension { 'uploadprogress':
    ensure    => present,
    package => 'uploadprogress',
    provider  => 'pecl'
}

I did a run with --debug --trace and this is the end of the output
Debug: Failed to load library 'selinux' for feature 'selinux'
Debug: Using settings: adding file resource 'confdir': 'File[/etc/puppet]{:path=>"/etc/puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dsimport does not exist
Debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
Debug: Puppet::Type::User::ProviderPw: file pw does not exist
Debug: Failed to load library 'ldap' for feature 'ldap'
Debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
Debug: /User[puppet]: Provider useradd does not support features libuser; not managing attribute forcelocal
Debug: Puppet::Type::Group::ProviderDirectoryservice: file /usr/bin/dscl does not exist
Debug: Puppet::Type::Group::ProviderPw: file pw does not exist
Debug: Failed to load library 'ldap' for feature 'ldap'
Debug: Puppet::Type::Group::ProviderLdap: feature ldap is missing
Debug: /Group[puppet]: Provider groupadd does not support features libuser; not managing attribute forcelocal
Debug: Using settings: adding file resource 'vardir': 'File[/var/lib/puppet]{:path=>"/var/lib/puppet", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'logdir': 'File[/var/log/puppet]{:path=>"/var/log/puppet", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'statedir': 'File[/var/lib/puppet/state]{:path=>"/var/lib/puppet/state", :mode=>"1755", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'rundir': 'File[/var/run/puppet]{:path=>"/var/run/puppet", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'libdir': 'File[/var/lib/puppet/lib]{:path=>"/var/lib/puppet/lib", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'certdir': 'File[/var/lib/puppet/ssl/certs]{:path=>"/var/lib/puppet/ssl/certs", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'ssldir': 'File[/var/lib/puppet/ssl]{:path=>"/var/lib/puppet/ssl", :mode=>"771", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'publickeydir': 'File[/var/lib/puppet/ssl/public_keys]{:path=>"/var/lib/puppet/ssl/public_keys", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'requestdir': 'File[/var/lib/puppet/ssl/certificate_requests]{:path=>"/var/lib/puppet/ssl/certificate_requests", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatekeydir': 'File[/var/lib/puppet/ssl/private_keys]{:path=>"/var/lib/puppet/ssl/private_keys", :mode=>"750", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatedir': 'File[/var/lib/puppet/ssl/private]{:path=>"/var/lib/puppet/ssl/private", :mode=>"750", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostcert': 'File[/var/lib/puppet/ssl/certs/augustus.valsr.com.pem]{:path=>"/var/lib/puppet/ssl/certs/augustus.valsr.com.pem", :mode=>"644", :owner=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostprivkey': 'File[/var/lib/puppet/ssl/private_keys/augustus.valsr.com.pem]{:path=>"/var/lib/puppet/ssl/private_keys/augustus.valsr.com.pem", :mode=>"600", :owner=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostpubkey': 'File[/var/lib/puppet/ssl/public_keys/augustus.valsr.com.pem]{:path=>"/var/lib/puppet/ssl/public_keys/augustus.valsr.com.pem", :mode=>"644", :owner=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'localcacert': 'File[/var/lib/puppet/ssl/certs/ca.pem]{:path=>"/var/lib/puppet/ssl/certs/ca.pem", :mode=>"644", :owner=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostcrl': 'File[/var/lib/puppet/ssl/crl.pem]{:path=>"/var/lib/puppet/ssl/crl.pem", :mode=>"644", :owner=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'statefile': 'File[/var/lib/puppet/state/state.yaml]{:path=>"/var/lib/puppet/state/state.yaml", :mode=>"660", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'clientyamldir': 'File[/var/lib/puppet/client_yaml]{:path=>"/var/lib/puppet/client_yaml", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'client_datadir': 'File[/var/lib/puppet/client_data]{:path=>"/var/lib/puppet/client_data", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'classfile': 'File[/var/lib/puppet/state/classes.txt]{:path=>"/var/lib/puppet/state/classes.txt", :mode=>"640", :owner=>"root", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'resourcefile': 'File[/var/lib/puppet/state/resources.txt]{:path=>"/var/lib/puppet/state/resources.txt", :mode=>"640", :owner=>"root", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'clientbucketdir': 'File[/var/lib/puppet/clientbucket]{:path=>"/var/lib/puppet/clientbucket", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'lastrunfile': 'File[/var/lib/puppet/state/last_run_summary.yaml]{:path=>"/var/lib/puppet/state/last_run_summary.yaml", :mode=>"644", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'lastrunreport': 'File[/var/lib/puppet/state/last_run_report.yaml]{:path=>"/var/lib/puppet/state/last_run_report.yaml", :mode=>"640", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'graphdir': 'File[/var/lib/puppet/state/graphs]{:path=>"/var/lib/puppet/state/graphs", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'pluginfactdest': 'File[/var/lib/puppet/facts.d]{:path=>"/var/lib/puppet/facts.d", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/certs/augustus.valsr.com.pem]: Autorequiring File[/var/lib/puppet/ssl/certs]
Debug: /File[/var/lib/puppet/ssl/private_keys/augustus.valsr.com.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys]
Debug: /File[/var/lib/puppet/ssl/public_keys/augustus.valsr.com.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys]
Debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppet/ssl/certs]
Debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/state/classes.txt]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/state/resources.txt]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/state/last_run_summary.yaml]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/state/last_run_report.yaml]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state]
Debug: /File[/var/lib/puppet/facts.d]: Autorequiring File[/var/lib/puppet]
Debug: Finishing transaction 15488740
Debug: Using settings: adding file resource 'confdir': 'File[/etc/puppet]{:path=>"/etc/puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'vardir': 'File[/var/lib/puppet]{:path=>"/var/lib/puppet", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'logdir': 'File[/var/log/puppet]{:path=>"/var/log/puppet", :mode=>"750", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'statedir': 'File[/var/lib/puppet/state]{:path=>"/var/lib/puppet/state", :mode=>"1755", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'rundir': 'File[/var/run/puppet]{:path=>"/var/run/puppet", :mode=>"755", :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'libdir': 'File[/var/lib/puppet/lib]{:path=>"/var/lib/puppet/lib", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'certdir': 'File[/var/lib/puppet/ssl/certs]{:path=>"/var/lib/puppet/ssl/certs", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'ssldir': 'File[/var/lib/puppet/ssl]{:path=>"/var/lib/puppet/ssl", :mode=>"771", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'publickeydir': 'File[/var/lib/puppet/ssl/public_keys]{:path=>"/var/lib/puppet/ssl/public_keys", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'requestdir': 'File[/var/lib/puppet/ssl/certificate_requests]{:path=>"/var/lib/puppet/ssl/certificate_requests", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatekeydir': 'File[/var/lib/puppet/ssl/private_keys]{:path=>"/var/lib/puppet/ssl/private_keys", :mode=>"750", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatedir': 'File[/var/lib/puppet/ssl/private]{:path=>"/var/lib/puppet/ssl/private", :mode=>"750", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostcert': 'File[/var/lib/puppet/ssl/certs/augustus.valsr.com.pem]{:path=>"/var/lib/puppet/ssl/certs/augustus.valsr.com.pem", :mode=>"644", :owner=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostprivkey': 'File[/var/lib/puppet/ssl/private_keys/augustus.valsr.com.pem]{:path=>"/var/lib/puppet/ssl/private_keys/augustus.valsr.com.pem", :mode=>"600", :owner=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostpubkey': 'File[/var/lib/puppet/ssl/public_keys/augustus.valsr.com.pem]{:path=>"/var/lib/puppet/ssl/public_keys/augustus.valsr.com.pem", :mode=>"644", :owner=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'localcacert': 'File[/var/lib/puppet/ssl/certs/ca.pem]{:path=>"/var/lib/puppet/ssl/certs/ca.pem", :mode=>"644", :owner=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostcrl': 'File[/var/lib/puppet/ssl/crl.pem]{:path=>"/var/lib/puppet/ssl/crl.pem", :mode=>"644", :owner=>"puppet", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'pluginfactdest': 'File[/var/lib/puppet/facts.d]{:path=>"/var/lib/puppet/facts.d", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
Debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/ssl/certs/augustus.valsr.com.pem]: Autorequiring File[/var/lib/puppet/ssl/certs]
Debug: /File[/var/lib/puppet/ssl/private_keys/augustus.valsr.com.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys]
Debug: /File[/var/lib/puppet/ssl/public_keys/augustus.valsr.com.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys]
Debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppet/ssl/certs]
Debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/puppet/ssl]
Debug: /File[/var/lib/puppet/facts.d]: Autorequiring File[/var/lib/puppet]
Debug: Finishing transaction 11005880
Debug: Using cached certificate for ca
Debug: Using cached certificate for augustus.valsr.com
Debug: Using settings: adding file resource 'statefile': 'File[/var/lib/puppet/state/state.yaml]{:path=>"/var/lib/puppet/state/state.yaml", :mode=>"660", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'clientyamldir': 'File[/var/lib/puppet/client_yaml]{:path=>"/var/lib/puppet/client_yaml", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'client_datadir': 'File[/var/lib/puppet/client_data]{:path=>"/var/lib/puppet/client_data", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'classfile': 'File[/var/lib/puppet/state/classes.txt]{:path=>"/var/lib/puppet/state/classes.txt", :mode=>"640", :owner=>"root", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'resourcefile': 'File[/var/lib/puppet/state/resources.txt]{:path=>"/var/lib/puppet/state/resources.txt", :mode=>"640", :owner=>"root", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'clientbucketdir': 'File[/var/lib/puppet/clientbucket]{:path=>"/var/lib/puppet/clientbucket", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'lastrunfile': 'File[/var/lib/puppet/state/last_run_summary.yaml]{:path=>"/var/lib/puppet/state/last_run_summary.yaml", :mode=>"644", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'lastrunreport': 'File[/var/lib/puppet/state/last_run_report.yaml]{:path=>"/var/lib/puppet/state/last_run_report.yaml", :mode=>"640", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'graphdir': 'File[/var/lib/puppet/state/graphs]{:path=>"/var/lib/puppet/state/graphs", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Finishing transaction 15444200
Debug: Loaded state in 0.09 seconds
Debug: Failed to load library 'msgpack' for feature 'msgpack'
Debug: node supports formats: pson b64_zlib_yaml yaml raw
Debug: Using cached certificate for ca
Debug: Using cached certificate for augustus.valsr.com
Debug: Using cached certificate_revocation_list for ca
Info: Retrieving plugin
Debug: Failed to load library 'msgpack' for feature 'msgpack'
Debug: file_metadata supports formats: pson b64_zlib_yaml yaml raw
Debug: Finishing transaction 22821580
Info: Loading facts in /etc/puppet/modules/valsr_desktop/lib/facter/gpu.rb
Info: Loading facts in /etc/puppet/modules/concat/lib/facter/concat_basedir.rb
Info: Loading facts in /etc/puppet/modules/git/lib/facter/git_html_path.rb
Info: Loading facts in /etc/puppet/modules/git/lib/facter/git_version.rb
Info: Loading facts in /etc/puppet/modules/git/lib/facter/git_exec_path.rb
Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb
Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb
Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts in /etc/puppet/modules/apt/lib/facter/apt_security_updates.rb
Info: Loading facts in /etc/puppet/modules/apt/lib/facter/apt_package_updates.rb
Info: Loading facts in /etc/puppet/modules/apt/lib/facter/apt_updates.rb
Info: Loading facts in /etc/puppet/modules/php/lib/facter/php_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/apt_security_updates.rb
Info: Loading facts in /var/lib/puppet/lib/facter/git_html_path.rb
Info: Loading facts in /var/lib/puppet/lib/facter/apt_package_updates.rb
Info: Loading facts in /var/lib/puppet/lib/facter/php_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/gpu.rb
Info: Loading facts in /var/lib/puppet/lib/facter/git_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/git_exec_path.rb
Info: Loading facts in /var/lib/puppet/lib/facter/apt_updates.rb
Debug: Failed to load library 'msgpack' for feature 'msgpack'
Debug: catalog supports formats: pson b64_zlib_yaml yaml dot raw
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter pipe at /etc/puppet/modules/php/manifests/extension.pp:74 on node augustus.valsr.com
/usr/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:195:in is_http_200?' /usr/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:101:infind'
/usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:201:in find' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:256:inblock in retrieve_new_catalog'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:327:in block in thinmark' /usr/lib/ruby/1.9.1/benchmark.rb:295:inrealtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:326:in thinmark' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:255:inretrieve_new_catalog'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:69:in retrieve_catalog' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:109:inprepare_and_retrieve_catalog'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:172:in run' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:44:inblock (4 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent/locker.rb:20:in lock' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:44:inblock (3 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:114:in with_client' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:41:inblock (2 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:79:in run_in_fork' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:40:inblock in run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in call' /usr/lib/ruby/vendor_ruby/puppet/application.rb:179:incontrolled_run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:38:in run' /usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:355:inonetime'
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:321:in run_command' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:inblock (2 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:470:in plugin_hook' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:inblock in run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:478:in exit_on_fail' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:inrun'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in run' /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:91:inexecute'
/usr/bin/puppet:4:in `

'
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Debug: Executing '/etc/puppet/etckeeper-commit-post'

PEAR packages shown as "created" on every run

Seems that querying package install status doesn't work for me, leading to the slight annoyance of packages being shown as "created" on every Puppet run.

This is an excerpt from my Puppet code:

package { [
  'File_PDF-beta',
  'HTML_Common',
  'HTML_QuickForm',
  'HTML_Table',
  'HTTP-alpha',
  'HTTP_Download',
  'HTTP_Header',
  'Image_Transform-alpha',
  'Mail_Mime',
  'OLE-beta',
  'Spreadsheet_Excel_Writer-beta',
  'Text_Password',
]:
  ensure   => installed,
  provider => pear,
}

Installation goes fine, but when I run Puppet later, it still says:

notice: /Stage[main]/Lex/Package[OLE-beta]/ensure: created
notice: /Stage[main]/Lex/Package[Spreadsheet_Excel_Writer-beta]/ensure: created
notice: /Stage[main]/Lex/Package[Mail_Mime]/ensure: created
notice: /Stage[main]/Lex/Package[File_PDF-beta]/ensure: created
notice: /Stage[main]/Lex/Package[HTTP-alpha]/ensure: created
notice: /Stage[main]/Lex/Package[HTML_QuickForm]/ensure: created
notice: /Stage[main]/Lex/Package[Image_Transform-alpha]/ensure: created
notice: /Stage[main]/Lex/Package[HTML_Common]/ensure: created
notice: /Stage[main]/Lex/Package[HTTP_Header]/ensure: created
notice: /Stage[main]/Lex/Package[Text_Password]/ensure: created
notice: /Stage[main]/Lex/Package[HTML_Table]/ensure: created
notice: /Stage[main]/Lex/Package[HTTP_Download]/ensure: created

Glancing at the source code, it appears that the 'query' function is parsing the output of pear list -a. Maybe something is going wrong there (I don't know Ruby, so I'm not sure). This is the output of that command for me:

Installed packages, channel __uri:
==================================
(no packages installed)

Installed packages, channel doc.php.net:
========================================
(no packages installed)

Installed packages, channel pear.php.net:
=========================================
Package                  Version  State
Archive_Tar              1.3.7    stable
Console_Getopt           1.3.0    stable
File_PDF                 0.3.3    beta
HTML_Common              1.2.5    stable
HTML_QuickForm           3.2.13   stable
HTML_Table               1.8.3    stable
HTTP                     1.4.1    stable
HTTP_Download            1.1.4    stable
HTTP_Header              1.2.1    stable
Image_Transform          0.9.5    alpha
Mail_Mime                1.8.8    stable
OLE                      1.0.0RC2 beta
PEAR                     1.9.4    stable
Spreadsheet_Excel_Writer 0.9.3    beta
Structures_Graph         1.0.4    stable
Text_Password            1.1.1    stable
XML_Util                 1.2.1    stable

Installed packages, channel pecl.php.net:
=========================================
(no packages installed)

Maybe using the output of pear install -p <package> would be more reliable?

For performance reasons, pear provider should not perform upgrade action if package is returned in list output with minimum version requirements

Currently when using the pear or pecl providers, Puppet executes pear list -a then pear upgrade packagename-version. This occurs on each subsequent execution of Puppet, not just the first time. This additional pear upgrade call adds 300ms~ per package to Puppet runtimes, which is not necessary.

Example:

Debug: Executing '/usr/bin/pear list -a'
Debug: Executing '/usr/bin/pear upgrade Net_SMTP-1.6.2'
Notice: /Stage[main]/Manifestname::Php_fpm/Php::Extension[Net_SMTP]/Package[Net_SMTP]/ensure: created
Debug: /Stage[main]/Manifestname::Php_fpm/Php::Extension[Net_SMTP]/Package[Net_SMTP]: The container Php::Extension[Net_SMTP] will propagate my refresh event
Debug: Executing '/usr/bin/pear list -a'
Debug: Executing '/usr/bin/pear upgrade Net_Socket-1.0.14'
Notice: /Stage[main]/Kix_vc_components::Php_fpm/Php::Extension[Net_Socket]/Package[Net_Socket]/ensure: created

When running pear upgrade it confirms the package is already installed, and it shows in the pear list -a output. See below:

root@hostname:/# /usr/bin/pear upgrade Net_Socket-1.0.14
Nothing to upgrade
root@hostname:/# echo $?
0
root@hostname:/# pear list -a
Installed packages, channel __uri:
==================================
(no packages installed)

Installed packages, channel doc.php.net:
========================================
(no packages installed)

Installed packages, channel pear.php.net:
=========================================
Package          Version State
Archive_Tar      1.3.7   stable
Console_Getopt   1.3.0   stable
Mail             1.2.0   stable
Mail_Mime        1.8.8   stable
Mail_mimeDecode  1.5.5   stable
Net_DIME         1.0.2   stable
Net_SMTP         1.6.2   stable
Net_Socket       1.0.14  stable
PEAR             1.9.4   stable
Structures_Graph 1.0.4   stable
XML_Util         1.2.1   stable

Installed packages, channel pecl.php.net:
=========================================
Package Version State
mongo   1.4.5   stable

PHPUnit problem on Debian 7

I had this on my manifest file:

Php::Extension <| |>
  # Configure extensions
  -> Php::Config <| |>
  # Reload webserver
  ~> Service["apache2"]

class { 
    [
    'php::apache','php::cli','php::extension::curl','php::extension::imagick','php::extension::mcrypt',
    'php::extension::memcached','php::extension::mysql','php::extension::xdebug',   
    'php::composer','php::composer::auto_update'
    ]:
}

class { 'php::phpunit':
    ensure => latest,
}

Once I did vagrant provision I got this:

==> machine_debian_dev: Error: Could not find resource 'Exec[php::pear::auto_discover]' for relationship on 'Package[pear.phpunit.de/PHPUnit]' on node machine.dev
==> machine_debian_dev: Error: Could not find resource 'Exec[php::pear::auto_discover]' for relationship on 'Package[pear.phpunit.de/PHPUnit]' on node machine.dev

It all worked (except that xdebug installed to the wrong place) after I removed the php::phpunit clas

These are the module I have currently installed

├── nodes-php (v0.9.0)
├── puppetlabs-apache (v1.2.0)
├── puppetlabs-apt (v1.7.0)
├── puppetlabs-concat (v1.1.2)
├── puppetlabs-git (v0.3.0)
├── puppetlabs-inifile (v1.2.0)
├── puppetlabs-stdlib (v4.4.0)
└── puppetlabs-vcsrepo (v1.2.0)

I assume there is a dependency on PEAR module.

My box is debian 7 and got the image from https://vagrantcloud.com/janschumann/boxes/debian-7

Shows as puppet-php in module list, but installed as nodes-php

Puppet seems to be slightly confused about the name of this module.

Running "sudo puppet module install nodes/php" a second time yields:

Error: Could not install module 'nodes-php' (latest: v0.6.1)
  Installation would overwrite /etc/puppet/modules/php
    Currently, 'puppet-php' (v0.6.1) is installed to that directory
    Use `puppet module install --dir <DIR>` to install modules elsewhere
    Use `puppet module install --force` to install this module anyway

Where as if I do it for another module "sudo puppet module install puppetlabs/apt" you get the expected:

Error: Could not install module 'puppetlabs-apt' (best)
  Module 'puppetlabs-apt' (v1.2.0) is already installed
    Use `puppet module upgrade` to install a different version
    Use `puppet module install --force` to re-install only this module

Extensions/Packages failing

Seems like I can't fetch the following packages: ssh2 and http. I tried different ways of adding them:

  1. apt::ppa{} from the puppetlabs/apt module using a launchpad provider (as shown below),
  2. specifying them in the class as php::extension::http and php::extension::ssh2
  3. and specifying them as php::extension { 'php5-ssh2': etc. All methods fail

None of them worked. The apt::ppa provider failed with a 404 (probably because his repo structure is slightly messed up or apt::ppa is too unflexible or is an overprotective parent making too many assumptions for me.

class profile::php {

    include
        apt,
        php,
        php::params

    # Prerequisite/not present on some OS
    exec { 'python-software-properties':
        command => 'apt-get install python-software-properties -y',
    }

    # Fetch the latest PHP 5.4.XX version
    apt::ppa { 'ppa:ondrej/php5-oldstable': }
    # Fetch the latest PHP 5.5.XX version
    apt::ppa { 'ppa:ondrej/php5': }

    # This package fails with a 404, so no php::extension::http
    # apt::ppa { 'ppa:nathan-renniewaldock/php5-pecl-http': }

    package { 'php5':
        ensure   => latest,
        provider => apt,
    }

    class {
        [
            'php::dev',
            'php::cli'
        ]:
            ensure => installed;

        [
            'php::extension::apc',
            'php::extension::curl',
            'php::extension::gd',
            # See above package fail for why this is disabled
            # 'php::extension::http',
            'php::extension::imagick',
            'php::extension::intl',
            'php::extension::mcrypt',
            'php::extension::memcache',
            'php::extension::memcached',
            # Already enabled by PHP
            # 'php::extension::mysql',
            'php::extension::opcache',
            # 'php::extension::ssh2',
            'php::extension::xcache',
            'php::extension::xdebug'
        ]:
            ensure => installed;
    }

    # Install APC user cache only (php 5.5 uses OptCache instead of APC)
    php::extension { 'php5-apcu':
        ensure    => installed,
        package   => 'php5-apcu',
        provider  => 'apt'
    }

    # doesn't work that way
    # php::extension { 'php5-ssh2':
    #   ensure    => installed,
    #   package   => 'php5-ssh2',
    #   provider  => 'pecl'
    #}

    class { [ 'php::composer', 'php::composer::auto_update' ]:
    }

    Class['Apt']
    -> Class['Php::dev']
    -> Class['Php::cli']
}

Am I mislead somewhere?

Having troubles with setting php.ini options in v0.9.0

Here's what I'm trying to do:

  class {
    'php::cli':
      ensure    => latest;
      settings  => {
        set => {
          'PHP/memory_limit'         => '32M',
          'PHP/display_errors'       => 'On',
          'PHP/log_errors'           => 'Off',
          'PHP/post_max_size'        => '4M'
        }
      };
  }

And here's what I'm getting:

Error: /Stage[main]/Php::Cli/Php::Cli::Config[php-cli]/Php::Config[php-cli]/Php::Config::Augeas[cli-php-cli]/Augeas[php-cli-php-cli-config]: Could not evaluate: undefined method `flatten' for #<Hash:0x7f63e2243b80>

php::apache::config doesn't work

If I try to set a value for a commented setting in php.ini file using

    php::apache::config { 'max_input_vars = 4000':
        require => Class['apache']
    }

The output looks like

==> default: Error: /Stage[main]/Main/Node[default]/Php::Apache::Config[max_input_vars = 4000]/Php::Config[max_input_vars = 4000]/Php::Config::Dwim[max_input_vars = 4000]/Ini_setting[max_input_vars = 4000 in ]: Could not evaluate: can't convert nil into String

In php.ini file there is:

; How many GET/POST/COOKIE input variables may be accepted
; max_input_vars = 1000

Maybe there is a simple workaround for that.

Must pass package_provider to Class[Php::Fpm::Package]

@joshbetz pointed out in comment on the commit ea1ead5 parameter package_provider must be passed to the class php:fpm:package.

==> default: Must pass package_provider to Class[Php::Fpm::Package] at /tmp/vagrant-puppet-3/modules-0/php/manifests/fpm/package.pp:5

Most likely adding undef as default should do the trick. However I will have to test it before creating pull request.

Modul run with puppetlabs/apache ?

Hi,

it ist possible that the puppet-php Modul run with puppetlabs/apache?
I need both...

Here ist the issue:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Cannot alias Service[httpd] to ["apache2"] at /etc/puppet/environments/test/modules/apache/manifests/service.pp:34; resource ["Service", "apache2"] already declared at /etc/puppet/environments/test/modules/php/manifests/apache/service.pp:13 at /etc/puppet/environments/test/modules/apache/manifests/service.pp:34 on node server.local

thx

missing package param in extension::uploadprogress

Missing the package in:
class php::extension::uploadprogress(
$ensure = $php::extension::uploadprogress::params::ensure,
$package = $php::extension::uploadprogress::params,

should be
class php::extension::uploadprogress(
$ensure = $php::extension::uploadprogress::params::ensure,
$package = $php::extension::uploadprogress::params::package,

path to xdebug.so wrong for debian

Including include php::extension::xdebug leads on my system to write the following xdebug.ini.

cat /etc/php5/mods-available/xdebug.ini
zend_extension=/usr/lib/php5/20121212/xdebug.so

The module /usr/lib/php5/20121212/xdebug.so cannot be found. I checked the path and found out that the file is stored under /usr/lib/php5/20100525/xdebug.so.

My system is a debian, installed within vagrant from this base box http://vagrant-boxes.cargomedia.ch/virtualbox/debian-7-amd64-default.box

name -a
Linux gamba 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux

The default provider value (undef) causes a catalog error.

The php::extension define and the php::contrib::base_package define have no default value for the provider attribute causing a catalog error when used.

Example class:

class {
  'php::cli':
    ensure => 'installed';
}

Puppet Error:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Must pass provider to Php::Contrib::Base_package[cli]

Changing

define php::contrib::base_package($ensure, $provider) {

to

define php::contrib::base_package($ensure, $provider = undef) {

and doing the same or php::exension fixes the issue.

Puppet version 2.7.23

Puppet-lint usage request.

Good day

I firstly would like to thank you for the awesome work done for PHP.

There is just one thing, and that is puppet-lint complains about misalignments and the use of tabs etc.

Would it be possible to correct these.

I hope you will give my suggestion some thought.

Regards
Brent Clark

php.ini - No such file or directory

I think this module is trying to write to the PHP.ini file before PHP is installed.

I'm getting these errors in Vagrant:

==> default: Notice: /Stage[main]/Php::Extension::Xdebug/Php::Extension[xdebug]/Package[php5-xdebug]/ensure: ensure changed 'purged' to 'present'
==> default: Notice: /Stage[main]/Phpmyadmin/Phpmyadmin::Debconf[reconfigure-webserver]/Exec[reconfigure-webserver]/returns: executed successfully
==> default: Notice: /Stage[main]/Php::Extension::Curl/Php::Extension[curl]/Package[php5-curl]/ensure: ensure changed 'purged' to 'present'
==> default: Notice: /Stage[main]/Php::Extension::Mysql/Php::Extension[mysql]/Package[php5-mysql]/ensure: ensure changed 'purged' to 'present'
==> default: Notice: /Stage[main]/Mysql::Server::Install/Package[mysql-server]/ensure: ensure changed 'purged' to 'present'
==> default: Notice: /Stage[main]/Mysql::Server::Config/File[mysql-config-file]/content: content changed '{md5}77f15d6c87f9c136c4efcda072017f71' to '{md5}790c6c49aed83ee9b81fa3c7360898c8'
==> default: Notice: /Stage[main]/Php::Augeas/File[/usr/share/augeas/lenses/contrib]/ensure: created
==> default: Notice: /Stage[main]/Php::Augeas/File[/usr/share/augeas/lenses/contrib/php.aug]/ensure: defined content as '{md5}3ee52fcce112525fd7b5297d361ab7ad'
==> default: Notice: /Stage[main]/Php::Extension::Xdebug/Php::Config[php-extension-xdebug]/Php::Config::Augeas[php-extension-xdebug]/Augeas[php-php-extension-xdebug-config]/returns: executed successfully
==> default: Error: Could not set 'present' on ensure: No such file or directory - /etc/php5/fpm/php.ini at 28:/tmp/vagrant-puppet/modules-ee68d6dc396f188d41daf4b584832de3/php/manifests/config/dwim.pp
==> default: Error: Could not set 'present' on ensure: No such file or directory - /etc/php5/fpm/php.ini at 28:/tmp/vagrant-puppet/modules-ee68d6dc396f188d41daf4b584832de3/php/manifests/config/dwim.pp
==> default: Wrapped exception:
==> default: No such file or directory - /etc/php5/fpm/php.ini
==> default: Error: /Stage[main]/Main/Php::Fpm::Config[post_max_size=64M]/Php::Config[post_max_size=64M]/Php::Config::Dwim[post_max_size=64M]/Ini_setting[post_max_size=64M in /etc/php5/fpm/php.ini]/ensure: change from absent to present failed: Could not set 'present' on ensure: No such file or directory - /etc/php5/fpm/php.ini at 28:/tmp/vagrant-puppet/modules-ee68d6dc396f188d41daf4b584832de3/php/manifests/config/dwim.pp
==> default: Notice: /Stage[main]/Php::Fpm::Package/Package[php5-fpm]/ensure: ensure changed 'purged' to 'present'

This is my PHP configuration:

class { [ 'php::fpm', 'php::cli' ]: }
class {
  [
    'php::extension::apcu',
    'php::extension::curl',
    'php::extension::mcrypt',
    'php::extension::mysql',
    'php::extension::xdebug',
  ]:
}
php::fpm::config { ['upload_max_filesize=64M', 'post_max_size=64M']: }
php::fpm::config { 'listen=127.0.0.1:9000':
  file    => '/etc/php5/fpm/pool.d/www.conf',
  section => 'www',
}

php.ini variables doesn't work using dwim method

php::config losses default $inifile value when calling from php::fpm::config

looks like

include ::php

cause $inifile gets empty after line 44 of manifests/config.pp.

it's working fine when file is defined ie.

php::fpm::config { 'display_errors':
  file => '/etc/php5/fpm/php.ini',
  setting => 'display_errors',
  value => 'On'
}

[discuss] what needs to be done for a 1.0.0 release

i'd like to do a big cleanup before we comit to a 1.0 release

  • there's loads of repetition with regard to params classes that has to be simplified.
  • i am convinced that these params classes are to be blamed for bugs like #121, #132, etc…
  • currently this module only works on debuntu, is anyone interested in making it work on other platforms?
  • testing: sigh if you know me from irc, or twitter, you know i'm a big fan of testing, and no fan of rspec :( see also bartavelle/language-puppet#99
  • anything else?

Consider separating out units into smaller modules

I'm still new to puppet, having worked mostly with chef, but just wondering whether you would ever consider splitting this module into more manageable modular chunks. Does puppet's architecture discourage this?

I only ask in the interest of moving toward modules that take a more unixy approach. You have lots of awesome functionality here, but I'm unsure how to use it in a librarian-puppet-centric approach to building my infra. I'd really like to contribute though, I just prefer to contribute to more modular projects. I'd be happy to help split things out if that were of interest to you :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.