theforeman/foreman · error · ProxyAPI::ProxyException
Unable to retrieve DHCP subnets
Error message
Unable to retrieve DHCP subnets
What it means
Error "Unable to retrieve DHCP subnets" thrown in theforeman/foreman.
Source
Thrown at app/services/proxy_api/dhcp.rb:14
module ProxyAPI
class DHCP < ProxyAPI::Resource
def initialize(args)
@url = args[:url] + "/dhcp"
super args
end
# Retrieve the Server's subnets
# Returns: Array of Hashes or false
# Example [{"network":"192.168.11.0","netmask":"255.255.255.0"},{"network":"192.168.122.0","netmask":"255.255.255.0"}]
def subnets
parse get
rescue => e
raise ProxyException.new(url, e, N_("Unable to retrieve DHCP subnets"))
end
def subnet(subnet)
parse get(subnet)
rescue => e
raise ProxyException.new(url, e, N_("Unable to retrieve DHCP subnet"))
end
def unused_ip(subnet, mac = nil)
params = {}
params[:mac] = mac if mac.present?
if subnet.from.present? && subnet.to.present?
params[:from] = subnet.from
params[:to] = subnet.to
end
if params.any?
params = params.map { |e| e.join("=") }.join("&")View on GitHub (pinned to 6b05625475)
When it happens
Trigger: Thrown at app/services/proxy_api/dhcp.rb:14 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/f314206703d1a6c9.
Report an issue: GitHub.