Cannot destroy host if DHCP record is found but is not a lease
|Status:||Ready For Testing|
|Assigned To:||Daniel Lobato Garcia|
|Target version:||Foreman - Team Daniel - Iteration 9|
|Found in release:||Pull request:||https://github.com/theforeman/smart-proxy/pull/499|
|Velocity based estimate||-|
When you try to destroy a DHCP record in Libvirt, it's possible that the record is found but it's not in the list of leased_ips.
In such case an error like this shows up:
#=> #<Libvirt::Error: Call to virNetworkUpdate failed: Requested operation is not valid: couldn't locate a matching dhcp host entry in network 'vagrant-libvirt'>
To avoid it, let's return a 404 in case the record is not in the list of leased ips.