Issue #5433 has been reported by Daniel Grafe.
----------------------------------------
Bug #5433: Manually importing manifests + autoloading the same manifests is now
failing
https://projects.puppetlabs.com/issues/5433
Author: Daniel Grafe
Status: Closed
Priority: Normal
Assignee:
Category:
Target version:
Affected Puppet version: 2.6.3
Keywords:
Branch:
We are using a few puppet modules containing several manifests. These modules
are implementing general use cases like network, vga, services and the names of
these modules are the first components of our namespaces. The manifests inside
of these modules are implementing the use cases in more detail and are thus
adding more components to the namespaces. And we have situations where the lazy
parser can't guess the file to autoload by using tokens from the namespace.
That was not a problem until upgrading to 2.6.3. We were just doing an **import
"*.pp"** in every init.pp file to make sure all of our manifests are known.
This is now causing problems because manually importing a manifests that would
also be autoloaded is now giving, for instance, a "Could not find class
<classnam>" when including classes defined in that manifests.
Minimal example:
$MODULE_PATH/bug/manifests/init.pp
|-demo.pp
|-demo2.pp
init.pp:
import "*.pp"
class bug {
}
demo.pp (would be autoloaded):
class bug::demo {
notice("bug::demo")
}
demo2.pp (no autoloading, must be imported):
class bug::no_autoloading {
notice("bug::notautoloading")
}
When doing an **include bug::demo** in one of the nodes we get "Could not find
class bug::demo at....". The same error will be thrown when importing directly
with **import "demo.pp**.
But importing only the manifest that will not be autoloaded with **import
"demo2.pp"** works perfectly.
Our problem: Our previously running code was failing because we were doing the
convenient **import "*.pp"** in every init.pp manifest just to be sure that we
have all manifests available.
--
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.