Problem:
Upon Create Host submission, getting “No DHCP record for MAC” from the proxy.log
Expected outcome:
Foreman and Proxy versions:
foreman-2.0.3-1.el7.noarch
Foreman and Proxy plugin versions:
katello-3.15.3-1.el7.noarch
Distribution and version:
On CentOS 7 3.10.0-1127.el7.x86_64
Other relevant data:
(Names, IPs has been changed)
-
error from /var/log/foreman-proxy/proxy.log: -
2021-02-18T02:28:50 a0035bd6 [I] Started GET /tftp/serverName
2021-02-18T02:28:50 a0035bd6 [I] Finished GET /tftp/serverName with 200 (0.84 ms)
2021-02-18T02:28:50 a0035bd6 [I] Started GET /dhcp/100.100.10.64/mac/00:00:1c:09:f7:dc
2021-02-18T02:28:50 a0035bd6 [E] No DHCP record for MAC 100.100.10.64/00:00:1c:09:f7:dc found
2021-02-18T02:28:50 a0035bd6 [W] No DHCP record for MAC 100.100.10.64/00:00:1c:09:f7:dc found
Exception: No DHCP record for MAC 100.100.10.64/00:00:1c:09:f7:dc found
2021-02-18T02:28:50 a0035bd6 [I] Finished GET /dhcp/100.100.10.64/mac/00:00:1c:09:f7:dc with 404 (0.87 ms)
2021-02-18T02:28:50 a0035bd6 [I] Started GET /dhcp/100.100.10.64/ip/100.100.10.72
2021-02-18T02:28:50 a0035bd6 [E] No DHCP records for IP 100.100.10.64/100.100.10.72 found
2021-02-18T02:28:50 a0035bd6 [W] No DHCP records for IP 100.100.10.64/100.100.10.72 found
Exception: No DHCP records for IP 100.100.10.64/100.100.10.72 found
2021-02-18T02:28:50 a0035bd6 [I] Finished GET /dhcp/100.100.10.64/ip/100.100.10.72 with 404 (0.94 ms)
2021-02-18T02:28:50 a0035bd6 [I] Started POST /dhcp/100.100.10.64
2021-02-18T02:28:51 a0035bd6 [I] Finished POST /dhcp/100.100.10.64 with 200 (28.76 ms)
2021-02-18T02:28:51 a0035bd6 [I] Started GET /unattended/templateServer
2021-02-18T02:28:51 a0035bd6 [I] Finished GET /unattended/templateServer with 200 (0.33 ms)
2021-02-18T02:28:51 a0035bd6 [I] Started POST /tftp/PXELinux/00:00:1c:09:f7:dc
2021-02-18T02:28:51 a0035bd6 [I] Finished POST /tftp/PXELinux/00:00:1c:09:f7:dc with 200 (0.87 ms)
2021-02-18T02:28:51 a0035bd6 [I] Started GET /unattended/templateServer
2021-02-18T02:28:51 a0035bd6 [I] Finished GET /unattended/templateServer with 200 (0.35 ms)
2021-02-18T02:28:51 a0035bd6 [I] Started GET /unattended/templateServer
2021-02-18T02:28:51 a0035bd6 [I] Finished GET /unattended/templateServer with 200 (0.43 ms)
2021-02-18T02:28:51 a0035bd6 [I] Started POST /tftp/PXEGrub2/00:00:1c:09:f7:dc
2021-02-18T02:28:51 a0035bd6 [I] Finished POST /tftp/PXEGrub2/00:00:1c:09:f7:dc with 200 (1.12 ms)
2021-02-18T02:28:51 a0035bd6 [I] Started GET /unattended/templateServer
2021-02-18T02:28:51 a0035bd6 [I] Finished GET /unattended/templateServer with 200 (0.32 ms)
2021-02-18T02:28:51 a0035bd6 [I] Started POST /tftp/PXEGrub/00:00:1c:09:f7:dc
2021-02-18T02:28:51 a0035bd6 [I] Finished POST /tftp/PXEGrub/00:00:1c:09:f7:dc with 200 (0.94 ms)
2021-02-18T02:28:51 a0035bd6 [I] Started POST /tftp/fetch_boot_file
2021-02-18T02:28:51 a0035bd6 [I] Finished POST /tftp/fetch_boot_file with 200 (0.93 ms)
2021-02-18T02:28:51 a0035bd6 [I] Started POST /tftp/fetch_boot_file
2021-02-18T02:28:51 a0035bd6 [I] Finished POST /tftp/fetch_boot_file with 200 (0.74 ms)
2021-02-18T02:28:51 a0035bd6 [I] Started DELETE /puppet/ca/toweiie.company
2021-02-18T02:28:51 a0035bd6 [I] Finished DELETE /puppet/ca/toweiie.company with 200 (74.87 ms)
2021-02-18T02:28:51 a0035bd6 [I] Started POST /puppet/ca/autosign/toweiie.company
2021-02-18T02:28:51 a0035bd6 [I] Finished POST /puppet/ca/autosign/toweiie.company with 200 (0.69 ms) -
Smart Proxies all on single Foreman instance, except DNS is using external configured through named: -
Details
Communication status
URL
https://butters.company:9090
Version
2.0.3
Active features
-
DHCP
-
HTTPBoot
-
Logs
-
Pulp
-
Pulpcore
-
Puppet
-
Puppet CA
-
Templates
-
TFTP
[Refresh features]
Hosts managed
[2]
Failed features
No Failed Features
- DHCP is reachable: -
curl -kvs --cert /etc/foreman/client_cert.pem --key /etc/foreman/client_key.pem --cacert /etc/foreman/proxy_ca.pem https://butters.company:9090/dhcp
- About to connect() to butters.company port 9090 (#0)
- Trying 100.100.10.102…
- Connected to butters.company (100.100.10.102) port 9090 (#0)
- Initializing NSS with certpath: sql:/etc/pki/nssdb
- skipping SSL peer certificate verification
- NSS: client certificate from file
-
subject: CN=butters.company,OU=PUPPET,O=FOREMAN,ST=North Carolina,C=US
-
start date: Oct 20 02:57:52 2020 GMT
-
expire date: Jan 18 02:57:52 2038 GMT
-
common name: butters.company
-
issuer: CN=butters.company,OU=SomeOrgUnit,O=Katello,L=Raleigh,ST=North Carolina,C=US
- SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- Server certificate:
-
subject: CN=butters.company,OU=SMART_PROXY,O=FOREMAN,ST=North Carolina,C=US
-
start date: Oct 20 02:57:56 2020 GMT
-
expire date: Jan 18 02:57:56 2038 GMT
-
common name: butters.company
-
issuer: CN=butters.company,OU=SomeOrgUnit,O=Katello,L=Raleigh,ST=North Carolina,C=US
GET /dhcp HTTP/1.1
User-Agent: curl/7.29.0
Host: butters.company:9090
Accept: /
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 193
< X-Content-Type-Options: nosniff
< Server: foreman-proxy/2.0.3
< Date: Thu, 18 Feb 2021 09:20:27 GMT
< Connection: Keep-Alive
<
- Connection #0 to host butters.company left intact
[{“network”:“100.100.10.96”,“netmask”:“255.255.255.224”,“options”:{“routers”:[“100.100.10.97”]}},{“network”:“100.100.10.64”,“netmask”:“255.255.255.224”,“options”:{“routers”:[“100.100.10.65”]}}]
- Subnets configured on dhcpd.conf and Foreman GUI: -
foreman-installer. Use custom-hiera.yaml for multiple subnets.
omapi-port 7911;
default-lease-time 43200;
max-lease-time 86400;
not authoritative;
ddns-update-style none;
option domain-name “company”;
option domain-name-servers 100.100.20.10, 100.100.21.25;
option ntp-servers none;
allow booting;
allow bootp;
option fqdn.no-client-update on; # set the “O” and “S” flag bits
option fqdn.rcode2 255;
option pxegrub code 150 = text ;
required for UEFI HTTP boot
if substring(option vendor-class-identifier, 0, 10) = “HTTPClient” {
option vendor-class-identifier “HTTPClient”;
}
promote vendor in dhcpd.leases
set vendor-string = option vendor-class-identifier;
next server and filename options
next-server 100.100.10.102;
option architecture code 93 = unsigned integer 16 ;
if option architecture = 00:06 {
filename “grub2/shim.efi”;
} elsif option architecture = 00:07 {
filename “grub2/shim.efi”;
} elsif option architecture = 00:09 {
filename “grub2/shim.efi”;
} else {
filename “pxelinux.0”;
}
log-facility local7;
include “/etc/dhcp/dhcpd.hosts”;
company
subnet 100.100.10.96 netmask 255.255.255.224 {
pool
{
range 100.100.10.122 100.100.10.126;
}
option subnet-mask 255.255.255.224;
option routers 100.100.10.97;
}
subnet 100.100.10.64 netmask 255.255.255.224 {
pool
{
range 100.100.10.70 100.100.10.79;
}
option subnet-mask 255.255.255.224;
option routers 100.100.10.65;
}