theforeman/foreman · error · ProxyAPI::ProxyException
Unable to retrieve unused IP
Error message
Unable to retrieve unused IP
What it means
Error "Unable to retrieve unused IP" thrown in theforeman/foreman.
Source
Thrown at app/services/proxy_api/dhcp.rb:38
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("&")
else
params = ""
end
parse get("#{subnet.network}/unused_ip", query: params)
rescue => e
raise ProxyException.new(url, e, N_("Unable to retrieve unused IP"))
end
# Retrieves a DHCP entry for a mac
# [+subnet+] : String in dotted decimal format
# [+mac+] : String in coloned sextuplet format
# Returns : Hash or false
def record(subnet, mac)
response = parse(get("#{subnet}/mac/#{mac}"))
attrs = response.merge(:network => subnet, :proxy => self)
if response.keys.grep(/Sun/i).empty?
Net::DHCP::Record.new attrs
else
Net::DHCP::SparcRecord.new attrs
end
rescue RestClient::ResourceNotFound
nil
rescue => e
raise ProxyException.new(url, e, N_("Unable to retrieve DHCP entry for %s"), mac)View on GitHub (pinned to 6b05625475)
When it happens
Trigger: Thrown at app/services/proxy_api/dhcp.rb:38 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/9f6311a551ca8d4f.
Report an issue: GitHub.