Project

General

Profile

Actions

Bug #15143

closed

DHCP :subnet: parameter no longer optional

Added by Finke Lamein almost 8 years ago. Updated almost 8 years ago.

Status:
Duplicate
Priority:
Low
Assignee:
-
Category:
DHCP
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

since version 1.11.x the :subnet: definition in foreman-proxy dhcp settings is no longer optional.

Below config was migrated during one of the earlier updates:

~]# cat /etc/foreman-proxy/settings.d/dhcp.yml 
--- 
:enabled: https
:use_provider: dhcp_isc

Default config from package:
---
# Can be true, false, or http/https to enable just one of the protocols
:enabled: false

# 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]

~]# grep -i debug /etc/foreman-proxy/settings.yml
# WARN, DEBUG, ERROR, FATAL, INFO, UNKNOWN
:log_level: DEBUG

Restart foreman-proxy:
D, [2016-05-23T16:13:23.489289 #3599] DEBUG -- : Rack::Handler::WEBrick is mounted on /.
I, [2016-05-23T16:13:23.489498 #3599]  INFO -- : WEBrick::HTTPServer#start: pid=3599 port=8443
I, [2016-05-23T16:13:39.642464 #3748]  INFO -- : Finished initialization of module 'discovery'
I, [2016-05-23T16:13:39.642736 #3748]  INFO -- : 'foreman_proxy' settings were initialized with default values: :enabled: true
I, [2016-05-23T16:13:39.664302 #3748]  INFO -- : Finished initialization of module 'foreman_proxy'
I, [2016-05-23T16:13:39.666929 #3748]  INFO -- : Finished initialization of module 'tftp'
I, [2016-05-23T16:13:39.667440 #3748]  INFO -- : 'dhcp_isc' settings were initialized with default values: :enabled: false, :omapi_port: 7911
I, [2016-05-23T16:13:39.677621 #3748]  INFO -- : Finished initialization of module 'dhcp_isc'
I, [2016-05-23T16:13:39.677894 #3748]  INFO -- : 'dhcp' settings were initialized with default values: :server: 127.0.0.1, :subnets: 
E, [2016-05-23T16:13:39.678106 #3748] ERROR -- : Couldn't enable plugin dhcp: Parameter 'subnets' is expected to have a non-empty value

Adding to /etc/foreman-proxy/settings.d/dhcp.yml:

:subnets: [192.168.205.0/255.255.255.128, 192.168.205.128/255.255.255.128]

Restart foreman-proxy:

I, [2016-05-23T16:16:09.881216 #4578]  INFO -- : 'dhcp' settings were initialized with default values: :server: 127.0.0.1
I, [2016-05-23T16:16:09.896015 #4578]  INFO -- : Finished initialization of module 'dhcp'

The manual isn't very clear on this:

All available subnets will be loaded and can be managed by default, but this can have a performance penalty. If only some subnets are used, specify them as follows in network_address/network_mask notation:

:subnets: [192.168.205.0/255.255.255.128, 192.168.205.128/255.255.255.128]

Related issues 2 (0 open2 closed)

Related to Smart Proxy - Bug #14952: dhcp_isc not respecting the :subnets: settings anymoreClosed05/06/2016Actions
Related to Smart Proxy - Bug #15240: Couldn't enable plugin dhcp: Parameter 'subnets' is expected to have a non-empty valueClosed05/31/2016Actions
Actions

Also available in: Atom PDF