theforeman/foreman · error · Foreman::Exception

Neither disk nor partition table defined for host

Error message

Neither disk nor partition table defined for host

What it means

Error "Neither disk nor partition table defined for host" thrown in theforeman/foreman.

Source

Thrown at app/models/host/managed.rb:433

                                content: disk.tr("\r", ''))
                            elsif ptable.present?
                              Foreman::Renderer::Source::Database.new(ptable)
                            end
  end

  apipie :method, 'Returns the host rendered partition table' do
    desc 'It either uses custom partition table specified on host object itself
         or the one assigned as a partition table via operating system'
    raises error: Foreman::Exception, desc: 'If custom partition table was not specified and no partition table is assigned to host operating system family'
    returns String, desc: 'Evaluated partition table'
    example '@host.diskLayout # =>
"zerombr
clearpart --all --initlabel
autopart"', desc: 'to render the content of host partition table'
    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'
  end
  def diskLayout
    raise Foreman::Exception, 'Neither disk nor partition table defined for host' unless disk_layout_source
    scope = Foreman::Renderer.get_scope(host: self, source: disk_layout_source)
    Foreman::Renderer.render(disk_layout_source, scope)
  end

  # reports methods
  def error_count
    %w[failed failed_restarts].sum { |f| status f }
  end

  def no_report
    last_report.nil? || last_report < Time.now.utc - origin_interval.minutes && enabled?
  end

  def origin_interval
    SettingRegistry.instance.find(:"#{last_report.origin.downcase}_interval")&.value || 0
  end

  def disabled?

View on GitHub (pinned to 6b05625475)

When it happens

Trigger: Thrown at app/models/host/managed.rb:433 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of theforeman/foreman@6b05625475 (2026-08-23). Data as JSON: /api/errors/ce945d99eee3b461. Report an issue: GitHub.