Project

General

Profile

Bug #15143

Updated by Dominic Cleal almost 8 years ago

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: 

 <pre> 
 ~]# 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 
 </pre> 


 



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

 <pre> 
    :subnets: [192.168.205.0/255.255.255.128, 192.168.205.128/255.255.255.128] 
 </pre> 

 Restart foreman-proxy: 

 <pre> 
 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' 
 </pre> 

 


 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: 

 <pre> 
 :subnets: [192.168.205.0/255.255.255.128, 192.168.205.128/255.255.255.128] 
 </pre> 

 


Back