Issue #4542 has been updated by Markus Roberts.
Hmmm. So my testing is showing the reported bug (included classes not winding
up in the right stage) as being fixed. I add a diagnostic line:
<pre>
diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb
index bb4186d..b2d3856 100644
--- a/lib/puppet/application/apply.rb
+++ b/lib/puppet/application/apply.rb
@@ -125,6 +125,8 @@ class Puppet::Application::Apply < Puppet::Application
# And apply it
transaction = catalog.apply
+ catalog.resources.each { |r| p [r.title,r.parameters[:stage].value] if
r.parameters[:stage]}
+
configurer.execute_postrun_command
status = 0
</pre>
And get the output:
<pre>
notice: Scope(Class[Bar]): Bar!
notice: Scope(Class[Foo]): Foo!
["Class[Foo]", "first"]
["Class[Main]", :main]
["Class[Bar]", :main]
</pre>
With bar now in the main stage as required.
However, it is _also_ showing (on some runs at least) that Bar (in main) is
being processed before Foo (in first), so there appears to be an additional
problem beyond just not getting the stage set.
----------------------------------------
Bug #4542: Classes included with 'include' do not end up in the correct stage
http://projects.puppetlabs.com/issues/4542
Author: R.I. Pienaar aka Volcane
Status: Investigating
Priority: Normal
Assignee: Markus Roberts
Category:
Target version:
Affected version: 2.6.1rc3
Keywords:
Branch: http://github.com/MarkusQ/puppet/tree/ticket/2.6.x/4542
give the manifest:
<pre>
stage { "first": before => Stage[main] }
class foo {
notice("Foo!")
}
class bar {
notice("Bar!")
}
class{"foo": stage => "first"}
include bar
</pre>
And the documentation:
<blockquote>
"By default there is only one stage named 'main' and all classes are
automatically associated with this stage. Unless explicitly stated, a class
will be associated with the main stage"
</blockquote>
I would expect the foo class to be realized first, I get though:
<pre>
notice: Scope(Class[Bar]): Bar!
notice: Scope(Class[Foo]): Foo!
</pre>
If instead of 'include bar' I do:
<pre>
class{"bar": stage => "main"}
</pre>
I get:
<pre>
notice: Scope(Class[Foo]): Foo!
notice: Scope(Class[Bar]): Bar!
</pre>
So I conclude that 'include bar' isnt putting the class in the main stage which
I think is the correct behavior. I might be missing something, first time
playing with stages.
--
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.