Bug #18209

Cannot destroy host if DHCP record is found but is not a lease

Added by Daniel Lobato Garcia 10 months ago. Updated 9 months ago.

Status:Ready For Testing
Priority:Normal
Assigned To:Daniel Lobato Garcia
Category:DHCP
Target version:Foreman - Team Daniel - Iteration 9
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/smart-proxy/pull/499
Story points-
Velocity based estimate-

Description

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.

History

#1 Updated by The Foreman Bot 10 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/smart-proxy/pull/499 added

#2 Updated by Daniel Lobato Garcia 10 months ago

  • Target version set to Team Brad - Iteration 11

#3 Updated by Brad Buckingham 9 months ago

  • Target version deleted (Team Brad - Iteration 11)

#4 Updated by Daniel Lobato Garcia 9 months ago

  • Target version set to Team Daniel - Iteration 9

Also available in: Atom PDF