Issue #6846 has been updated by Ben Hughes.

Status changed from Investigating to Needs Decision
Assignee set to Nigel Kersten


----------------------------------------
Feature #6846: Report full list of errors, not just the last error
https://projects.puppetlabs.com/issues/6846

Author: John Crenshaw
Status: Needs Decision
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.

Reply via email to