Bug #13820
closedProxy installation with foreman installer causes dhcp error
Description
Hi,
CentOS Linux release 7.2.1511 (Core)
isc dhcp version 4.2.5 release 42
foreman 1.10.1
When i use the proxy installer from web frontend an error occurs with dhcp. i think the installer dont update correctly the /etc/dhcp/dhcpd.conf.
foreman-installer --enable-foreman-proxy --foreman-proxy-tftp=true --foreman-proxy-tftp-servername=192.168.85.30 --foreman-proxy-dhcp=true --foreman-proxy-dhcp-interface=ens3 --foreman-proxy-dhcp-gateway=192.168.85.254 --foreman-proxy-dhcp-range="192.168.85.50 192.168.85.100" --foreman-proxy-dhcp-nameservers="192.168.85.30,8.8.8.8" --foreman-proxy-dns=true --foreman-proxy-dns-interface=ens3 --foreman-proxy-dns-zone=oscloud.local --foreman-proxy-dns-reverse=85.168.192.in-addr.arpa --foreman-proxy-dns-forwarders=192.168.85.30 --foreman-proxy-foreman-base-url=https://foreman.oscloud.local --foreman-proxy-oauth-consumer-key=Y2g69oqFzj4qTMo7SZsQWrmNd7RYBUN2 --foreman-proxy-oauth-consumer-secret=9cc9sm5dfJNLp9NoPvhudMPK4V5RUX5i
after that i get the following error
Could not start Service[dhcpd]: Execution of '/usr/bin/systemctl start dhcpd' returned 1: Job for dhcpd.service failed because the control process exited with error code. See "systemctl status dhcpd.service" and "journalctl -xe" for details.
/Stage[main]/Dhcp/Service[dhcpd]/ensure: change from stopped to running failed: Could not start Service[dhcpd]: Execution of '/usr/bin/systemctl start dhcpd' returned 1: Job for dhcpd.service failed because the control process exited with error code. See "systemctl status dhcpd.service" and "journalctl -xe" for details.
Execution of '/usr/bin/yum -d 0 -e 0 -y list ruby193-rubygem-passenger-native' returned 1: Error: No matching Packages to list
/Stage[main]/Foreman::Install/Package[ruby193-rubygem-passenger-native]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list ruby193-rubygem-passenger-native' returned 1: Error: No matching Packages to list
when i start after that the dhcp server manually i found that the omapi values are not correctly set.
-- Unit dhcpd.service has begun starting up.
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: Internet Systems Consortium DHCP Server 4.2.5
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: Copyright 2004-2013 Internet Systems Consortium.
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: All rights reserved.
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: For info, please visit https://www.isc.org/software/dhcp/
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: /etc/dhcp/dhcpd.conf line 3: expecting key name.
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: key {
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: ^
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: /etc/dhcp/dhcpd.conf line 9: semicolon expected.
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: default-lease-time
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: ^
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: /etc/dhcp/dhcpd.conf line 9: expecting a parameter or declaration
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: default-lease-time 43200;
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: ^
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: Configuration file errors encountered -- exiting
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079:
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: This version of ISC DHCP is based on the release available
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: on ftp.isc.org. Features have been added and other changes
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: have been made to the base software release in order to make
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: it work better with this distribution.
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079:
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: Please report for this software via the CentOS Bugs Database:
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: http://bugs.centos.org/
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079:
Feb 20 13:38:32 foreman.oscloud.local dhcpd1079: exiting.
Feb 20 13:38:32 foreman.oscloud.local systemd1: dhcpd.service: main process exited, code=exited, status=1/FAILURE
Feb 20 13:38:32 foreman.oscloud.local systemd1: Failed to start DHCPv4 Server Daemon.
when i check the dhcd.conf
[root@foreman settings.d]# cat /etc/dhcp/dhcpd.conf- dhcpd.conf
omapi-port 7911;
key {
algorithm HMAC-MD5;
secret "";
}
omapi-key ;
default-lease-time 43200;
max-lease-time 86400;
ddns-update-style none;
option domain-name "oscloud.local";
option domain-name-servers 192.168.85.30, 8.8.8.8;
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 ;
- PXE Handoff.
next-server 192.168.85.30;
filename "pxelinux.0";
log-facility local7;
include "/etc/dhcp/dhcpd.hosts"; #################################- oscloud.local
#################################
subnet 192.168.85.0 netmask 255.255.255.0 {
pool {
range 192.168.85.50 192.168.85.100;
}
option subnet-mask 255.255.255.0;
option routers 192.168.85.254;
}
you will see that the omapi values are not correctly set. normally it should look like below but i think the installer forget anything. the "omapi" keyword is forgotten ... you will se it above when you compare these two.
omapi-port 7911;
key omapi_key {
algorithm HMAC-MD5;
secret "XXXXXXXXX"; #<-The output from the generated key above.
};
omapi-key omapi_key;
is there a fix for that?
greetings
Sven
Updated by Sven Vogel about 8 years ago
maybe i found the problem. in my answer file there was not set the omapi key and the secret. i thought the answer file will be created new?
thanks
Sven
Updated by Dominic Cleal about 8 years ago
- Project changed from Foreman to Installer
- Category deleted (
DHCP) - Status changed from New to Resolved
This has been fixed in puppet-dhcp for 1.11: https://github.com/theforeman/puppet-dhcp/commit/7d49b00ee1989c83d8664fc6e47880544894958c
It now leaves the OMAPI key configuration out when the value is empty.