Project

General

Profile

Actions

Support #15210

closed

Create DHCP Settings for <host> task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::ResourceNotFound]: 404 Resource Not Found)

Added by laxman veeturi almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
DHCP
Target version:
-
Triaged:
Fixed in Releases:
Found in Releases:

Description

DHCp proxy is not working in foreman 1.11.2. I got the following error ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::ResourceNotFound]

I configured my DHCP Settings as below

dhcpd.conf:

[root@ol07frm01 ~]# cat /etc/dhcp/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
authoritative;
allow booting;
allow bootp;

omapi-port 7911;
#Optional key:
key omapi_key {
algorithm HMAC-MD5;
         secret "F6wbnGJ6rI66sTgIWDbP2mD7uAQ8+z8A87/DGvrYimGNiROVRoDUJOYLtsF+ZeM2ZXYuctw30Bom/SwBTCq0xA==";
            }
omapi-key omapi_key;

subnet 129.135.66.0 netmask 255.255.255.0 {
# --- default gateway
      option routers      129.135.66.2;
      option subnet-mask  255.255.255.0;

      option domain-name    "lax.com";
#     option domain-name-servers  10.1.1.1, 8.8.8.8;
#     option log-servers    syslog;
#     option ntp-servers    ntp;

      range dynamic-bootp 129.135.66.236 129.135.66.254;
      default-lease-time 21600;
      max-lease-time 43200;
      next-server  129.135.66.236 ;
      filename "pxelinux.0";

    }

dhcp.yml:

[root@ol07frm01 ~]# cat /etc/foreman-proxy/settings.d/dhcp.yml
---
# Enable DHCP management
# Can be true, false, or http/https to enable just one of the protocols
:enabled: https

# valid providers:
#   - dhcp_isc (ISC dhcp server)
#   - dhcp_native_ms (Microsoft native implementation)
#   - dhcp_virsh (simple implementation for libvirt)
:use_provider: dhcp_isc
:server: 127.0.0.1
# subnets restricts the subnets queried to a subset, to reduce the query time.
#:subnets: [192.168.205.0/255.255.255.128, 192.168.205.128/255.255.255.128]
:subnets: [129.135.66.0/255.255.255.0]
:config: /etc/dhcp/dhcpd.conf
:leases: /var/lib/dhcpd/dhcpd.leases
:omapi_port: 7911
:key_name: omapi_key
:key_secret: F6wbnGJ6rI66sTgIWDbP2mD7uAQ8+z8A87/DGvrYimGNiROVRoDUJOYLtsF+ZeM2ZXYuctw30Bom/SwBTCq0xA==

[root@ol07frm01 ~]# ll -lrt /etc/foreman-proxy/settings.d/dhcp.yml
-rw-r----- 1 root foreman-proxy 723 May 26 19:37 /etc/foreman-proxy/settings.d/dhcp.yml

I installed foreman-dhcp_browser and configured DHCP subnet also.
It was working in foreman 1.10.2

Please help me


Files

foreman_dhcp.PNG View foreman_dhcp.PNG 46.8 KB laxman veeturi, 06/01/2016 09:15 AM
Actions #1

Updated by Stephen Benjamin almost 8 years ago

  • Tracker changed from Bug to Support
  • Project changed from Foreman Remote Execution to Smart Proxy
  • Category set to DHCP
Actions #2

Updated by Dominic Cleal almost 8 years ago

  • Description updated (diff)

Please check and provide logs! Particularly /var/log/foreman-proxy/proxy.log, and consider dropping the log level to DEBUG to get more information while testing this.

Actions #3

Updated by laxman veeturi almost 8 years ago

Hello,

Sorry for the delay. DHCP is working now. I changed DHCP set up as below

[root@ol07fmn00 ~]# cat /etc/foreman-proxy/settings.d/dhcp.yml
---
  1. Enable DHCP management
  2. Can be true, false, or http/https to enable just one of the protocols
    :enabled: https
  1. valid providers:
  2. - dhcp_isc (ISC dhcp server)
  3. - dhcp_native_ms (Microsoft native implementation)
  4. - dhcp_virsh (simple implementation for libvirt)
    :use_provider: dhcp_isc
    :server: 127.0.0.1
[root@ol07fmn00 ~]# cat /etc/foreman-proxy/settings.d/dhcp_isc.yml
--- #
  1. Configuration file for ISC dhcp provider #

:config: /etc/dhcp/dhcpd.conf
:leases: /var/lib/dhcpd/dhcpd.leases

  1. Redhat 5 #
    #:config: /etc/dhcpd.conf #
  2. Settings for Ubuntu #
    #:config: /etc/dhcp3/dhcpd.conf
    #:leases: /var/lib/dhcp3/dhcpd.leases
  1. Specifies TSIG key name and secret

#:key_name: secret_key_name
#:key_secret: secret_key

#:omapi_port: 7911

  1. use :server setting in dhcp.yml if you are managing a dhcp server which is not localhost
    :omapi_port: 7911
    :key_name: omapi_key
    :key_secret: 9F6da6/HWvSFDTpjvjfwda9+9Qw/ugA9BIocWlYnraUzFPSja/0oN3/VJ2CpwQzWPme21Cz59IbbLMhoVFI/2w==

I removed DHCP configuration files and omapi_key details from dhcp.yml and added in dhcp_isc.yms.
Now it is working.

Thanks for the help

Actions #4

Updated by laxman veeturi almost 8 years ago

sorry for the typo. not dhcp_isc.yms. it is dhcp_isc.yml

Actions #5

Updated by Anonymous almost 8 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF