Issue #6846 has been updated by John Crenshaw.

As it turns out, I handn't fully tracked down the problem when I posted this. I 
only thought I had. The real problem is worse and deeper than it looks like 
above, but that said, you can see it if you try the vhost-ssl method of the 
camptocamp apache module on a fresh machine. (I was using Debian Squeeze, in 
case it makes a difference.)

What happens is this:
1. run in --noop
2. It will fail when trying to copy the CSR file
3. You'll get an error indicating that there was a dependency problem at the 
copy method
4. No other errors are shown.
5. If you comment out the CSR copy, you'll get an error on the dependency 
before it. Another dependency problem of some sort.
6. Comment that out, and you'll get another, etc.

I'm not sure the reasons for all of this, and I don't know why the problem 
appears only in --noop mode, but that's all really tangential to the essence of 
this request. The fact that the error output only shows one level of the failed 
dependency made the actual problem basically impossible to track down.
----------------------------------------
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: 
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