Bug #21463
closedproxy detects existing dhcp record as conflict
Description
When Foreman tries to create an already existing dhcp record, smart proxy should detect this and do nothing.
Unfortunately smart proxy detects a conflict although it should not.
D, [2017-10-25T15:25:30.976470 ] DEBUG -- : request: #<Proxy::DHCP::Reservation:0x00000003954a18 @type="reservation", @name="server.example.com", @subnet=#<Proxy::DHCP::Subnet:0x0000000253ff78 @network="172.23.82.0", @netmask="255.255.255.0", @ipaddr=#<IPAddr: IPv4:172.23.82.0/255.255.255.0>, @options={:routers=>["172.23.82.254"]}, @m=#<Monitor:0x0000000253eda8 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x0000000253ece0>>, @netmask_to_i=4294967040>, @ip="172.23.82.33", @mac="00:50:56:84:c6:59", @options={:hostname=>"server.example.com"}>
D, [2017-10-25T15:25:30.976594 ] DEBUG -- : existing: [#<Proxy::DHCP::Reservation:0x000000030d2db8 @type="reservation", @name="server.example.com", @subnet=#<Proxy::DHCP::Subnet:0x0000000253ff78 @network="172.23.82.0", @netmask="255.255.255.0", @ipaddr=#<IPAddr: IPv4:172.23.82.0/255.255.255.0>, @options={:routers=>["172.23.82.254"]}, @m=#<Monitor:0x0000000253eda8 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x0000000253ece0>>, @netmask_to_i=4294967040>, @ip="172.23.82.33", @mac="00:50:56:84:c6:59", @options={:hostname=>"server.example.com", :deleteable=>true}>]
These two records are being compared, but found not to be equal. The reason for this is, that the existing record has "options={:deleteable=>true}" while the record that should be created does not have this option.
Updated by The Foreman Bot over 7 years ago
- Status changed from New to Ready For Testing
- Assignee set to Timo Goebel
- Pull request https://github.com/theforeman/smart-proxy/pull/548 added
Updated by Timo Goebel over 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Updated by Lukas Zapletal over 7 years ago
- Related to Bug #21975: DHCP filename option is ignored added