Problem:
Adding a host that is assigned to a subnet managed by smart proxy throws an error.
- Create DHCP Settings for kathy-sprang.subnet1.example.org task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://smart-proxy1.subnet1.example.org:8443/dhcp
On the foreman master the following logs appear:
2024-07-16T10:09:03 [W|app|502e0303] Rolling back due to a problem: [#<Orchestration::Task:0x000055bee8309e20 @name=“Create DHCP Settings for kathy-sprang.subnet1.example.org”, @id=“dhcp_create_00:50:56:85:de:1e”, @status=“failed”, @priority=10, @action=[#<Nic::Managed id: nil, mac: “00:50:56:85:de:1e”, ip: “10.231.25.116”, type: “Nic::Managed”, name: “kathy-sprang.subnet1.example.org”, host_id: nil, subnet_id: 2, domain_id: 2, attrs: {}, created_at: nil, updated_at: nil, provider: nil, username: nil, password: nil, virtual: false, link: true, identifier: “”, tag: “”, attached_to: “”, managed: true, mode: “balance-rr”, attached_devices: “”, bond_options: “”, primary: true, provision: true, compute_attributes: {}, ip6: “”, subnet6_id: nil>, :set_dhcp], @created=1721117343.4691157, @timestamp=2024-07-16 08:09:03.588748944 UTC>]
2024-07-16T10:09:03 [E|app|502e0303] Failed to save: Create DHCP Settings for kathy-sprang.subnet1.example.org task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://smart-proxy1.subnet1.example.org:8443/dhcp
Expected outcome:
Host can be added without a problem
Foreman and Proxy versions:
3.11.0
Foreman and Proxy plugin versions:
foreman_discovery | MaaS Discovery Plugin engine for Foreman | … | 24.0.1 |
---|---|---|---|
foreman_puppet | Allow assigning Puppet environments and classes to the Foreman Hosts. | … | 6.3.0 |
Distribution and version:
Debian 11
Other relevant data:
Smart-Proxy has the following features:
Active features
- DHCP
- DNS
- Logs
- TFTP
The foreman-proxy has been installed using
foreman-installer \
--no-enable-foreman \
--no-enable-foreman-puppet \
--no-enable-foreman-cli \
--no-enable-foreman-cli-puppet \
--no-enable-puppet \
--enable-foreman-proxy \
--foreman-proxy-puppet=false \
--foreman-proxy-puppetca=false \
--foreman-proxy-dhcp=true \
--foreman-proxy-dhcp-interface=ens192 \
--foreman-proxy-dhcp-gateway=10.231.25.1 \
--foreman-proxy-dhcp-range="10.231.25.128 10.231.25.254" \
--foreman-proxy-dhcp-nameservers="10.231.25.1"