Project

General

Profile

Actions

Bug #21184

open

Bonded provision and primary interface causes DHCP duplication

Added by Trey Dockendorf over 6 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Network
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

I am adding a host that has a bond as the primary and provision interface. For record keeping I add the slave interfaces with just their interface name and MAC address defined (managed unchecked). When the host is created it seems Foreman is sending the DHCP proxy the same command twice [1]. The logs for the proxy show the omshell commands are duplicated [1] which causes an error in Foreman [2]. The only way to add this host is by modifying /var/lib/dhcpd/dhcpd.leases, deleting this new host's lines, then restarting dhcpd. Once that modification is made I'm able to add the host. Looking at the items added to DHCP it looks like both interfaces for the bond are added to DHCP despite the actual interfaces being unmanaged in Foreman. This operation is not something I've attempted (bonded host) since around 1.12, and it worked back then.

As a test I deleted the host and recreated but this time I did not add interfaces for the bond slave interfaces. I only added bond0 interface and the BMC interface, and receive no errors. Having the slave interfaces defined and each of their MAC addresses added to DHCP does make sense, but seems to cause some sort of duplication.

As yet another test I took the successful host without slaves defined and went back and added the non-managed slaves and get similar errors.

[1]:
, [2017-10-03T16:29:32.529539 ] INFO -- : 10.20.0.1 - - [03/Oct/2017:16:29:32 -0400] "GET /dhcp/10.16.0.0/ip/10.16.2.2 HTTP/1.1" 404 48 0.0008

D, [2017-10-03T16:29:32.570113 ] DEBUG -- : close: 10.20.0.1:39320
D, [2017-10-03T16:29:32.633139 ] DEBUG -- : accept: 10.20.0.1:39322
D, [2017-10-03T16:29:32.634593 ] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2017-10-03T16:29:32.635648 ] DEBUG -- : verifying remote client 10.20.0.1 against trusted_hosts ["foreman.<DOMAIN>"]
D, [2017-10-03T16:29:32.635952 ] DEBUG -- : Ignoring duplicates for macs: ["D0:94:66:0A:84:8D", "D0:94:66:0A:84:8E"]
D, [2017-10-03T16:29:32.641416 ] DEBUG -- : omshell: executed - set name = "ufm02.<DOMAIN>-01"
D, [2017-10-03T16:29:32.641507 ] DEBUG -- : nil
D, [2017-10-03T16:29:32.641564 ] DEBUG -- : omshell: executed - set ip-address = 10.20.2.2
D, [2017-10-03T16:29:32.641599 ] DEBUG -- : nil
D, [2017-10-03T16:29:32.641638 ] DEBUG -- : omshell: executed - set hardware-address = d0:94:66:0a:84:8d
D, [2017-10-03T16:29:32.641699 ] DEBUG -- : nil
D, [2017-10-03T16:29:32.641737 ] DEBUG -- : omshell: executed - set hardware-type = 1
D, [2017-10-03T16:29:32.641771 ] DEBUG -- : nil
D, [2017-10-03T16:29:32.641920 ] DEBUG -- : omshell: executed - set statements = "filename = \"pxelinux.0\"; next-server = c0:94:f7:1c; option host-name = \"ufm02.<DOMAIN>\";"
D, [2017-10-03T16:29:32.641968 ] DEBUG -- : nil
D, [2017-10-03T16:29:32.642031 ] DEBUG -- : omshell: executed - create
D, [2017-10-03T16:29:32.642074 ] DEBUG -- : nil
D, [2017-10-03T16:29:32.659846 ] DEBUG -- : caught :modify event on /var/lib/dhcpd/dhcpd.leases.
D, [2017-10-03T16:29:32.662395 ] DEBUG -- : Added a reservation: 10.20.2.2:d0:94:66:0a:84:8d:ufm02.<DOMAIN>-01
D, [2017-10-03T16:29:32.664551 ] DEBUG -- : Added DHCP reservation for ufm02.<DOMAIN>-01 (10.20.2.2 / d0:94:66:0a:84:8d)
I, [2017-10-03T16:29:32.664916 ] INFO -- : 10.20.0.1 - - [03/Oct/2017:16:29:32 -0400] "POST /dhcp/10.20.0.0 HTTP/1.1" 200 - 0.0297

