Support #14792
closedforeman not sending the POST to the DHCP smart proxy
Description
When I add, delete or modify a host, changes don't get pushed into the dhcpd.leases file
I see the DHCP GET request in the foreman-proxy log, but I don't see a corresponding POST.
here is an example for when I add a new host, these lines are from the foreman-proxy proxy.log file:
D, [2016-04-24T19:06:03.966992 #22115] DEBUG -- : Added a lease record: 10.92.18.218:00:50:56:9f:12:85
D, [2016-04-24T19:06:03.967082 #22115] DEBUG -- : trying to find an ip address, we got {:from=>"10.93.2.30", :to=>"10.93.2.200"}
D, [2016-04-24T19:06:03.968455 #22115] DEBUG -- : Searching for free IP - pinging 10.93.2.33
D, [2016-04-24T19:06:05.974001 #22115] DEBUG -- : Found free IP 10.93.2.33 out of a total of 170 free IPs
I, [2016-04-24T19:06:05.974987 #22115] INFO -- : 10.93.6.77 - - [24/Apr/2016:19:06:05 +0000] "*GET /dhcp/10.93.2.0/unused_ip?mac=78:2b:cb:05:2e:d2&from=10.93.2.30&to=10.93.2.200* HTTP/1.1" 200 19 2.4588D, [2016-04-24T19:06:05.976574 #22115] DEBUG -- : close: 10.93.6.77:42280
D, [2016-04-24T19:07:09.174481 #22115] DEBUG -- : accept: 10.93.6.77:42283
D, [2016-04-24T19:07:09.178295 #22115] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2016-04-24T19:07:09.184547 #22115] DEBUG -- : require_ssl_client_verification: skipping, non-HTTPS request
I, [2016-04-24T19:07:09.185177 #22115] INFO -- : TFTP: entry for 78:2b:cb:05:2e:d2 created successfully
I, [2016-04-24T19:07:09.185641 #22115] INFO -- : 10.93.6.77 - - [24/Apr/2016:19:07:09 +0000] "POST /tftp/syslinux/78:2b:cb:05:2e:d2 HTTP/1.1" 200 - 0.0036D, [2016-04-24T19:07:09.186824 #22115] DEBUG -- : close: 10.93.6.77:42283
D, [2016-04-24T19:07:09.193574 #22115] DEBUG -- : accept: 10.93.6.77:42284
D, [2016-04-24T19:07:09.196781 #22115] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2016-04-24T19:07:09.197603 #22115] DEBUG -- : require_ssl_client_verification: skipping, non-HTTPS request
D, [2016-04-24T19:07:09.198209 #22115] DEBUG -- : Starting task: /usr/bin/wget --timeout=10 --tries=3 --no-check-certificatenv -c "http://mirrors.labs.marinsw.net/centos/6.7/os/x86_64/images/pxeboot/vmlinuz" -O "/var/lib/tftpboot/boot/CentOS-6.7-x86_64-vmlinuz": 10.93.6.77 - - [24/Apr/2016:19:07:09 +0000] "POST /tftp/fetch_boot_file HTTP/1.1" 200 - 0.0012
I, [2016-04-24T19:07:09.201186 #22115] INFO -D, [2016-04-24T19:07:09.202448 #22115] DEBUG -- : close: 10.93.6.77:42284
D, [2016-04-24T19:07:09.205451 #22115] DEBUG -- : accept: 10.93.6.77:42285
D, [2016-04-24T19:07:09.208737 #22115] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2016-04-24T19:07:09.209785 #22115] DEBUG -- : require_ssl_client_verification: skipping, non-HTTPS request
D, [2016-04-24T19:07:09.210368 #22115] DEBUG -- : Starting task: /usr/bin/wget --timeout=10 --tries=3 --no-check-certificatenv -c "http://mirrors.labs.marinsw.net/centos/6.7/os/x86_64/images/pxeboot/initrd.img" -O "/var/lib/tftpboot/boot/CentOS-6.7-x86_64-initrd.img": 10.93.6.77 - - [24/Apr/2016:19:07:09 +0000] "POST /tftp/fetch_boot_file HTTP/1.1" 200 - 0.0016
I, [2016-04-24T19:07:09.210929 #22115] INFO -D, [2016-04-24T19:07:09.213899 #22115] DEBUG -- : close: 10.93.6.77:42285
I see the GET /dhcp/10.93.2.0/unused_ip?mac=78:2b:cb:05:2e:d2&from=10.93.2.30&to=10.93.2.200, foreman gets an IP but the dhcpd.leases file is not updated
I don't know if this is a bug or a miss configuration on my part. This use to work in foreman 1.10.2
I noticed the issue today, I upgraded form 1.11.0 to 1.11.1 today (just in case)
both theforeman and the foreman-proxy are at 1.11.1
any help with be appropriated
what should I look at?
Updated by rui fernandes over 8 years ago
it appears the setting the "Boot mode" to dhcp in the subnet definition it triers the "POST"
setting the "Boot mode" to static reverts back to where the post don't happen.
interesting new behavior.
Updated by Anonymous over 8 years ago
- Category set to Orchestration
- Status changed from New to Resolved
DHCP boot mode is the default, iirc. Anyway, setting this to resolved.
Updated by Marek Hulán over 8 years ago
If the interface is configured with static IP address, is there a reason to create the record in DHCP (doing POST request)? The change was introduced in 1.11.1 since we considered such behavior as a bug.
Updated by Marek Hulán over 8 years ago
- Related to Bug #14113: DHCP orchestration ignored subnet bootmode added
Updated by Magnus Svensson over 8 years ago
The reason to create the record in DHCP is that we install over that network and want to configure the servers with static network configuration. The DHCP boot is used by the Provisioning Templates to select dhcp or static configuration for each interface.
Updated by Frank Grötzner about 8 years ago
This report seems to be related to Issue #14905 - unfortunately I don't know how to link it... :-)
Updated by Dominic Cleal about 8 years ago
- Related to Bug #14905: DHCP reservation for PXE boot not added when using static boot mode added