{"record":{"id":"ce945d99eee3b461","repo":"theforeman/foreman","slug":"neither-disk-nor-partition-table-defined-for-host","errorCode":null,"errorMessage":"Neither disk nor partition table defined for host","messagePattern":"Neither disk nor partition table defined for host","errorType":"exception","errorClass":"Foreman::Exception","httpStatus":null,"severity":"error","filePath":"app/models/host/managed.rb","lineNumber":433,"sourceCode":"                                content: disk.tr(\"\\r\", ''))\n                            elsif ptable.present?\n                              Foreman::Renderer::Source::Database.new(ptable)\n                            end\n  end\n\n  apipie :method, 'Returns the host rendered partition table' do\n    desc 'It either uses custom partition table specified on host object itself\n         or the one assigned as a partition table via operating system'\n    raises error: Foreman::Exception, desc: 'If custom partition table was not specified and no partition table is assigned to host operating system family'\n    returns String, desc: 'Evaluated partition table'\n    example '@host.diskLayout # =>\n\"zerombr\nclearpart --all --initlabel\nautopart\"', desc: 'to render the content of host partition table'\n    example '<% save_to_file \"/root/ptable_debug\", @host.diskLayout %>', desc: 'A snippet that could be used to store a file in shell script or kickstart %post section to save host partition table for debugging purposes'\n  end\n  def diskLayout\n    raise Foreman::Exception, 'Neither disk nor partition table defined for host' unless disk_layout_source\n    scope = Foreman::Renderer.get_scope(host: self, source: disk_layout_source)\n    Foreman::Renderer.render(disk_layout_source, scope)\n  end\n\n  # reports methods\n  def error_count\n    %w[failed failed_restarts].sum { |f| status f }\n  end\n\n  def no_report\n    last_report.nil? || last_report < Time.now.utc - origin_interval.minutes && enabled?\n  end\n\n  def origin_interval\n    SettingRegistry.instance.find(:\"#{last_report.origin.downcase}_interval\")&.value || 0\n  end\n\n  def disabled?","sourceCodeStart":415,"sourceCodeEnd":451,"githubUrl":"https://github.com/theforeman/foreman/blob/6b05625475cfe6aac31a88f8c8ee6e62e4efe620/app/models/host/managed.rb#L415-L451","documentation":"Error \"Neither disk nor partition table defined for host\" thrown in theforeman/foreman.","triggerScenarios":"Thrown at app/models/host/managed.rb:433 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"}