Issue #19308 has been updated by Charlie Sharpsteen.
The problem here appears to be that the `plugins` mount returns an error for
the `find` method if no subpath is given:
<pre>
[1] pry(main)> require 'puppet'
=> true
[3] pry(main)> Puppet.settings.preferred_run_mode = :agent
=> :agent
[4] pry(main)> Puppet.initialize_settings
=> true
[6] pry(main)> clog = Puppet::Resource::Catalog.new
=> #<Puppet::Resource::Catalog:0x00000004c23ef0
@aliases={},
@applying=false,
@classes=[],
@downstream_from={},
@host_config=true,
@in_to={},
@out_from={},
@relationship_graph=nil,
@resource_table={},
@transient_resources=[],
@upstream_from={}>
[7] pry(main)> clog.host_config = false
=> false
[8] pry(main)> clog.environment = 'production'
=> "production"
[10] pry(main)> plugins = Puppet::Type.type(:file).new({:path =>
'/var/lib/puppet/lib', :source => 'puppet://puppetmaster.boxnet/plugins'})
=> File[/var/lib/puppet/lib]
[11] pry(main)> clog.add_resource(plugins)
=> nil
[12] pry(main)> plugins.parameters[:source].metadata
Puppet::Error: Could not retrieve information from environment production
source(s) puppet://puppetmaster.boxnet/plugins
from /puppetlabs/puppet/lib/puppet/util/errors.rb:96:in `fail'
</pre>
During catalog application, Puppet invokes a method called `eval_generate` on
resources that will retrieve metadata by calling `search` on the Plugin mount.
If the plugin path is completely empty, the master will return metadata for the
first directory on the path. If that directory is a symlink, then the metadata
gets discarded by the agent for some reason which triggers a call to `find`
later on in compilation which errors out as described above.
Not quite sure where the exact problem is, but getting closer.
----------------------------------------
Bug #19308: `puppet agent` with Ubuntu packages generates spurious errors if
puppet master's module path includes a symlink
https://projects.puppetlabs.com/issues/19308#change-91652
* Author: Owen Jacobson
* Status: Investigating
* Priority: Normal
* Assignee: Charlie Sharpsteen
* Category:
* Target version:
* Affected Puppet version: 3.1.0
* Keywords:
* Branch:
----------------------------------------
Steps to reproduce:
<pre>
# Set up a new, clean puppet master.
# Replace @/etc/puppet/modules@ with a symlink to an empty directory.
# Run `puppet agent --test`.
</pre>
Expected results: `puppet agent` exits successfully, like it does for an empty
@modules@ directory with the default (empty) @manifests@ directory.
Actual results:
<pre>
Info: Retrieving plugin
Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve
information from environment production source(s)
puppet://puppet.example.com/plugins
Info: Caching catalog for puppet.example.com
Info: Applying configuration version '1361052214'
Notice: Finished catalog run in 0.12 seconds
</pre>
--
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 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-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.