puppetlabs/puppet · error · ArgumentError
Could not find stage %{stage} specified by %{resource}
Error message
Could not find stage %{stage} specified by %{resource} What it means
Error "Could not find stage %{stage} specified by %{resource}" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/parser/resource.rb:64
def eachparam
@parameters.each do |_name, param|
yield param
end
end
def environment
scope.environment
end
# Process the stage metaparameter for a class. A containment edge
# is drawn from the class to the stage. The stage for containment
# defaults to main, if none is specified.
def add_edge_to_stage
return unless class?
stage = catalog.resource(:stage, self[:stage] || (scope && scope.resource && scope.resource[:stage]) || :main)
unless stage
raise ArgumentError, _("Could not find stage %{stage} specified by %{resource}") % { stage: self[:stage] || :main, resource: self }
end
self[:stage] ||= stage.title unless stage.title == :main
catalog.add_edge(stage, self)
end
# Retrieve the associated definition and evaluate it.
def evaluate
return if evaluated?
Puppet::Util::Profiler.profile(_("Evaluated resource %{res}") % { res: self }, [:compiler, :evaluate_resource, self]) do
@evaluated = true
if builtin_type?
devfail "Cannot evaluate a builtin type (#{type})"
elsif resource_type.nil?
self.fail "Cannot find definition #{type}"
else
finish_evaluation() # do not finish completely (as that destroys Sensitive data)View on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/parser/resource.rb:64 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/5d220dbad7d50324.
Report an issue: GitHub.