Issue #11339 has been updated by Justin Honold.
I don't think inclusion should result in specific class ordering, I think
specific class ordering should result in specific class ordering...
Class['foo::one'] -> Class['foo::two'] -> Class['foo::three']
This wasn't picked up on the first run, but was on the second run, and each run
afterward. The bug was filed in 2011, though. Since then, I've been putting
such stanzas inside the class itself. I also haven't had cause to test it
since then, but perhaps it was related to being in the global scope.
----------------------------------------
Bug #11339: Class ordering bug?
https://projects.puppetlabs.com/issues/11339#change-69308
Author: Justin Honold
Status: Closed
Priority: Normal
Assignee:
Category: language
Target version: 2.7.x
Affected Puppet version: 2.7.9
Keywords:
Branch:
Using Puppet 2.7.9 on CentOS 6 with Ruby 1.8.7.
"foo" module's init.pp:
class foo {
include foo::one, foo::two, foo::three
}
Class['foo::one'] -> Class['foo::two'] -> Class['foo::three']
First I stop the Master, then start it interactively using --debug and
--no-daemonize. Then I apply on a client, without including the 'foo' class.
Next I tell it to include the 'foo' class. Results:
notice: foo::three
notice: /Stage[main]/Foo::Three/Notify[foo::three]/message: defined
'message' as 'foo::three'
notice: foo::two
notice: /Stage[main]/Foo::Two/Notify[foo::two]/message: defined 'message'
as 'foo::two'
notice: foo::one
notice: /Stage[main]/Foo::One/Notify[foo::one]/message: defined 'message'
as 'foo::one'
Three runs, then two, then one.
Here's the second run:
notice: foo::one
notice: /Stage[main]/Foo::One/Notify[foo::one]/message: defined 'message'
as 'foo::one'
notice: foo::two
notice: /Stage[main]/Foo::Two/Notify[foo::two]/message: defined 'message'
as 'foo::two'
notice: foo::three
notice: /Stage[main]/Foo::Three/Notify[foo::three]/message: defined
'message' as 'foo::three'
One, then two, then three. With the second run, I also see these corresponding
entries in the Master's debug output:
debug: Adding relationship from Class[Foo::One] to Class[Foo::Two] with
'before'
debug: Adding relationship from Class[Foo::Two] to Class[Foo::Three] with
'before'
I expected this ordering to be picked up on the first run, but it only goes on
the second and later. Bug? User error?
--
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.