Issue #4704 has been updated by Markus Roberts.

Status changed from Accepted to Needs design decision

So looking through the provided stack trace it appears the problem is occurring 
while retrieving the catalog from the puppet master -- specifically, in getting 
the metadata for the file resource.  Without this information, it isn't 
possible to use the resource (e.g. we can't even check if it's in sync).  Like 
all errors in this part of the process, a failure causes the run to fail rather 
than just failing the resource.  This is because there's no guarantee that a 
catalog with arbitrary resources removed is even well formed (it may have edges 
to non-existent vertices), so we can't just omit the resource.

I'm inclined to just reject the ticket on that basis, but I'm leaving it as 
"Needs Design Decision" for the moment in case anyone cares to offer a counter 
analysis.

----------------------------------------
Bug #4704: puppet run fails completely if source of a file is missing
http://projects.puppetlabs.com/issues/4704

Author: Peter Meier
Status: Needs design decision
Priority: Normal
Assignee: Markus Roberts
Category: 
Target version: 
Affected version: 2.6.1rc3
Keywords: 
Branch: 


As far as I remember this didn't fail that hard in 0.25.x, but in 2.6 we have 
now the following problem:

<pre>
Given a file-resource with one or multiple sources
And NONE of the sources exists on the master.
When I apply the catalog the puppet-run fails hard
And it doesn't apply any resources at all.
</pre>

Trace:

<pre>
# puppet agent --test --http_compression --trace
info: Retrieving plugin
info: Loading facts in configured_ntp_servers
info: Loading facts in xen
info: Loading facts in acpi_available
info: Loading facts in interfaces
info: Loading facts in mountpoints
info: Loading facts in vserver
info: Loading facts in selinux
info: Loading facts in mysql
info: Loading facts in sshkeys
info: Loading facts in configured_ntp_servers
info: Loading facts in xen
info: Loading facts in acpi_available
info: Loading facts in interfaces
info: Loading facts in mountpoints
info: Loading facts in vserver
info: Loading facts in selinux
info: Loading facts in mysql
info: Loading facts in sshkeys
info: Caching catalog for foo.bar.ch
/usr/lib/ruby/site_ruby/1.8/puppet/parameter.rb:171:in `fail'
/usr/lib/ruby/site_ruby/1.8/puppet/type/file/source.rb:150:in `init_metadata'
/usr/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:106:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:106:in `cached_value'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:98:in `cached_value'
/usr/lib/ruby/site_ruby/1.8/puppet/util/cacher.rb:48:in `metadata'
/usr/lib/ruby/site_ruby/1.8/puppet/type/file/source.rb:99:in 
`copy_source_values'
/usr/lib/ruby/site_ruby/1.8/puppet/type/file.rb:632:in `retrieve'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:695:in `retrieve_resource'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1853:in `to_trans'
/usr/lib/ruby/site_ruby/1.8/puppet/type/file.rb:701:in `to_trans'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1878:in `to_resource'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:203:in `uniqueness_key'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:83:in `add_resource'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:72:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:72:in `add_resource'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:561:in `to_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:531:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:531:in `to_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:468:in `to_ral'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:117:in `convert_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:112:in `retrieve_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:143:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
/usr/lib/ruby/1.8/sync.rb:230:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:103:in `with_client'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:37:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:171:in `call'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:171:in `controlled_run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:35:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:114:in `onetime'
/usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:88:in `run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:300:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:397:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:300:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:55:in `execute'
/usr/bin/puppet:4
err: Could not run Puppet configuration client: Could not retrieve information 
from source(s) puppet:///modules/site-apache/vhosts.d/foo.bar.ch/bar.ch.conf, 
puppet:///modules/site-apache/vhosts.d//bar.conf, 
puppet:///modules/site-apache/vhosts.d/CentOS.Final/bar.ch.conf, 
puppet:///modules/site-apache/vhosts.d/CentOS/bar.ch.conf, 
puppet:///modules/site-apache/vhosts.d/bar.ch.conf, 
puppet:///modules/apache/vhosts.d/CentOS.Final/bar.ch.conf, 
puppet:///modules/apache/vhosts.d/CentOS/bar.ch.conf, 
puppet:///modules/apache/vhosts.d/bar.ch.conf at 
/srv/puppet/development/modules/public/apache/manifests/vhost/file.pp:72
#
</pre>

In my opinion only the given resource should fail as it would during apply-mode 
and not abort the complete puppet run.


-- 
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