Unable to delete/destroy host because the remote smart proxy is unavailable

Problem:
Trying to delete or destroy a host managed by by a remote smart proxy. However the smart proxy VM has been nuked… The delete/destroy process tries to reach out to the smart proxy which fails and the host is not deleted/destroyed…
How can I force the deletion of the host?

2023-04-20T10:30:15 [W|app|] Scoped order is ignored, it's forced to be batch order.
2023-04-20T10:30:56 [W|app|c25dc9c8] Remove DHCP Settings for admin01.tech.sys task failed with the following error: ERF12-5139 [ProxyAPI::ProxyException]: Unable to detect TFTP boot server ([RestClient::Exceptions::OpenTimeout]: Timed out connecting to server) for proxy https://foremansmartpxy01.tech.sys:9090/tftp
2023-04-20T10:30:56 [I|app|c25dc9c8] Backtrace for 'Remove DHCP Settings for admin01.tech.sys task failed with the following error: ERF12-5139 [ProxyAPI::ProxyException]: Unable to detect TFTP boot server ([RestClient::Exceptions::OpenTimeout]: Timed out connecting to server) for proxy https://foremansmartpxy01.tech.sys:9090/tftp' error (ProxyAPI::ProxyException): ERF12-5139 [ProxyAPI::ProxyException]: Unable to detect TFTP boot server ([RestClient::Exceptions::OpenTimeout]: Timed out connecting to server) for proxy https://foremansmartpxy01.tech.sys:9090/tftp
 c25dc9c8 | /usr/share/foreman/app/services/proxy_api/tftp.rb:50:in `rescue in bootServer'
 ...
 ...
  c25dc9c8 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2023-04-20T10:30:56 [W|app|c25dc9c8] Rolling back due to a problem: [#<Orchestration::Task:0x00007fc769a35740 @name="Remove DHCP Settings for admin01.tech.sys", @id="dhcp_remove_00:50:56:9a:be:91", @status="failed", @priority=5, @action=[#<Nic::Managed id: 752, mac: "00:50:56:9a:be:91", ip: "10.78.200.20", type: "Nic::Managed", name: "admin01.tech.sys", host_id: 411, subnet_id: 61, domain_id: 6, attrs: {}, created_at: "2021-08-06 08:26:59", updated_at: "2021-08-06 09:00:30", provider: nil, username: nil, password: nil, virtual: false, link: true, identifier: "eth0", tag: "", attached_to: "", managed: true, mode: "balance-rr", attached_devices: "", bond_options: "", primary: true, provision: true, compute_attributes: {}, execution: true, ip6: nil, subnet6_id: nil>, :del_dhcp], @created=1681986596.281404, @timestamp=2023-04-20 10:30:56.289630494 UTC>]
2023-04-20T10:30:56 [I|app|c25dc9c8] Completed 200 OK in 60333ms (Views: 8.8ms | ActiveRecord: 61.4ms | Allocations: 42909)

Expected outcome:

Foreman and Proxy versions:
Foreman 3.3.1
Katello 4.5.1
Smart Proxy 3.3.1

Foreman and Proxy plugin versions:

Distribution and version:
CentOS 7.9

Other relevant data:

Which functionality did the deleted smart-proxy provide? If it was just DHCP management (which failes in your log), you might be able to get away with either:

  • replacing the subnet’s DHCP smart-proxy to another smart-proxy that can manage that subnet
  • Changing the subnet’s IPAM mode to “None” if the entire site got nuked and you don’t need that subnet anymore
  • setting the hosts interfaces to unmanaged (edit the host → NICs → edit the NIC → uncheck the “managed” checkbox)

If the smart-proxy provided more functionality for the host, additional steps might be required

Thank you @areyus
That worked

setting the hosts interfaces to unmanaged (edit the host → NICs → edit the NIC → uncheck the “managed” checkbox)
1 Like