Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Coremunity
-
3
-
Platform Core KANBAN
-
Bug Fix
-
If a node statement has the same name as an included class "node 'abc' { include abc }", the Puppet used to silently ignore the class, as it thought the class had already been included.
Description
Before the pull request for PUP-3167 was submitted, if a node with a regex name matched the name of of another resource (like a class), then it was possible that the two would step on each other. This is pretty clearly illustrated by the example given in the original ticket:
class foo {
|
$bar = 'one'
|
}
|
|
node /foo/ {
|
$bar = 'two'
|
include foo
|
notice("${::foo::bar}")
|
}
|
Although the issue was fixed for nodes specified with a regex, we were unable to fix the issue for all node names, since that fix would have been significantly more complicated than the one we implemented for regular expressions (see Henrik's comment on PUP-3167). As such, we need to find a way to prevent resource names for non-regex nodes and other resources from overlapping.