Project

General

Profile

Bug #6377

Incorrect dhcp providers server virsh.rb loadSubnetData

Added by Lukas Zapletal over 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
DHCP
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

The commit fixes dhcp server virsh.rb provider. Upon loading the
contents of the libvirt network XML and parsing for DHCP reservations a
check is performed on the kind of records that are being loaded. The
dhcp_api.rb 'delete' helper tries to load network entries of the
'reservation' kind, the helper uses modules/dhcp/dhcp/subnet.rb to
validate on that and filter out entries.

In contrary to other providers (ms, isc) the loadSubnetData method of
virsh.rb was dealing out "Proxy::DHCP::Record" for any entry it was able
to discover, but should have been instantiating
"Proxy::DHCP::Reservation" to pass the validation.

This resulted in "ERROR -- : Record
x.x.x.x/xx:xx:xx:xx:xx:xx not found" as well as leaves in the libvirt
network XML. This prevented the creation of VMs with the same addresses,
since leftover DHCP entries conflicted with the new ones.

https://github.com/theforeman/smart-proxy/pull/164


Related issues

Related to Smart Proxy - Bug #6718: Unused IP request with virsh errors with: unable to retrive virsh info: Must define a nameRejected2014-07-22

Associated revisions

Revision 1fb2109b (diff)
Added by Vincent Kramar over 6 years ago

fixes #6377 - incorrect dhcp providers server virsh.rb loadSubnetData

The commit fixes dhcp server virsh.rb provider. Upon loading the
contents of the libvirt network XML and parsing for DHCP reservations a
check is performed on the kind of records that are being loaded. The
dhcp_api.rb 'delete' helper tries to load network entries of the
'reservation' kind, the helper uses modules/dhcp/dhcp/subnet.rb to
validate on that and filter out entries.

In contrary to other providers (ms, isc) the loadSubnetData method of
virsh.rb was dealing out "Proxy::DHCP::Record" for any entry it was able
to discover, but should have been instantiating
"Proxy::DHCP::Reservation" to pass the validation.

This resulted in "ERROR -- : Record
x.x.x.x/xx:xx:xx:xx:xx:xx not found" as well as leaves in the libvirt
network XML. This prevented the creation of VMs with the same addresses,
since leftover DHCP entries conflicted with the new ones.

History

#1 Updated by Dominic Cleal over 6 years ago

  • Target version set to 1.8.1
  • Legacy Backlogs Release (now unused) set to 18

#2 Updated by Anonymous over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Bryan Kearney over 6 years ago

  • Bugzilla link set to 1117835

#4 Updated by Dominic Cleal over 6 years ago

  • Legacy Backlogs Release (now unused) changed from 18 to 10

#5 Updated by Dominic Cleal over 6 years ago

  • Related to Bug #6718: Unused IP request with virsh errors with: unable to retrive virsh info: Must define a name added

Also available in: Atom PDF