{"record":{"id":"d869a777f19bd565","repo":"theforeman/foreman","slug":"template-s-was-not-found","errorCode":null,"errorMessage":"Template '%s' was not found","messagePattern":"Template '(.+?)' was not found","errorType":"exception","errorClass":"Foreman::Exception","httpStatus":null,"severity":"error","filePath":"app/models/concerns/orchestration/tftp.rb","lineNumber":76,"sourceCode":"    default_pxe_render(kind)\n  end\n\n  protected\n\n  def build_pxe_render(kind)\n    template = host.provisioning_template({:kind => kind})\n    return unless template.present?\n    host.render_template(template: template)\n  rescue => e\n    failure _(\"Unable to render %{kind} template '%{name}': %{e}\") % { :kind => kind, :name => template.try(:name), :e => e }, e\n  end\n\n  def default_pxe_render(kind)\n    template_name = host.local_boot_template_name(kind)\n    # Safely return in case there's no template configured for the specified kind\n    return unless template_name.present?\n    template = ProvisioningTemplate.find_by_name(template_name)\n    raise Foreman::Exception.new(N_(\"Template '%s' was not found\"), template_name) unless template\n    host.render_template(template: template)\n  rescue => e\n    failure _(\"Unable to render '%{name}' template: %{e}\") % { :name => template_name, :e => e }, e\n  end\n\n  # Adds the host to the forward and reverse TFTP zones\n  # +returns+ : Boolean true on success\n  def setTFTP(kind)\n    content = generate_pxe_template(kind)\n    if content\n      logger.info \"Deploying TFTP #{kind} configuration for #{host.name}\"\n      each_unique_feasible_tftp_proxy do |proxy|\n        mac_addresses_for_provisioning.each do |mac_addr|\n          proxy.set(kind, mac_addr, {\n                      :pxeconfig => content,\n                      :targetos => host.operatingsystem.name.downcase,\n                      :release => host.operatingsystem.release,\n                      :arch => host.arch.name,","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/theforeman/foreman/blob/6b05625475cfe6aac31a88f8c8ee6e62e4efe620/app/models/concerns/orchestration/tftp.rb#L58-L94","documentation":"Error \"Template '%s' was not found\" thrown in theforeman/foreman.","triggerScenarios":"Thrown at app/models/concerns/orchestration/tftp.rb:76 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6b05625475cfe6aac31a88f8c8ee6e62e4efe620","analyzedAt":"2026-08-23T17:46:34.094Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}