Issue #6846 has been updated by John Crenshaw.
Ben Hughes wrote:
> John, can you have a look over this please, and see if this is the problem
> you're describing. I can't see the forest for the trees here I fear.
Ah! Very very similar. I'm pretty certain I understand the error now. The last
entry in the chain included a "source" parameter, and it is the SOURCE
dependency that was failing, not the "require" dependency. There was an earlier
exec entry containing a "creates" clause that matched the failing source, but
the error messages didn't reveal any failure on that entry until after the
later one was commented out. In other words, although the whole chain is
reported for "require" parameters, failed "source" parameters didn't report the
whole chain.
Try this:
`Exec{ path =>
'/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin' }
file{
'/tmp/deps/file-fail':
ensure => file,
source => '/tmp/deps/file-that-doesnt-exist',
}
exec{
'cpstart':
command => 'cp /tmp/deps/start /tmp/deps/file0',
creates => '/tmp/deps/file0'
require => Exec['/tmp/deps/file-fail'],
}
file{
'/tmp/deps/file1':
ensure => file,
source => 'file:///tmp/deps/file0',
require => Exec['cpstart'],
}`
Does that hide the failed exec in the middle?
----------------------------------------
Feature #6846: Report full list of errors, not just the last error
https://projects.puppetlabs.com/issues/6846
Author: John Crenshaw
Status: Investigating
Priority: Low
Assignee: Nigel Kersten
Category:
Target version:
Affected Puppet version:
Keywords:
Branch:
Reproducible using the camptocamp apache module's apache::vhost-ssl method as a
--noop on a machine that doesn't already have apache installed. (The reason in
this case, is because apache installs a file, which is later used as a
prerequisite for the "generate-ssl-cert-$name" event, which itself generates a
file that is the prerequisite for the "public CSR file for $name" event. Here
are the interesting bits of the apache::vhost-ssl define:
`
exec { "generate-ssl-cert-$name":
command => "/usr/local/sbin/generate-ssl-cert.sh ${name}
${apache::params::root}/${name}/ssl/ssleay.cnf
${apache::params::root}/${name}/ssl/ ${days}",
creates => $csrfile,
notify => Exec["apache-graceful"],
require => [
File["${apache::params::root}/${name}/ssl/ssleay.cnf"],
File["/usr/local/sbin/generate-ssl-cert.sh"],
],
}
`
Then later on:
`
# put a copy of the CSR in htdocs, or another location if $publish_csr
# specifies so.
file { "public CSR file for $name":
ensure => $publish_csr ? {
false => "absent",
default => "present",
},
path => $publish_csr ? {
true => "${apache::params::root}/${name}/htdocs/${name}.csr",
false => "${apache::params::root}/${name}/htdocs/${name}.csr",
default => $publish_csr,
},
source => "file://$csrfile",
mode => 640,
seltype => "httpd_sys_content_t",
require => Exec["generate-ssl-cert-$name"],
}
`
This gives an error: Could not retrieve information from source(s)
file:///var/www/example.com/ssl/example.com.csr at
/etc/puppet/modules/apache/manifests/definitions/vhost-ssl.pp
You don't see the real error unless you remove the copying entry. The real
error is:
Could not find dependency File[/usr/local/sbin/generate-ssl-cert.sh] for
Exec[generate-ssl-cert-donedesk.com] at
/etc/puppet/modules/apache/manifests/definitions/vhost-ssl.pp:224
...which is of course caused by the dependency on a non-existent file
(non-existent, because the noop suppressed the installation that would have
created it, but that's a bug in the definition, not puppet.)
Puppet should have recursively indicated all of the failed dependencies, not
just one.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.