Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
PUP 6.11.0
-
None
-
Froyo
-
Needs Assessment
-
Bug Fix
-
-
Needs Assessment
Description
Puppet Version: 6.11.1
Puppet Server Version: N/A
OS Name/Version: Windows 10
As part of https://github.com/puppetlabs/puppet/pull/7754 the Puppet Stack Trace feature was modified to use an independent stack trace storing mechanism, however this may have introduced an unforseen behaviour change.
Previously users would be able to trace how Puppet has traversed the invocations within a Manifest file. For example int the given manifest
class nest1 {
|
fail('somethinng')
|
}
|
|
class nest2 {
|
include nest1
|
}
|
|
include nest2
|
Previously in Puppet 6.10.1, we can see a puppet apply <manifest> --trace gives
Error: Evaluation Error: Error while evaluating a Function Call, somethinng (file: C:/Source/puppet/tmp/test.pp, line: 2, column: 3) on node glenn.sarti-r90qu2hx
|
C:/Source/puppet/lib/puppet/parser/functions/fail.rb:10:in `block in get_binding'
|
C:/Source/puppet/lib/puppet/parser/functions.rb:206:in `block (2 levels) in newfunction'
|
...
|
C:/Source/puppet/tmp/test.pp:2:in `block in call_function'
|
...
|
C:/Source/puppet/tmp/test.pp:6:in `block in call_function'
|
...
|
C:/Source/puppet/tmp/test.pp:9:in `block in call_function'
|
...
|
C:/Source/puppet/tmp/test.pp:in `stack'
|
...
|
We can see the various includes and Puppet call stack.
However in Puppet 6.11.1 we get:
...
|
Error: Evaluation Error: Error while evaluating a Function Call, somethinng (file: C:/Source/puppet/tmp/test.pp, line: 2, column: 3) on node glenn.sarti-r90qu2hx
|
And that's it. The call stack within Puppet is no longer available. Now, that's probably due to Puppet no longer using the Ruby stack to store the information, however...
Due to the way the stack is implemented, the stack is cleared (via the `shift` in https://github.com/puppetlabs/puppet/blob/1356f58d66/lib/puppet/pops/puppet_stack.rb#L44-L46) BEFORE any error trapping can occur.
Effectively, the Puppet Stack is no longer available during exceptions, only the exception location, which seems a concerning.
Attachments
Issue Links
- relates to
-
PUP-10170 Do not store Puppet stack within Ruby stack / Backport master work to 5.5.x
-
- Resolved
-