Hi, I've inherited a puppet setup for automating php installation and
extension management. We're on Debian and we've encountered a strange
issue that I've traced down back to puppet I think. I've stripped back the
configuration and made the problem reproducible, logs and config pasted
below.
1. php5-common, php5-memcache, and php5-mysql are all installed.
2. php5-common and php5-mysql receive an update, say from 5.3.3-7+squeeze14
to 5.3.3-7+squeeze17
3. Puppet runs and php5-common upgrade conflicts. Apt's first solution
removes php5-mysql and php5-memcache.
4. Puppet continues run and re-installs/upgrades php5-mysql. It skips
php5-memcache.
5. On a subsequent run php5-memcache is installed again as expected.
This appears to only happen to packages that don't share the php5 version
naming schema, but that may be just a clue, not a cause. e.g. php5-memcache
is 3.0.4-4+squeeze1.
I have:
package { "php5-common": ensure => latest }
php_module { "mysql":
ensure => $php5_mysql ? {
'1' => 'enable',
'0' => 'absent',
},
}
php_module { "memcache":
ensure => $php5_memcache ? {
'1' => 'enable',
'0' => 'absent',
},
}
define php_module ( $ensure = 'enable' ) {
if $ensure == "enable" {
package {
"php5-${name}": ensure => latest,
require => [ Package[ 'php5-common'], Package[ 'php5-cgi' ],
Package[ 'php5' ], Package[ 'libapache2-mod-php5' ] ],
}
} else {
package { "php5-${name}": ensure => absent }
}
}
In the debug of a run, I see (relevant lines only):
231 ^[[0;36mDebug:
/Stage[main]/Php/Php::Php_module[memcache]/Package[php5-memcache]/require:
requires Package[php5-common]^[[0m
232 ^[[0;36mDebug:
/Stage[main]/Php/Php::Php_module[memcache]/Package[php5-memcache]/require:
requires Package[php5-cgi]^[[0m
233 ^[[0;36mDebug:
/Stage[main]/Php/Php::Php_module[memcache]/Package[php5-memcache]/require:
requires Package[php5]^[[0m
234 ^[[0;36mDebug:
/Stage[main]/Php/Php::Php_module[memcache]/Package[php5-memcache]/require:
requires Package[libapache2-mod-php5]^[[ 0m
327 ^[[0;36mDebug:
/Stage[main]/Php/Php::Php_module[mysql]/Package[php5-mysql]/require:
requires Package[php5-common]^[[0m
328 ^[[0;36mDebug:
/Stage[main]/Php/Php::Php_module[mysql]/Package[php5-mysql]/require:
requires Package[php5-cgi]^[[0m
329 ^[[0;36mDebug:
/Stage[main]/Php/Php::Php_module[mysql]/Package[php5-mysql]/require:
requires Package[php5]^[[0m
330 ^[[0;36mDebug:
/Stage[main]/Php/Php::Php_module[mysql]/Package[php5-mysql]/require:
requires Package[libapache2-mod-php5]^[[0m
487 ^[[0;36mDebug: Executing '/usr/bin/apt-cache policy php5-common'^[[0m
488 ^[[0;36mDebug: /Stage[main]/Php/Package[php5-common]/ensure:
php5-common "5.3.3-7+squeeze14" is installed, latest is "5.3.3-7+sque
eze17"^[[0m
489 ^[[0;36mDebug: Executing '/usr/bin/aptitude -y -o
DPkg::Options::=--force-confold install php5-common'^[[0m
490 ^[[mNotice: /Stage[main]/Php/Package[php5-common]/ensure: ensure
changed '5.3.3-7+squeeze14' to '5.3.3-7+squeeze17'^[[0m
491 ^[[0;36mDebug: /Stage[main]/Php/Package[php5-common]: The container
Class[Php] will propagate my refresh event^[[0m
547 ^[[0;36mDebug: Executing '/usr/bin/apt-cache policy php5-memcache'^[[0m
615 ^[[0;36mDebug: Executing '/usr/bin/apt-cache policy php5-mysql'^[[0m
616 ^[[0;36mDebug:
/Stage[main]/Php/Php::Php_module[mysql]/Package[php5-mysql]/ensure:
php5-mysql "5.3.3-7+squeeze14" is installed, la test is
"5.3.3-7+squeeze17"^[[0m
617 ^[[0;36mDebug: Executing '/usr/bin/aptitude -y -o
DPkg::Options::=--force-confold install php5-mysql'^[[0m
618 ^[[mNotice:
/Stage[main]/Php/Php::Php_module[mysql]/Package[php5-mysql]/ensure: ensure
changed '5.3.3-7+squeeze14' to '5.3.3-7+squ eeze17'^[[0m
619 ^[[0;36mDebug:
/Stage[main]/Php/Php::Php_module[mysql]/Package[php5-mysql]: The container
Php::Php_module[mysql] will propagate my refresh event^[[0m
620 ^[[0;36mDebug: Php::Php_module[mysql]: The container Class[Php] will
propagate my refresh event^[[0m
So, why, on line 547, when memcache is definitely not installed does it not
install it? I've been on this for 3 days and am officially stumped. Any
help would be appreciated.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.