Issue #15106 has been updated by Ken Barber.
So this seems to be caused because of the behaviour of the file watcher
facility in Puppet that detects if a file has changed. For some reason site.pp
isn't excluded, even if it doesn't exist.
The behaviour in Puppet::Util::Loadedfile#stamp is that it returns a timestamp
based on ctime. If however the file does not exist, it uses Time.now. This
problem can be replicated if you have content that takes longer then 15 seconds
to compile. Alternatively, you can replicate this with the following
configuration item:
filetimeout = 0
Every single time I believe, but you'll need some sort of content to cause the
reparse to replicate the issue. I think, that either we remove the ability to
track files that don't exist - or we stop adding site.pp explicitly. I'm not
sure of the solution exactly as the behaviour change might cause unexpected
results.
So another workaround is to change the file timeout:
filetimeout = 60
But this is much less desirable really, the better work around is to just make
sure your site.pp exists, even if it is empty.
----------------------------------------
Bug #15106: Missing site.pp can cause error 'Cannot find definition Class'
https://projects.puppetlabs.com/issues/15106#change-65349
Author: Ken Barber
Status: Unreviewed
Priority: Normal
Assignee:
Category: compiler
Target version:
Affected Puppet version: 2.7.12
Keywords:
Branch:
In certain content scenarios, a missing site.pp can cause the error:
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Cannot find definition Class at
/etc/puppetlabs/puppet/modules/mymodule/manifests/init.pp:3 on node foobar
This can be remedied by touching the site.pp, but since site.pp is no longer
mandatory this is causing issues for users who are specifically omitting.
This is confirmed at a customer site using PE 2.5.0 running Puppet 2.7.12. This
is specifically reproducible when the user is using environments, and
apparently doesn't occur without environments.
--
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.