D, [2017-10-03T16:29:32.665769 ] DEBUG -- : close: 10.20.0.1:39322
D, [2017-10-03T16:29:32.690018 ] DEBUG -- : accept: 10.20.0.1:39324
D, [2017-10-03T16:29:32.691299 ] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2017-10-03T16:29:32.692231 ] DEBUG -- : verifying remote client 10.20.0.1 against trusted_hosts ["foreman.<DOMAIN>"]
D, [2017-10-03T16:29:32.692588 ] DEBUG -- : Ignoring duplicates for macs: ["d0:94:66:0a:84:8d", "D0:94:66:0A:84:8E"]
D, [2017-10-03T16:29:32.697085 ] DEBUG -- : omshell: executed - set name = "ufm02.<DOMAIN>-02"
D, [2017-10-03T16:29:32.697180 ] DEBUG -- : nil
D, [2017-10-03T16:29:32.697261 ] DEBUG -- : omshell: executed - set ip-address = 10.20.2.2
D, [2017-10-03T16:29:32.697317 ] DEBUG -- : nil
D, [2017-10-03T16:29:32.697367 ] DEBUG -- : omshell: executed - set hardware-address = d0:94:66:0a:84:8d
D, [2017-10-03T16:29:32.697403 ] DEBUG -- : nil
D, [2017-10-03T16:29:32.697444 ] DEBUG -- : omshell: executed - set hardware-type = 1
D, [2017-10-03T16:29:32.697478 ] DEBUG -- : nil
D, [2017-10-03T16:29:32.697630 ] DEBUG -- : omshell: executed - set statements = "filename = \"pxelinux.0\"; next-server = c0:94:f7:1c; option host-name = \"ufm02.<DOMAIN>\";"
D, [2017-10-03T16:29:32.697680 ] DEBUG -- : nil
D, [2017-10-03T16:29:32.697720 ] DEBUG -- : omshell: executed - create
D, [2017-10-03T16:29:32.697751 ] DEBUG -- : nil
E, [2017-10-03T16:29:32.713313 ] ERROR -- : Omshell failed:

obj: <null>

, > obj: host
, > obj: host
, name = "ufm02.<DOMAIN>-02"
, > obj: host
, name = "ufm02.<DOMAIN>-02"
, ip-address = 0a:14:02:02
, > obj: host
, name = "ufm02.<DOMAIN>-02"
, ip-address = 0a:14:02:02
, hardware-address = d0:94:66:0a:84:8d
, > obj: host
, name = "ufm02.<DOMAIN>-02"
, ip-address = 0a:14:02:02
, hardware-address = d0:94:66:0a:84:8d
, hardware-type = 1
, > obj: host
, name = "ufm02.<DOMAIN>-02"
, ip-address = 0a:14:02:02
, hardware-address = d0:94:66:0a:84:8d
, hardware-type = 1
, statements = "filename = "pxelinux.0"; next-server = c0:94:f7:1c; option host-name = "ufm02.<DOMAIN>";"
, > can't open object: key conflict
, obj: host
, name = "ufm02.<DOMAIN>-02"
, ip-address = 0a:14:02:02
, hardware-address = d0:94:66:0a:84:8d
, hardware-type = 1
, statements = "filename = "pxelinux.0"; next-server = c0:94:f7:1c; option host-name = "ufm02.<DOMAIN>";"
, >
E, [2017-10-03T16:29:32.713575 ] ERROR -- : Hardware address conflict.
D, [2017-10-03T16:29:32.713617 ] DEBUG -- : Hardware address conflict. (Proxy::DHCP::Collision)
/usr/share/foreman-proxy/modules/dhcp_common/isc/omapi_provider.rb:95:in `report'
/usr/share/foreman-proxy/modules/dhcp_common/isc/omapi_provider.rb:80:in `om_disconnect'
/usr/share/foreman-proxy/modules/dhcp_common/isc/omapi_provider.rb:54:in `om_add_record'
/usr/share/foreman-proxy/modules/dhcp_common/isc/omapi_provider.rb:30:in `add_record'
/usr/share/foreman-proxy/modules/dhcp/dhcp_api.rb:96:in `block in <class:DhcpApi>'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `block in compile!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `[]'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (3 levels) in route!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:994:in `route_eval'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (2 levels) in route!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1015:in `block in process_route'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `catch'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `process_route'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:973:in `block in route!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `each'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `route!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1085:in `block in dispatch!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082:in `dispatch!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `block in call!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `call!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:895:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/commonlogger.rb:33:in `call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:219:in `call'
/usr/share/foreman-proxy/lib/proxy/log.rb:109:in `call'
/usr/share/foreman-proxy/lib/proxy/request_id_middleware.rb:9:in `call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/nulllogger.rb:9:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/show_exceptions.rb:25:in `call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:182:in `call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:2013:in `call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `block in call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1787:in `synchronize'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/builder.rb:153:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
/usr/share/ruby/webrick/httpserver.rb:138:in `service'
/usr/share/ruby/webrick/httpserver.rb:94:in `run'
/usr/share/ruby/webrick/server.rb:295:in `block in start_thread'
I, [2017-10-03T16:29:32.714071 ] INFO -- : 10.20.0.1 - - [03/Oct/2017:16:29:32 -0400] "POST /dhcp/10.20.0.0 HTTP/1.1" 409 26 0.0222

[2]:
Create DHCP Settings for ufm02.<DOMAIN> task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::Conflict]: 409 Conflict) for proxy https://names1.&lt;DOMAIN&gt;:8443/dhcp


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #25051: Creating an bond interface with slaves results in "Unable to set DHCP entry ([RestClient::Conflict]: 409 Conflict)"DuplicateActions
Actions

Also available in: Atom PDF